Resources
Errors & Status
PayNexus error codes, HTTP status references, and troubleshooting guide.
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 422 | Validation Error |
| 429 | Rate Limited |
| 500 | Server Error |
Error Response Format
json
{
"success": false,
"error": "Validation failed",
"code": "VALIDATION_FAILED",
"message": "The amount field must be at least 1."
}
Common Errors
| Error | Solution |
|---|---|
| "Unauthorized" | Check API key is active |
| "Insufficient permissions" | Use Secret Key for write operations |
| "Invalid phone number" | Validate phone via /mpesa/validate-phone |
| "No active M-Pesa payment account" | Configure payment account in dashboard |