API Search endpoints…⌘K Get API credentialsGet access

Reverse a recorded payment

POST/lokta-lms/api/v1/invoices/{invoiceId}/payments/{paymentId}/reversal

Reverses a payment recorded against a partner invoice, with a reason.

reason is required. Append-only: the original payment is never edited or deleted; a contra row carries the negative amount, the reason and its own actor, so sum(amount_paid) stays the one figure every rule reads. The contra is dated today, not back-dated into a period already reported.

An invoice that was paid returns to approved when the reversal leaves it short. A reversal cannot itself be reversed (409 sourcing/payment_not_reversible) and a payment is reversed once (409 sourcing/payment_already_reversed). Record a fresh payment to re-settle.

Path parameters

invoiceIdpath · string · required
paymentIdpath · string · required

Header parameters

Idempotency-Keyheader · string · optional

Per-intent key

Request body application/json

reasonstring · required

Why the payment is being reversed.

Responses

defaultdefault response

Every request authenticates with HTTP Basic and carries a Tenant-Identifier header. See the conventions for dates, commands, pagination and errors. Open this operation in the interactive explorer, or read it as Markdown.

This is the API reference for Lokta, the agentic loan servicing platform. Go to lokta.ai