Rate limit headers
A request can count against several limits at once, for example per app environment and per app. On a success, the headers describe the most constrained of those limits; on a
429, the limit that was exceeded. A response can omit the RateLimit-* headers, so do not treat a missing header as a missing limit.
Handle a 429
- Wait for
Retry-Afterbefore sending the request again. - Reuse the same
Idempotency-Keywhen you retry a write. See Retrying safely. - Spread the load. React to webhooks instead of polling every resource, and page through lists with their cursors.
Not every
429 is a rate limit. payment_option_limit_reached means too many options were created for one payment. See Errors.
Related
Errors
Every error code and which ones to retry.
Idempotency
Retry a write without doing it twice.
Webhooks
Learn about changes without polling.
Environments
Base URLs and what is isolated between environments.