Rate Limit
Overview
The Appmax API limits a single route: the order lookup, GET /v1/orders/{order_id}. The other routes have no request limit.
Limit
| Route | Limit | Counted per |
|---|---|---|
GET /v1/orders/{order_id} | 100 requests per minute | merchant client_id |
The window is sliding: on each request, the API counts the ones from the last 60 seconds. There is no full minute that resets the counter.
INFO
The limit exists to keep the platform stable, but it can be adjusted. If your integration needs a higher limit, reach out to our team.
Response when the limit is exceeded
The request gets HTTP 429:
http
HTTP/1.1 429 Too Many Requests
Content-Type: application/jsonjson
{
"message": "Too Many Requests"
}WARNING
The response carries no rate limit headers (Retry-After, X-RateLimit-*). Pace control has to live in your integration.
Best practices
- Use webhooks to follow the order. Instead of querying the same order at short intervals (polling), receive status changes through webhooks and query the order only when you need its details.
- Control the pace on your side. Keep at most 100 order lookups per minute per
client_id, spread across the minute. - Implement retry with exponential backoff. On a
429, wait (1s, 2s, 4s, 8s...) and try again, with a maximum number of attempts.
Retry with backoff example
go
func requestWithRetry(client *http.Client, req *http.Request) (*http.Response, error) {
maxRetries := 3
for attempt := 0; attempt <= maxRetries; attempt++ {
resp, err := client.Do(req)
if err != nil {
return nil, err
}
if resp.StatusCode != http.StatusTooManyRequests {
return resp, nil
}
resp.Body.Close()
wait := 1 << attempt // backoff: 1s, 2s, 4s
log.Printf("Rate limited, retrying in %ds (attempt %d/%d)", wait, attempt+1, maxRetries)
time.Sleep(time.Duration(wait) * time.Second)
}
return nil, fmt.Errorf("rate limit exceeded after %d retries", maxRetries)
}