When did becoming an Indentured Servant become unlawful (or did it ever?)

Debt peonage may have been outlawed in 1867, but sharecropping persisted until the 1940s, and the company store still exists today.