v1

latestOpenAPI 3.1.02026-07-263644911022.4 KB
Loan Accounts

Preview repayment allocation

Returns a deterministic repayment allocation preview without recording a transaction. Not idempotency-gated. A malformed UUID yields 422 (schema error). A malformed amount string yields 422.

post/api/v1/loan-accounts/{id}/preview-repayment

Path parameters

idstring uuid required

Loan account identifier (UUID).

Example:550e8400-e29b-41d4-a716-446655440000

Loan account identifier (UUID).

Request body

amountstring required

Repayment amount in major currency units (e.g. "125.00"). Must be positive with at most 2 fractional digits.

effectiveDatestring

ISO-8601 or YYYY-MM-DD effective date.

transactionDatestring

ISO-8601 or YYYY-MM-DD transaction date (fallback when effectiveDate is absent).

Example request

{
  "amount": "125.00",
  "effectiveDate": "2026-06-14",
  "transactionDate": "2026-06-14"
}

Response

OK

appliedAmountstring required

Amount applied to the loan (2 d.p. string).

backdatedboolean required

True if the repayment effective date is before the business date.

effectiveDatestring required

ISO-8601 effective date applied to this preview.

loanAccountIdstring required

Loan account UUID.

overpaymentAmountstring required

Excess amount above total outstanding (2 d.p. string).

Example response

{
  "allocations": [
    {
      "dueDate": "2026-06-14",
      "feesAmount": "3.50",
      "installmentNumber": 3,
      "interestAmount": "20.00",
      "penaltiesAmount": "1.50",
      "principalAmount": "100.00",
      "totalAmount": "125.00"
    }
  ],
  "appliedAmount": "125.00",
  "effectiveDate": "2026-06-14",
  "loanAccountId": "550e8400-e29b-41d4-a716-446655440000",
  "overpaymentAmount": "0.00"
}