Roll back a loan
Loans
Roll back a loan
Tear down a loan whose wallet disbursement failed — one call instead of three.
POST
Roll back a loan
Removes a loan that should never have existed — the exception flow for
a failed wallet disbursement. One call performs the full teardown
internally (
The body is optional; POST with no body is valid.
After a successful rollback the loan no longer appears in queries —
undo-disbursal → undo-approval → delete) and returns
a single response, so your exception handler doesn’t need to chain
three synchronous requests.
The three individual endpoints remain available; rollback is the
consolidated form built on top of them.
Resumable by design
Each teardown step is durable in the LMS the moment it succeeds. If a step fails (or your call times out mid-sequence), the loan is left at a well-defined interim state — and calling rollback again resumes from that state instead of failing on steps that already ran:
So the partner-side recovery logic collapses to: call rollback until
you get
200. There is no partial-failure state you need to
disambiguate yourself — but if you want to inspect anyway,
GET /v1/loans/external/{loan_external_id} reports the interim status
dynamically after every step (Active → Approved →
Submitted and pending approval → 404 once deleted).
Path parameters
string
required
The loan’s externalId. On the
/v1/loans/{loan_id}/rollback form,
this is the numeric LMS id instead.Request body
string
Optional. Reason for the rollback — recorded against both undo steps
in the LMS audit log.
Examples
Response
200 OK with the steps that ran on this call. A rollback resumed from
an interim state reports only the remaining steps it executed.
GET /v1/loans/external/{loan_external_id} returns 404. The LMS
retains the full activity history (creation, approval, disbursal,
every reversal, deletion) in its audit log.

