Error Handling
If a request fails, you will receive an error response with an appropriate HTTP status code and message.
HTTP Status Codes
| Status Code | Description |
|---|---|
| 2xx Success | |
| 200 OK | The request was successful. |
| 201 Created | A new resource was successfully created. |
| 4xx Client Errors | |
| 400 Bad Request | The request was invalid or cannot be processed. |
| 401 Unauthorized | Authentication failed or not provided. |
| 403 Forbidden | Access to the requested resource is denied. |
| 404 Not Found | The requested resource was not found. |
| 5xx Server Errors | |
| 500 Internal Server Error | An error occurred on the server. |
| 502 Bad Gateway | Invalid response from the upstream server. |
| 503 Service Unavailable | The server is temporarily overloaded or under maintenance. |
Error Response Examples
Invalid Phone Number
{
"error": "Invalid phone number format"
}Invalid Transaction ID
{
"error": "Invalid Transaction ID."
}Authentication Failed
{
"error": "Authentication failed, check your API key."
}Server Error
{
"error": "A server-side issue occurred. Please retry your request."
}Last updated on