v1

latestOpenAPI 3.1.02026-07-263644911022.4 KB
Loan Accounts

Prepay loan account (BR alias)

BR-aliased path for prepaying a loan account. Resolves to the same handler as the core endpoint, with the jurisdiction resolver inserted into the chain. BR accounts require quoteId; when amount is also provided, it must equal the quote's net settlement amount. Idempotency is enforced by the lib-commons idempotency middleware via the X-Idempotency header; a reused key with different facts yields 409. A missing quote, malformed UUID, or invalid amount yields 422.

post/api/v1/br/loan-accounts/{id}/prepayments

Path parameters

idstring uuid required

Loan account identifier (UUID).

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

Loan account identifier (UUID).

Headers

X-Idempotencystring required

Canonical idempotency request ID. Enforced by the lib-commons idempotency middleware.

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

Canonical idempotency request ID. Enforced by the lib-commons idempotency middleware.

Request body

amountstring

Prepayment amount (2 d.p. string). Amount-only prepayment is available only for non-BR accounts; BR accounts require quoteId.

businessDatestring required

YYYY-MM-DD business date applied to the prepayment.

effectiveDatestring required

YYYY-MM-DD effective date of the prepayment.

quoteIdstring uuid

Settlement quote identifier. Required when amount is empty.

transactionIdstring required

Operator-supplied prepayment transaction identifier.

Example request

{
  "amount": "100.00",
  "businessDate": "2026-06-14",
  "effectiveDate": "2026-06-14",
  "quoteId": "550e8400-e29b-41d4-a716-446655440020"
}

Response

Created

previousScheduleVersionIdstring required

Predecessor schedule version UUID.

Example response

{
  "previousScheduleVersionId": "550e8400-e29b-41d4-a716-446655440031",
  "scheduleVersion": {
    "createdAt": "2026-06-14T12:00:00Z",
    "id": "550e8400-e29b-41d4-a716-446655440030",
    "installments": [
      {
        "dueDate": "2026-06-14T12:00:00Z",
        "feesAmount": "3.50",
        "interestAmount": "20.00",
        "number": 3,
        "penaltiesAmount": "1.50",
        "principalAmount": "100.00",
        "principalRemaining": "100.00",
        "totalAmount": "125.00"
      }
    ],
    "loanAccountId": "550e8400-e29b-41d4-a716-446655440000",
    "predecessorVersionId": "550e8400-e29b-41d4-a716-446655440031",
    "versionNumber": 2
  }
}