invoice_invalid_status_transition
The target status is unreachable from the current one. The document lifecycle is directed: `draft` moves to `scheduled` or `sent`, `sent` to `overdue` or `annulled`, `overdue` to `annulled`, and `cancelled` and `annulled` are terminal. Being paid is not a step of that lifecycle: it is read from the payment ledger.
| Code | Type | HTTP | Category |
|---|---|---|---|
invoice_invalid_status_transition | invalid_request_error | 422 | Invoices |
Cause
The target status is unreachable from the current one. The document lifecycle is directed: draft moves to scheduled or sent, sent to overdue or annulled, overdue to annulled, and cancelled and annulled are terminal. Being paid is not a step of that lifecycle: it is read from the payment ledger.
What to do
Read the current status and call the operation for the step you actually need, instead of setting the target status directly.
Related
All Invoices error codes
Causes and actions for errors in this category.
Error codes by category
Find an error by the category that emits it.
Full reference table
All codes, HTTP statuses, types and descriptions in one reference.
Error model
Interpret the error envelope and handle errors by code.