Skip to main content
Errors return JSON with an error object.
Payment errors can include additional decline fields. See Decline codes for every decline_code.

Status code map

Client behavior

  • Retry network failures and retryable 5xx operations with the same idempotency key only when the operation-specific documentation says that a retry is safe.
  • A 502 with code GATEWAY_ERROR from confirming a payment intent (including create with confirmation) or creating a refund means no money moved. The same idempotency key only replays that response, so use a new key to try again. From capture or cancel, retrieve the payment intent before retrying: the outcome there is not yet guaranteed. A 502 without an Ionic error body comes from the network edge: retry it with the same key.
  • Do not retry validation errors without changing the request.
  • Do not retry payment declines blindly.
  • Include X-Request-ID when contacting support.
Terminal payment timeouts, GATEWAY_UNCERTAIN, and disconnected client sockets are not proof that a Sale failed. Do not create another Sale. Inspect the PaymentIntent and any known Terminal Payment, retain the original idempotency key, and follow the terminal-specific recovery guidance.