Invoice Lifecycle
Every invoice moves through a series of statuses from creation to acceptance (or failure).
Status diagram
βββββββββ ββββββββββ βββββββββββ ββββββββββββ
β draft βββββ>β queued βββββ>β pending βββββ>β accepted β
βββββββββ ββββββββββ βββββββββββ ββββββββββββ
β
βββββ>ββββββββββββ
β β rejected β
β ββββββββββββ
β
βββββ>ββββββββββ (retry, max 5)
β failed βββββ> queued
ββββββββββ
accepted ββββ> cancelled (creates credit note)Statuses
| Status | Description | What you can do |
|---|---|---|
draft | Created, not submitted | Edit, delete, or submit |
queued | In the submission queue | Wait. Cannot modify. |
pending | Sent to tax authority, awaiting response | Poll with GET /invoices/:id/status or wait for webhook |
accepted | Tax authority accepted the invoice | Download PDF. Can cancel (creates credit note). |
rejected | Tax authority rejected the invoice | Read error details. Create a corrected invoice. |
failed | Submission failed (network, timeout) | Retry with POST /invoices/:id/retry. Max 5 attempts. |
cancelled | Invoice voided | A credit note is created automatically. |
What triggers each transition
| From | To | Trigger |
|---|---|---|
| β | draft | POST /i/v1/invoices |
draft | queued | POST /i/v1/invoices/:id/submit |
queued | pending | Worker picks up the job |
pending | accepted | Tax authority returns approval |
pending | rejected | Tax authority returns rejection with errors |
pending | failed | Network error, timeout, or tax authority unavailable |
failed | queued | POST /i/v1/invoices/:id/retry |
accepted | cancelled | POST /i/v1/invoices/:id/cancel |
Webhook events by status
These are the events actively dispatched to your webhook endpoints:
| Status change | Webhook event |
|---|---|
β accepted | invoice.approved |
β rejected | invoice.rejected |
β failed (submission error) | invoice.failed |
Handling rejections
Rejected invoices cannot be resubmitted. You must create a new invoice with the corrections:
Retrieve the rejected invoice to inspect error details:
Create a corrected invoice with a new invoice number:
Submit the corrected invoice:
Handling failures
Failed invoices can be retried up to 5 times:
After 5 failures, the invoice.failed webhook fires. Investigate the error before creating a new invoice.
π‘ SDK available
See SDK β Invoices for the programmatic interface.
Last updated on