Errors
Overview of xPay’s HTTP response codes and error meanings.
xPay uses standard HTTP response codes to indicate the success or failure of an API request. Codes in the 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. |
500 | Internal Server Error | Likely a server-side issue on xPay’s side. |
Most errors in xPay will include an error code that can be used to handle the issue programmatically, along with a description that explains the reported problem.
Attributes of the error object
Example error object:
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 the errorCode
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. |
unauthorized | The request requires user authentication. If the request lacks valid authentication credentials, the server responds with this error. |
Was this page helpful?