Resources

Errors & Status

PayNexus error codes, HTTP status references, and troubleshooting guide.

HTTP Status Codes

CodeMeaning
200Success
400Bad Request
401Unauthorized
403Forbidden
404Not Found
422Validation Error
429Rate Limited
500Server Error

Error Response Format

json
{
  "success": false,
  "error": "Validation failed",
  "code": "VALIDATION_FAILED",
  "message": "The amount field must be at least 1."
}

Common Errors

ErrorSolution
"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