Skip to content

INVOICE_NOT_OPEN

The invoice is in a status that does not allow what you asked for.

HTTP status
409 Conflict
Code
INVOICE_NOT_OPEN

Cancelling works while an invoice is open or underpaid. It is refused once the invoice is paid, canceled, or processing — a processing invoice has a payment in flight, and we never write off an invoice a customer is part-way through paying.

Read the invoice and act on its status:

Terminal window
curl https://api.intents.fi/v0/invoices/inv_… -H "Authorization: Bearer $INTENTS_SECRET_KEY"
  • paid — nothing to do; fulfil the order.
  • processing — wait. You will get invoice.paid (or invoice.underpaid) when it resolves.
  • canceled — already done.
  • expired — see INVOICE_EXPIRED.

To stop accepting payment for an order you no longer want to fulfil, cancel it before a customer starts paying, and refund any late payment yourself (we never hold the funds).

{ "error": { "code": "INVOICE_NOT_OPEN", "message": "…" } }