How to revert an invoice incorrectly marked as paid

Last updated: May 28, 2026

If a payment record was created in Lago by mistake, (for example, because an invoice was incorrectly marked as paid in an external accounting system) you cannot delete or reverse the payment record directly. Lago treats payments as permanent, auditable entries. The correct path is to void the invoice and issue a new one, which preserves ledger integrity while correcting the error.

How payment records work in Lago

Lago does not support deleting payment records. Once a payment is created (whether via the API or a payment provider), it remains as an auditable entry on the invoice. This is by design: payments are part of the financial audit trail and must not be silently removed.

When an invoice is voided, Lago generates a credit note for the full invoiced amount, which offsets the original charge. A new invoice can then be issued reflecting the correct state.

How to resolve the issue

To correct an invoice that was erroneously marked as paid:

  1. Void the invoice. In the Lago UI, navigate to the invoice and select "Void." To do so via the API, send a POST request to /api/v1/invoices/{lago_id}/void. Voiding the invoice triggers an automatic credit note for the full invoice amount.

  2. Verify the credit note was generated. After voiding, confirm that a credit note appears on the customer's account. This credit note offsets the original invoice and can be applied to a future invoice.

  3. Issue a new invoice if needed. If the underlying charge or subscription should still be billed, create a new one-off invoice or allow the next billing cycle to generate the invoice normally. The credit note balance can be applied to the new invoice at that time.

How to prevent this from happening again

If your integration creates payment records in Lago to mirror your accounting system's status, add a validation step before writing to Lago. For example, confirm the payment was genuinely processed (e.g., via a webhook from your payment provider) before calling the Lago payments API. This reduces the risk of speculative or erroneous payment records being created.


This article reflects guidance drawn from customer case resolutions. It is not officially supported documentation and may not apply to all situations.