API reference
Rate limits
Each API key can make 100 requests per minute.
- The count is per API key. Your test key and your live key each have their own limit.
- It is a fixed one-minute window. The count starts again at zero every minute.
- Every request with a valid key counts, including requests that return an error and requests that replay an idempotent answer.
When you go over#
You get 429 Too Many Requests. The Retry-After header says how many seconds to wait.
HTTP/1.1 429 Too Many Requests
Retry-After: 23
Content-Type: application/json
{
"error": {
"type": "rate_limit",
"code": "rate_limit_exceeded",
"message": "Too many requests. The limit is 100 requests per minute per API key."
}
}
Rate limit errors are not stored for idempotency, so you can resend the same request with the same Idempotency-Key after waiting.
Staying under the limit#
- Use webhooks instead of polling. One webhook replaces many
GET /v1/payments/{id}calls. - Back off when you see
429. Wait forRetry-After, then try again. - Do not call the API for every page view. Create a payment only when the customer chooses to pay.
- Use
GET /v1/payments?limit=100to read many payments in one call.
async function tigerpayFetch(url, options) {
const res = await fetch(url, options);
if (res.status === 429) {
const seconds = Number(res.headers.get("Retry-After")) || 1;
await new Promise((r) => setTimeout(r, seconds * 1000));
return fetch(url, options); // try once more
}
return res;
}
If you need a higher limit, contact TigerPay.