v1

latestOpenAPI 3.1.02026-07-263644911022.4 KB
Loan Accounts

Reverse loan account transaction

Creates an immutable compensating transaction and preserves reversal lineage. 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 yields 422; an unknown transaction yields 404.

post/api/v1/loan-accounts/{id}/transactions/{transactionId}/reverse

Path parameters

idstring uuid required

Loan account identifier (UUID).

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

Loan account identifier (UUID).

transactionIdstring uuid required

Original repayment transaction identifier (UUID).

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

Original repayment transaction identifier (UUID).

Headers

X-Request-IDstring

Canonical idempotency request ID. Falls back to X-Idempotency when absent.

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

Canonical idempotency request ID. Falls back to X-Idempotency when absent.

X-Idempotencystring

Fallback idempotency request ID used when X-Request-ID is absent.

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

Fallback idempotency request ID used when X-Request-ID is absent.

Request body

effectiveDatestring required

YYYY-MM-DD effective date of the reversal.

jurisdictionCodestring

Optional jurisdiction code.

profileVersionstring required

Product profile version applied to the reversal.

reasonstring required

Operator-supplied reversal reason.

Example request

{
  "effectiveDate": "2026-06-14",
  "jurisdictionCode": "BR",
  "profileVersion": "1.0.0"
}

Response

OK

amountstring required

Reversed amount (2 d.p. string).

effectiveDatestring required

ISO-8601 effective date of the reversal.

jurisdictionCodestring

Jurisdiction code applied to the reversal.

loanAccountIdstring required

Loan account UUID.

originalTransactionIdstring required

Reversed original transaction UUID.

profileVersionstring required

Product profile version applied to the reversal.

reasonstring required

Operator-supplied reversal reason.

requestIdstring

Idempotency request ID echoed from the request.

transactionIdstring required

Compensating reversal transaction UUID.

Example response

{
  "amount": "125.00",
  "effectiveDate": "2026-06-14",
  "jurisdictionCode": "BR",
  "loanAccountId": "550e8400-e29b-41d4-a716-446655440000",
  "originalTransactionId": "550e8400-e29b-41d4-a716-446655440001",
  "profileVersion": "1.0.0",
  "requestId": "550e8400-e29b-41d4-a716-446655440010",
  "transactionId": "550e8400-e29b-41d4-a716-446655440002"
}