Skip to main content

Headers every request needs

Retry safely with an idempotency key

Imagine your server sends “create a payment”, but the connection drops before you see the reply. Did the payment get created? If you send the request again, you might create two. An idempotency key fixes this. It’s a unique value you send in the Idempotency-Key header, such as your own order ID. If we see the same key again, we don’t create anything new. We send back the first reply.

How it works

Use a value that is unique to the thing you’re creating, such as your order ID. Don’t generate a new random key when you retry, or you lose the protection.
Idempotency keys only apply to requests that create something (POST). Requests that only read data (GET) are always safe to repeat.
Idempotency errors use a shorter format than other errors: they have code and message, but no type or request_id.

Rate limits

To keep the service fast for everyone, each IP address can make up to 120 requests per minute. Every response tells you where you stand: If you go over, you get a 429 error and a Retry-After header that says how many seconds to wait:
Don’t check a payment’s status over and over. Use webhooks to be told when it changes.

Request size

Request bodies can be up to 10 KB. Larger requests are rejected with 413.

Request IDs

Every error includes a request_id that starts with req_. Log it, and send it to support if you need help with a request.
Last modified on October 29, 2026