Docs
Status Codes and Error Handling

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 codeDescription
200 OKThe request was successful
400 Bad RequestThe request could not be understood by the server possibly due to malformed syntax.
401 UnauthorizedThe request lacks valid authentication credentials
403 ForbiddenThe authorization token (or user) doesn't have permission to perform the request
404 Not FoundThe specified endpoint could not be found
500 Internal Server ErrorThe 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:

  1. Always check the HTTP status code of the response.
  2. Parse the error message and status code from the response body.
  3. Implement appropriate error handling logic based on the status code.
  4. Provide clear and helpful error messages to your users.
  5. 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.