π Error Codes & Troubleshooting
When interacting with the Xixapay API, you may encounter various errors that provide information about issues with your requests. The following table outlines common error codes, their descriptions, potential causes, and suggested solutions.
HTTP Status Code
Error Code
Description
Example Causes
Solution
400 Bad Request
bad_request
The request is malformed or missing required parameters.
- Missing required parameters (e.g., amount
, currency
).
- Invalid JSON format in the request body.
- Review the request body to ensure all required parameters are included. - Validate the JSON format.
401 Unauthorized
unauthorized
The request is missing authentication credentials or the provided API key is invalid.
- Missing Authorization
header.
- Invalid or expired API key.
- Ensure the Authorization
header is correctly set to Bearer YOUR_API_KEY
.
- Regenerate your API key if necessary.
403 Forbidden
forbidden
The server understood the request but refuses to authorize it.
- Insufficient API key permissions. - IP whitelisting restrictions. - Invalid access rights.
- Check the API key permissions. - If using IP whitelisting, ensure your IP is included.
404 Not Found
not_found
The requested resource could not be found.
- Incorrect URL or endpoint. - Resource ID does not exist (e.g., payment, customer).
- Double-check the API endpoint and resource ID. - Verify that the resource exists.
422 Unprocessable Entity
unprocessable_entity
The server understands the request but cannot process it due to invalid or missing data.
- Invalid data (e.g., unsupported payment method).
- Missing or incorrect parameter values (e.g., amount
, currency
).
- Ensure all required fields are correctly formatted and valid. - Check the parameter types and values.
429 Too Many Requests
too_many_requests
Too many requests were made in a short period, exceeding the rate limit.
- Making too many API calls in a short time.
- Implement retry logic with exponential backoff. - Review the API rate limits and adjust the frequency of requests.
500 Internal Server Error
internal_server_error
The server encountered an unexpected condition that prevented it from fulfilling the request.
- Server-side issues or bugs.
- Retry the request after a short wait. - Contact support if the issue persists.
502 Bad Gateway
bad_gateway
The Xixapay API server received an invalid response from an upstream server.
- Temporary issues with third-party payment providers.
- Retry after a short delay. - Contact support if the issue persists.
503 Service Unavailable
service_unavailable
The server is currently unable to handle the request due to temporary overloading or maintenance.
- Temporary server maintenance or overload.
- Retry the request later. - Check the Xixapay status page for any ongoing maintenance or downtime.
Last updated