It's called a Liability.
The legal obligation will be much stronger if you put it under writing. Liabiity usually recorrded on the right side of Company's Ledger. The ammount of Liability that a company has must be identical to the ammount that you get when you cut the total ammountt of owner's ewuity from the company's asset