Errors

It's crucial to implement robust error handling logic to manage unexpected scenarios and provide clear, informative feedback to users or client applications. Our industry standard error codes are lined out below.

If you’re unsure why you’re receiving errors, send us your query and we’ll help you to get a successful response.

Invalid Input Errors
🔴
400 Bad Request

If your request contains invalid parameters or is improperly formatted, the API will return a 400 Bad Request error. To handle this error, validate the input parameters before making the request and provide clear error messages to the user indicating the nature of the issue.

Authentication Errors
🔴
401 Unauthorised

If your request lacks proper authentication credentials (such as an invalid or missing API key), the API will return a 401 Unauthorized error. To handle this error, prompt the user to provide valid authentication credentials or retry the request with the correct credentials.

Any invalid IDs will also return authentications errors. In order to protect against malicious use, we do not want to validate whether an ID exists outside of a user’s scope.

Permission Errors
🔴
403 Forbidden

If you attempt to access resources or perform actions for which you do not have sufficient permissions, the API will return a 403 Forbidden error. To handle this error, ensure that the user has the necessary permissions to perform the requested action, and if not, prompt them to contact the administrator or request the required permissions.

The error could also indicate that the requested functionality is not fully implemented in our subsystems, either in Risk Management or Alternative Banking Solutions. In that case, the message would state:

This endpoint is not supported for Risk Management Entities

This endpoint is not supported for Alternative Banking Solutions Entities

Resource Not Found Errors
🔴
404 Not Found

If the requested resource does not exist or cannot be found, the API will return a 404 Not Found error. To handle this error, verify that the resource URL is correct and exists within the API's scope. If the resource does not exist, provide appropriate feedback to the user.

Duplication Conflict
🔴
409 Conflict

The client's request could not be processed because it encountered a conflict or was already processed earlier. A conflict occurs when two or more API requests are processed simultaneously and this can result in duplicates or undesirable states. We are using Idempotency-Key to protect system from duplicate payments.

Rate Limit Errors
🔴
429 Too Many Requests

If you exceed the rate limit for API requests, the API will return a 429 Too Many Requests error. To handle this error, implement rate limiting on your end to ensure that you do not exceed the allowed number of requests within the specified time frame. You can also implement backoff strategies such as exponential backoff to retry failed requests after a certain delay.

See our rate limit documentation here.

Internal Server Errors
🔴
5xx Server Errors

If the API encounters an unexpected error on the server side, it will return a 5xx Server Error. To handle this error, retry the request after a short delay. If the error persists, contact our support team for assistance.

Summary

By handling these errors effectively, you can ensure a reliable experience when using our API Service. Remember to provide clear error messages to users and implement appropriate error handling mechanisms in your application to handle different error scenarios gracefully.