When the server returns an error (4xx or 5xx), the response may include a JSON document in the body. This document is an object with the keys http_status_code
and errors
. The http_status_code
field is a http response code and errors
may contain one or multiple errors with keys code
and description
. The codes
can be added or removed in the future. The description
field is a human-readable description of the error and may changed at any time.
Not all errors include a JSON body. An error, which typically happen outside of our web service request handling code will not include a JSON. You should check the http response before attempting to decode the body as JSON.
In addition to the errors documented below, client code should also be prepared to handle any valid HTTP 4xx, 5xx or any other status codes.
Error | Code | Description |
---|---|---|
INTERNAL_ERROR | 500 | The server responded with internal error. for more information contact us. |
HTTP_METHOD_INVALID | 405 | The HTTP method you are tying to communicate with API is allowed. |
SIGNATURE_REQUIRED | 401 | You have not supplied Signature header. |
API_KEY_REQUIRED | 401 | You have not supplied Api-Key header. |
API_KEY_INVALID | 401 | You have not supplied a valid Api-Key . |
API_KEY_DISABLED | 401 | The Api-Key you have supplied is disabled. for more information contact us. |
SIGNATURE_INVALID | 401 | The Signature you have supplied is invalid. |
INSUFFICIENT_FUNDS | 402 | The Api-Key you have supplied does not have sufficient funds to use this service. contact us to purchase service credits. |
XXXXXXXX_REQUIRED | 400 | You haven't supplied xxxxxxxx, which is a required field. |
XXXXXXXX_INVALID | 400 | You have supplied xxxxxxxx is not valid. |
XXXXXXXX_NOT_FOUND | 400 | The resource(xxxxxxxx) you are looking for doesn't exist or not found. |
PROFILE_EXIST | 400 | A profile associated with email_address and mobile_number is already exist. |
FEATURE_REQUIRED | 400 | At least one feature should be 1 (required) or 2 (optional). All features are currently set to 0 (not required). |
CUSTOM_APPLICATION_NOT_FOUND | 400 | You have provided custom_application as required/optional. Which needs to be set under Authified Dashboard Settings Merchant Custom APP or here. |
{
"http_status_code": 401,
"errors": [
{
"code": "",
"description": ""
}
]
}
{
"http_status_code": 401,
"errors": [
{
"code": "",
"description": ""
}
]
}
{
"http_status_code": 401,
"errors": [
{
"code": "",
"description": ""
}
]
}
{
"http_status_code": 401,
"errors": [
{
"code": "",
"description": ""
}
]
}
{
"http_status_code": 401,
"errors": [
{
"code": "",
"description": ""
}
]
}
{
"http_status_code": 401,
"errors": [
{
"code": "",
"description": ""
}
]
}