Status Codes and Error Handling
The Splice Payment API uses standard HTTP status codes to indicate the success or failure of API requests. This guide will help you understand and handle errors effectively in your applications.
HTTP Status Codes
Status code | Description |
---|---|
200 OK | The request was successful |
400 Bad Request | The request could not be understood by the server possibly due to malformed syntax. |
401 Unauthorized | The request lacks valid authentication credentials |
403 Forbidden | The authorization token (or user) doesn't have permission to perform the request |
404 Not Found | The specified endpoint could not be found |
500 Internal Server Error | The server encountered an unexpected condition that prevented it from fulfilling the request |
Handling Errors
When working with the Splice Payment API, it's important to implement proper error handling in your applications. Here are some best practices:
- Always check the HTTP status code of the response.
- Parse the error message and status code from the response body.
- Implement appropriate error handling logic based on the status code.
- Provide clear and helpful error messages to your users.
- Log errors for debugging and monitoring purposes.
By properly handling errors, you can create a more robust and user-friendly application that gracefully manages API issues and provides a better experience for your users.
Next steps
You may now start interacting with our sandbox and exploring the rest of the endpoints here: API Reference
We’re excited to have you onboard and can’t wait to see how you leverage our API to facilitate cross-border payments. If you have any questions or need assistance, our support team is here to help.
You can reach out to us on email support@splice.africa or join our Discord server. We are always online and happy to help.