Resources

Rate Limits

PayNexus enforces rate limits to ensure fair usage and system stability. Limits vary by subscription plan.

Rate Limit Response

When rate limit is exceeded, you receive:

json
{
  "success": false,
  "error": "rate_limit_exceeded",
  "code": "RATE_LIMIT",
  "message": "Too many requests. Please try again later.",
  "retry_after": 60
}

Response Headers

All responses include rate limit headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRemaining requests in window
X-RateLimit-ResetUnix timestamp when window resets

Subscription Plan Limits

Plan Monthly Calls Per Minute Per Hour Per Day Webhooks/Month
Free Trial10,000301,80043,2000 (no webhooks)
Basic50,000603,60086,4001,000
Professional200,0001207,200172,80010,000
Enterprise1,000,00030018,000432,000Unlimited

Sandbox Limits

Sandbox API keys have strict limits:

LimitValue
Max payment amount50 KES
Daily API calls30
Test till number5374081

Best Practices

Cache responses

Cache responses when possible to reduce API calls.

Implement exponential backoff

If you receive a 429 response, wait and retry with exponential backoff.

Use public keys for reads

Use public keys for read operations to preserve secret key limits.

Monitor remaining quota

Monitor the X-RateLimit-Remaining header.