Rate limits
How many requests you can make, and what happens when you make more.
Limits are counted per minute, in fixed windows that start at the top of each minute.
| What | Limit | Counted per |
|---|---|---|
| Every request to the API | 100 a minute | IP address |
Payments endpoints (/payments…) | 300 a minute | App |
Token endpoints (/oauth/token, /oauth/revoke, /oauth/introspect) | 30 a minute | IP address |
All the limits that apply to a request must allow it. In practice, a single server is held to 100 requests a minute by the first limit.
Watching your usage
Successful responses carry your remaining allowance:
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 287When you hit a limit
The API answers 429 Too Many Requests:
{ "error": "Too many requests. Please try again later.", "retry_after": 60 }retry_after is the length of the window in seconds, not the time left in it:
the window resets at the start of the next minute. Wait, then retry, with the
same Idempotency-Key if the request creates or changes something.
Staying under them
- Reuse access tokens. A token lasts an hour; don't fetch one per request.
- Use webhooks to learn about changes instead of polling payments.
- Spread out background work, such as reconciliation jobs, rather than running it in a burst.