Skip to main content
POST
/
v1
/
loans
/
{loan_id}
/
repayments
/
{transaction_id}
/
reverse
Reverse a repayment
curl --request POST \
  --url https://api-dev.bsa.ai/v1/loans/{loan_id}/repayments/{transaction_id}/reverse \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "transactionDate": "<string>",
  "note": "<string>"
}
'

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.

Reverses an existing transaction. The original entry is preserved (marked reversed: true) so the audit trail is intact. The loan’s balances are recomputed as if the transaction had not occurred.

Path parameters

loan_id
string
required
transaction_id
string
required

Request body

transactionDate
string
required
ISO-8601 YYYY-MM-DD. The effective date of the reversal (commonly the same as today).
note
string
Optional. Reason for the reversal.

Example

curl -sf -X POST "$BASE/v1/loans/501/repayments/7821/reverse" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "transactionDate": "2026-08-15",
    "note": "Reposted to wrong loan"
  }'

Response

200 OK returns the repayment object with reversed: true.

Errors

CodeWhen
not_foundLoan or transaction not found
abortedTransaction is already reversed
invalid_argumentMissing transactionDate