v1

latestOpenAPI 3.1.02026-07-263644911022.4 KB
Loan Accounts

Record repayment

Records a repayment allocation for an active loan account. Idempotency is enforced in the use case via the X-Request-ID header (X-Idempotency fallback): a reused request ID with different facts yields 409. A malformed UUID or amount yields 422.

post/api/v1/loan-accounts/{id}/repayments

Path parameters

idstring uuid required

Loan account identifier (UUID).

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

Loan account identifier (UUID).

Headers

X-Request-IDstring

Canonical idempotency request ID. Falls back to X-Idempotency when absent.

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

Canonical idempotency request ID. Falls back to X-Idempotency when absent.

X-Idempotencystring

Fallback idempotency request ID used when X-Request-ID is absent.

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

Fallback idempotency request ID used when X-Request-ID is absent.

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

Created

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 the repayment.

loanAccountIdstring required

Loan account UUID.

overpaymentAmountstring required

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

requestIdstring

Idempotency request ID echoed from the request.

transactionIdstring required

Recorded repayment transaction UUID.

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",
  "requestId": "550e8400-e29b-41d4-a716-446655440010",
  "transactionId": "550e8400-e29b-41d4-a716-446655440001"
}