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. Deduplication is by request ID ALONE: the same amount, on the same account, on the same effective date, resent under a NEW request ID books a SECOND payment and answers 201. A borrower may legitimately pay the same amount twice, and no field in the request separates that from an accidental resend, so this route carries no business-fact fence — unlike disbursement, which does. Retry under the ORIGINAL request ID, which replays the original answer and moves nothing; a double that did book is undone on POST /api/v1/loan-accounts//transactions//reverse, newest payment first.
Authorizations
JWT bearer token issued by the identity provider.
Headers
Canonical idempotency request ID. Falls back to X-Idempotency when absent.
"550e8400-e29b-41d4-a716-446655440010"
Fallback idempotency request ID used when X-Request-ID is absent.
"550e8400-e29b-41d4-a716-446655440011"
Path Parameters
Loan account identifier (UUID).
"550e8400-e29b-41d4-a716-446655440000"
Body
Repayment amount in major currency units (e.g. "125.00"). Must be positive with at most 2 fractional digits.
"125.00"
The moment the money moved, as a full RFC 3339 instant with a time and an offset. A bare YYYY-MM-DD calendar date is refused with LENDER-0348.
"2026-06-14T17:30:00Z"
The moment the money moved, as a full RFC 3339 instant, read when effectiveDate is absent. A bare YYYY-MM-DD calendar date is refused with LENDER-0348.
"2026-06-14T17:30:00Z"
Response
Created
Per-installment allocation breakdown.
Amount applied to the loan (2 d.p. string).
"125.00"
True if the repayment effective date is before the business date.
RFC 3339 instant the money moved. A bare calendar date is refused with LENDER-0348: the day a payment belongs to - its competencia, its business date, its IOF window - is derived from the moment, so the moment is what the caller declares. A payer who knows only the day names an instant on that day.
"2026-06-14T21:00:00Z"
Loan account UUID.
"550e8400-e29b-41d4-a716-446655440000"
Excess amount above total outstanding (2 d.p. string).
"0.00"
Recorded repayment transaction UUID.
"550e8400-e29b-41d4-a716-446655440001"
Idempotency request ID echoed from the request.
"550e8400-e29b-41d4-a716-446655440010"

