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 theIdempotency-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
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:
Request size
Request bodies can be up to 10 KB. Larger requests are rejected with413.
Request IDs
Every error includes arequest_id that starts with req_. Log it, and send it to support if you need help with a request.
