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:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per window |
X-RateLimit-Remaining | Remaining requests in window |
X-RateLimit-Reset | Unix timestamp when window resets |
Subscription Plan Limits
| Plan | Monthly Calls | Per Minute | Per Hour | Per Day | Webhooks/Month |
|---|---|---|---|---|---|
| Free Trial | 10,000 | 30 | 1,800 | 43,200 | 0 (no webhooks) |
| Basic | 50,000 | 60 | 3,600 | 86,400 | 1,000 |
| Professional | 200,000 | 120 | 7,200 | 172,800 | 10,000 |
| Enterprise | 1,000,000 | 300 | 18,000 | 432,000 | Unlimited |
Sandbox Limits
Sandbox API keys have strict limits:
| Limit | Value |
|---|---|
| Max payment amount | 50 KES |
| Daily API calls | 30 |
| Test till number | 5374081 |
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.