BeSafe Pay follows the REST convention to deal with HTTP error codes. All the successful requests are returned with code 2xx, in case of validation errors (missing information, invalid types, etc..) the 4xx error is returned.
The 5xx error code is used only when our server fails to execute your request (some internal problems).
Code | Meaning |
---|---|
200 | Everything looks good |
400 | Validation error, your request does not meet our validation criteria. |
401 | The given API key is not valid |
403 | The given API key is not valid |
409 | The request has some conflict (ex: you are using the same order id for two different transactions) |
429 | Too many request. |
5xx | Our server failed in the execution of your request. |
All of the errors are returned in JSON format
{
"code": "401",
"message": "Invalid API key",
"key": "invalid_api_key"
}