INVOICE_NOT_OPEN
The invoice is in a status that does not allow what you asked for.
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.
What to do
Section titled “What to do”Read the invoice and act on its status:
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 getinvoice.paid(orinvoice.underpaid) when it resolves.canceled— already done.expired— seeINVOICE_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).
Example response
Section titled “Example response”{ "error": { "code": "INVOICE_NOT_OPEN", "message": "…" } }