Legal analysis: In addition to the principal debt, the debtor has to pay interest and expenses. If the payment is not enough to pay off all debts, and the parties have not agreed, the people's court shall set them off in the following order: (1) expenses related to the realization of creditor's rights; (2) interest; (3) Principal debt.
Legal basis: Civil Code of People's Republic of China (PRC).
Article 667 A loan contract is a contract in which the borrower borrows money from the lender, repays the loan at maturity and pays interest.
Article 679 A loan contract between natural persons is established when the lender provides the loan.