Skip to main content
Errors use HTTP status codes and an RFC 9457 application/problem+json body:
  • Branch on code. The wording of detail can change.
  • instance is the request id, also sent as the X-Request-Id header. Include it when you contact support. You can send your own X-Request-Id (up to 200 characters) and it’s echoed back.
  • errors appears on 422 responses: 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.