Skip to Content
Rate Limiting

Rate Limiting

Gatelithix enforces rate limits to ensure API stability and fair usage across all merchants. Rate limiting is Redis-backed using the GCRA (Generic Cell Rate Algorithm) with graceful degradation — if Redis is unavailable, requests are allowed through rather than blocked.

Rate Limit Tiers

Your rate limit depends on your account tier. All limits are per rolling 1-minute window.

TierLimitScopeDescription
Global1,000/minPer IPPre-authentication limit applied to all requests.
Standard100/minPer API keyDefault tier for all merchants.
Professional500/minPer API keyHigher-volume merchants.
Enterprise2,000/minPer API keyCustom enterprise accounts.

The global (per-IP) limit applies before authentication. After authentication, your API key’s tier limit applies. Contact support via dashboard.paylithix.com  to upgrade your tier.

Response Headers

Every API response includes rate limit headers so you can monitor your usage proactively.

HeaderDescriptionPresent
X-RateLimit-LimitYour tier’s request limit per minute.Always
X-RateLimit-RemainingRequests remaining in the current window.Always
Retry-AfterSeconds to wait before retrying.Only on 429 responses

Example response headers:

HTTP/1.1 200 OK X-RateLimit-Limit: 100 X-RateLimit-Remaining: 87

Handling 429 Responses

When you exceed your rate limit, the API returns a 429 Too Many Requests status with a rate_limit_error body.

Error response:

{ "error": { "type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded. Retry after 12 seconds.", "request_id": "req_abc123def456" } }

Important: Always read the Retry-After header and wait the indicated number of seconds. Do not retry immediately — rapid retries will extend your cooldown period.

Backoff Strategy

When rate limited, use exponential backoff with jitter to avoid thundering herd problems.

Formula:

delay = min(base * 2^attempt + random_jitter, max_delay)
ParameterRecommended Value
Base delay1 second
Maximum delay32 seconds
Jitter range0 — 1 second
Max retries5 attempts

Best Practices

  • Monitor X-RateLimit-Remaining proactively. Throttle your requests before hitting the limit rather than reacting to 429 errors.
  • Batch requests where possible. Combine related operations to reduce total request count.
  • Cache responses client-side. For read operations (e.g., fetching payment status), cache results to avoid redundant API calls.
  • Use exponential backoff with jitter. Never retry immediately after a 429. Jitter prevents multiple clients from retrying in lockstep.
  • Contact support for tier upgrades. If you consistently need more throughput, request a tier upgrade through the dashboard .

Next Steps