Errors

Learn about our error codes and how to resolve them.

When you make an API request, errors can occur due to authentication failures, invalid input, or processing issues. It's important to handle these errors properly by understanding their structure, status codes, and related messages. You can explore the details below.

Error Structure

If there’s an issue with your request, the API returns a 4XX or 5XX HTTP status code along with a structured error response. This response includes information about what went wrong.

{
    "status": "failed",
    "error": {
        "type": "REQUEST_NOT_VALID",
        "code": "10400",
        "message": "Invalid card number",
        "validation_errors": []
    }
}

The general structure of the error contains:

ParameterDefinitionExample
statusIndicates the outcome of the request.failed
error.typeDescribes the category of the error, such as validation, authentication, or processing issues.REQUEST_NOT_VALID
error.codeA unique identifier for the error. Useful for debugging and custom error handling.10400
error.messageA short message that explains the error.Invalid card number
error.validation_errorsA list of specific validation errors, usually provided when there are issues with the input data.[{ "field": "card_number", "message": "Card number is required" }]

General error codes

When a request fails, it returns an error code to help identify the issue and guide troubleshooting. Below is a list of common error codes, their meanings, and potential causes:

CodeError TypeDefinitionPossible cause
10400REQUEST_NOT_VALIDThe request was rejected due to invalid parameters or missing data.Malformed request, missing parameters, or invalid JSON payload.
10401UNAUTHORIZATIONThe request requires authentication or has invalid credentials.Missing API key, expired token, or incorrect credentials.
10403FORBIDDENThe client does not have permission to access the resource.Insufficient privileges or access restrictions.
10404RESOURCE_NOT_FOUNDThe requested resource could not be found on the server.Nonexistent endpoint, incorrect URL, or deleted resource.
10409RESOURCE_CONFLICTA conflict occurred due to duplicate or conflicting data.Attempt to create an existing resource or version conflict.
10422UNPROCESSABLEThe request was well-formed but contained invalid data.Failed validation due to incorrect or incomplete fields.
10500INTERNAL_SERVER_ERRORAn unexpected server error occurred while processing the request.System failure or unhandled exceptions.