2xx range signify success. Codes in the 4xx range indicate client-side errors based on the information provided. Codes in the 5xx range indicate errors related to xPay’s servers.
Below is the list of HTTP status codes
| Code | Reason | Potential Root Cause |
|---|---|---|
200 | Request is OK | The request was successfully received and processed. |
400 | Bad Request | There’s something wrong about the request. Potentially incorrect parameters, insufficient parameters, or an issue with authentication. |
401 | Unauthorized | You do not have access to the requested resource or your API keys are incorrect. |
404 | Resource Not Found | You’re likely hitting the wrong endpoint or the resource does not exist. |
429 | Too Many Requests | You have exceeded the rate limit. Please slow down your request rate. See Rate Limits for more details. |
500 | Internal Server Error | Likely a server-side issue on xPay’s side. |
Attributes of the error object
Example error object:HTTP Status Code: 500
A unique code representing the type of error that occurred. This code is used to identify specific issues and facilitate troubleshooting.
A detailed message explaining the error represented by the error code. This description provides additional context to help understand the cause of the error.
Error codes
Below is a list of error codes that xPay may return in theerrorCode field, along with information on how to resolve them.
| Error Code | Description |
|---|---|
internal_server_error | Indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. |
bad_request | The server cannot or will not process the request due to a client error (e.g., malformed request syntax). |
resource_not_found | The server can’t find the requested resource, which could mean the URL is incorrect or the resource has been removed. |
rate_limit_exceeded | You have exceeded the rate limit. Please slow down your request rate and implement proper retry mechanisms. See Rate Limits for more details. |
unauthorized | The request requires user authentication. If the request lacks valid authentication credentials, the server responds with this error. |