application/problem+json body:
- Branch on
code. The wording ofdetailcan change. instanceis the request id, also sent as theX-Request-Idheader. Include it when you contact support. You can send your ownX-Request-Id(up to 200 characters) and it’s echoed back.errorsappears on422responses: a list of{ "path", "message" }, such as{ "path": "items.0.unit_amount", "message": "Use whole minor units" }.
Error codes
Also retry network errors and timeouts. When you retry a write, reuse the same
Idempotency-Key. The SDKs retry for you.
A
502 from POST /invoices/{id}/send can arrive after the invoice was finalized. The invoice keeps its number, and an invoice.email_failed event is recorded. Retry the send.