HTTP Status Codes
Errors are returned using standard HTTP error code, the following error codes are supported by the API
Name | Description |
---|---|
400 | Bad request. Client supplied invalid input. |
401 | Unauthorized. In this case WWW-Authenticate response header contains the allowed authorization schemes. |
403 | Forbidden. Unsupported version of client application is contacting the API. Update client application to fix this. |
404 | NotFound. This happens when the resource does not exist or the user does not have the permission to access the resource. |
405 | MethodNotAllowed. Request HTTP method not expected. |
406 | NotAcceptable. Client is trying to execute not allowed action. |
412 | PreconditionFailed. For example user does not have enough funds to make a transaction. |
419 | Authentication token expired. Re-authenticate the user to fix this. |
423 | Account Locked. This happens if the user exceeded the number of incorrect authentication attempts. |
500 | InternalServerError. See the additional info in the response body. |
When an error is generated both a 'code' and 'message' is returned to describe the fault this in addition to the HTTP status code.
Refer to Fault Response Codes for a full list of Fault Response Codes
{
"code": "4018840",
"details": {
"message": "Merchant id must be 3 characters long"
}
}
Updated almost 7 years ago