---
title: "Record repayment"
method: POST
path: "/api/v1/loan-accounts/{id}/repayments"
tags: ["Loan Accounts"]
---

# Record repayment

`POST /api/v1/loan-accounts/{id}/repayments`

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.

## Path parameters

- `id` string, uuid, required — Loan account identifier (UUID).

## Headers

- `X-Request-ID` string — Canonical idempotency request ID. Falls back to X-Idempotency when absent.
- `X-Idempotency` string — Fallback idempotency request ID used when X-Request-ID is absent.

## Request body

- RepaymentRequestHumaBody
  - `amount` string, required — Repayment amount in major currency units (e.g. "125.00"). Must be positive with at most 2 fractional digits.
  - `effectiveDate` string — ISO-8601 or YYYY-MM-DD effective date.
  - `transactionDate` string — ISO-8601 or YYYY-MM-DD transaction date (fallback when effectiveDate is absent).

## Response `201`

Created

- RepaymentRecordHumaBody
  - `allocations` RepaymentAllocationHumaBody[], nullable, required — Per-installment allocation breakdown.
    - `dueDate` string, required — ISO-8601 installment due date.
    - `feesAmount` string, required — Fees component (2 d.p. string).
    - `fullyPaid` boolean, required — True if this installment is fully settled.
    - `installmentNumber` integer, required — 1-based installment sequence number.
    - `interestAmount` string, required — Interest component (2 d.p. string).
    - `penaltiesAmount` string, required — Penalties component (2 d.p. string).
    - `principalAmount` string, required — Principal component (2 d.p. string).
    - `totalAmount` string, required — Total installment amount (2 d.p. string).
  - `appliedAmount` string, required — Amount applied to the loan (2 d.p. string).
  - `backdated` boolean, required — True if the repayment effective date is before the business date.
  - `effectiveDate` string, required — ISO-8601 effective date applied to the repayment.
  - `loanAccountId` string, required — Loan account UUID.
  - `overpaymentAmount` string, required — Excess amount above total outstanding (2 d.p. string).
  - `requestId` string — Idempotency request ID echoed from the request.
  - `transactionId` string, required — Recorded repayment transaction UUID.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/lerian/apis/identity-plugin.md) · [All operations](https://skmtc.net/lerian/apis/identity-plugin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lerian/identity-plugin/versions/25daba385532/schema)
