HTTP 429 Too Many Requests
error.
Default Rate Limits
These are the standard rate limits for the main API endpoints.Endpoint | Limit | Time Window |
---|---|---|
POST /process/ | 100 requests | per minute |
GET /transactions/{transaction_id}/ | 300 requests | per minute |
If your application has specific needs for higher rate limits, please contact our support team to discuss your use case.
Rate Limit Headers
The API includes the following headers in every response to help you track your current rate limit status programmatically.Header | Description | Example Value |
---|---|---|
X-RateLimit-Limit | The maximum number of requests allowed in the current time window. | 100 |
X-RateLimit-Remaining | The number of requests remaining in the current time window. | 95 |
X-RateLimit-Reset | The Unix timestamp indicating when the current time window resets. | 1640995200 |
Handling a Rate Limit Error
When you exceed the rate limit, the API will return anHTTP 429
status code and a JSON body containing information on when you can retry.
retry_after
field indicates the number of seconds you should wait before making another request.
Best Practices for Handling Rate Limits
- Wait at least the number of seconds indicated in
retry_after
before retrying after receiving a429
response. - Implement exponential backoff for server-side errors or rate limits by retrying requests with progressively longer delays.
- Cache responses to avoid repeating requests for the same information, especially for
GET
requests that rarely change. - Control concurrency to ensure your application doesn’t exceed the allowed limit within the time window when sending parallel requests.
Python Example: Basic Rate Limit Handling
Python Example: Basic Rate Limit Handling
Next Steps
- Learn more about HTTP response codes to understand how to handle different API responses.
- See how to create a payment and test your rate limit handling in real scenarios.
- Explore the environment guide to ensure you’re using the correct credentials and URLs in each phase.