Skip to main content
The Payments API uses HTTP status codes to say whether a request worked. Whether a payment worked is a different question: a declined card is a successful request that returns a payment with status: "failed".
Never treat a 200 as a successful charge. Read the payment’s status, and last_outcome when it failed. See Payment lifecycle.

The error object

Status codes and types

Common codes

The complete, per-endpoint list of codes is in each operation of the API reference.

Declines

A declined payment is returned as data. Its last_outcome explains why: Both category and reason are open enums.

Retries

Retry a request when it failed with a network error, a timeout, 429, 500, 502, 503, 504 or idempotency_key_in_progress. Reuse the same Idempotency-Key so a retry never creates a second payment. Do not retry payments_api_disabled. The browser client follows these rules for you.

Request tracing

Every response carries Payments-Request-Id. It also returns Payments-Trace-Id and a W3C traceparent. You can send your own traceparent to tie our records to your trace.