Skip to main content
POST
/
v1
/
loans
/
{loan_id}
/
repayments
Record a repayment
curl --request POST \
  --url https://api-dev.bsa.ai/v1/loans/{loan_id}/repayments \
  --header 'Authorization: Bearer <token>'

Documentation Index

Fetch the complete documentation index at: https://docs.api.bsa.ai/llms.txt

Use this file to discover all available pages before exploring further.

Records a standard repayment against an active loan. The amount is allocated to penalties → fees → interest → principal according to the loan’s transaction processing strategy.

Path parameters

loan_id
string
required

Request body

See the common repayment body.

Example

curl -sf -X POST "$BASE/v1/loans/501/repayments" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "transactionDate": "2026-07-01",
    "transactionAmount": 450,
    "paymentTypeId": 3,
    "receiptNumber": "RCP-99847"
  }'

Response

200 OK returns the repayment object showing how the amount was allocated.

Errors

CodeWhen
not_foundNo loan with that ID
abortedLoan is not active, or transactionDate precedes the loan’s disbursal
invalid_argumentMissing transactionDate or non-positive transactionAmount