Pagination and rate limits
Pagination
Section titled “Pagination”List endpoints (GET /payments, /payouts, /refunds, /events) use a cursor.
| Parameter | Meaning |
|---|---|
limit |
1 to 100, default 25. |
starting_after |
Id of the last object of the previous page. |
Results go from newest to oldest. The response is an envelope:
{ "object": "list", "has_more": true, "data": [ { "id": "pay_0192f3a1", "object": "payment" } ] }While has_more is true, request the next page with starting_after set to the id of the last item.
curl "https://api.pachapay.io/v1/payments?limit=50&starting_after=pay_0192f3a1" \ -H "Authorization: Bearer $PACHAPAY_KEY"GET /payment-methods, /balances and /webhook-endpoints return a plain { "data": [...] } without paging.
Rate limits
Section titled “Rate limits”Limits apply per API key as a token bucket. The planned defaults, which can change before the first release and are configured per plan:
| Kind | Limit |
|---|---|
| Reads | 100 requests per second |
| Writes | 20 requests per second |
A short burst of up to 2 times the limit is allowed. Other planned limits: 10 active webhook endpoints per project, 256 KB request body.
Every response has these headers:
RateLimit-LimitRateLimit-RemainingRateLimit-Reset
When the limit is exceeded, the API returns 429 rate_limited with Retry-After (seconds). Wait that long before retrying.