An indenture is a formal legal agreement. Many earned passage to the British colonies by indenturing, or selling, themselves to a master for a period of seven years–-they were called indentured laborers.
Indenture can describe what you owe to someone else. If you promised your friend you would take her shopping for a prom dress, you might fulfill your indenture over the course of three trips to the mall. A detention is an indenture of a kind––for your crime, you owe time.