Generate a repayment schedule
Calculate the full repayment breakdown for a hypothetical loan without creating any records. Use this to preview monthly installments and total interest before the member submits a request.Request body
number
required
The loan principal to calculate the schedule for.
number
required
The repayment duration in months. The schedule will contain one entry per month.
Response fields
number
required
Total amount to be repaid (principal plus interest).
number
required
Equal monthly payment amount. Calculated as
total_repayment / duration_months.number
required
Total interest charged over the full duration. Calculated as
amount × (interest_rate / 100) × (duration_months / 12).object[]
required
Array of monthly payment entries, one per month.
Example
Record a loan repayment
Record a payment against an active loan. The loan’srepaidAmount increases by the payment and, once repaidAmount reaches totalDue, the loan status automatically becomes COMPLETED.
Partial repayments are fully supported. You do not need to pay the full outstanding balance in a single transaction — any amount greater than zero and less than or equal to the remaining balance is accepted.
Path parameters
string
required
The unique identifier of the loan to repay.
Request body
number
required
The repayment amount. Must be greater than
0 and must not exceed the outstanding balance (totalDue - repaidAmount).string
required
The payment channel used. Examples:
"mobile_money", "cash". Minimum 1 character.string
Ugandan phone number associated with the payment, required when
paymentMethod is "mobile_money". Must match the pattern ^\+?256[0-9]{9}$.Eligibility rules
- The loan must be in
APPROVED,ACTIVE, orOVERDUEstatus. - Members can only repay their own loans; admins can repay any loan.
- The payment amount must not exceed the remaining balance.
- When
repaidAmount >= totalDueafter the payment, the loan status changes toCOMPLETEDandrepaidAmountis capped attotalDue.
Response fields
boolean
required
true when the repayment was recorded successfully.string
required
Confirmation message, e.g.
"Loan repayment recorded".
