Error Handling
IZZIPAY uses standard HTTP status codes to indicate the success or failure of an API request.
Error Response Format
{
"error": {
"code": "INVALID_AMOUNT",
"message": "Amount must be greater than 0",
"status": 422,
"request_id": "req_abc123",
"details": [
{
"field": "amount",
"message": "Must be a positive integer"
}
]
}
}HTTP Status Codes
Bad Request
The request was malformed or missing required parameters.
Solution: Check your request body and ensure all required fields are provided with correct types.
Unauthorized
Authentication failed — invalid or missing API key/token.
Solution: Verify your API key is correct and the Authorization header is properly formatted.
Forbidden
Your API key does not have permission for this resource.
Solution: Check your key permissions in the dashboard or upgrade your plan for access.
Not Found
The requested resource does not exist.
Solution: Verify the resource ID and endpoint path. The resource may have been deleted.
Conflict
The request conflicts with the current state of the resource.
Solution: The resource may have been modified. Fetch the latest version and retry.
Unprocessable Entity
The request was well-formed but contained semantic errors.
Solution: Check field values meet validation rules (e.g., amounts > 0, valid currencies).
Too Many Requests
You have exceeded the rate limit for your plan.
Solution: Implement exponential backoff. Check the Retry-After header for timing.
Internal Server Error
An unexpected error occurred on our servers.
Solution: Retry with exponential backoff. If persistent, contact support with the request ID.
Rate Limits
| Plan | Requests/min | Requests/day |
|---|---|---|
| Starter | 60 | 1,000 |
| Growth | 600 | 100,000 |
| Enterprise | Unlimited | Unlimited |
Retry Strategy
async function apiCallWithRetry(fn, maxRetries = 3) {
for (let attempt = 0; attempt < maxRetries; attempt++) {
try {
return await fn();
} catch (error) {
if (error.status === 429 || error.status >= 500) {
const delay = Math.pow(2, attempt) * 1000;
await new Promise(resolve => setTimeout(resolve, delay));
continue;
}
throw error;
}
}
throw new Error('Max retries exceeded');
}