Errors

Our API uses standard HTTP response codes to show whether an API request was successful or if it failed. According to RFC 9457, we return errors in a structured way so you can easily understand what went wrong and how to address it. Below, you'll find information about common errors, their meanings, and tips for resolving them.

Understanding Error Responses

When there's an error, the API responds with a JSON document that provides details about the problem. This helps you identify the issue and correct it. An error response typically includes:

We may also include additional information specific to the error type. These details give you a clearer picture of the issue. If you encounter any extra details you don't recognize, you can safely ignore them. This flexibility allows us to update and provide more information without affecting existing error handling.

HTTP Status Codes

Here are some HTTP status codes you might see:

Handling Errors

Errors on our side, especially those resulting in 500 series responses, are infrequent but can happen. Here's how you can address errors:

For 429 Too Many Requests, consider implementing a delay or a back-off strategy before retrying your request to avoid further limitations.

Example Error Response

Here's an example of a validation error response:

{
  "type": "https://api.superpayments.com/errors/request_validation_error",
  "title": "Bad Request",
  "status": 400,
  "detail": "Request validation failed",
  "instance": "trace-id",
  "errors": [
    {
      "path": "amount",
      "message": "Number must be greater than or equal to 1"
    }
  ]
}

Conclusion

Handling errors effectively is key to a successful integration. By understanding our error messages, including any additional details provided, and familiarizing yourself with common HTTP status codes, your application can better respond to different scenarios. For ongoing issues or further assistance, don't hesitate to contact our support team.