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).

CodeMeaning
200Everything looks good
400Validation error, your request does not meet our validation criteria.
401The given API key is not valid
403The given API key is not valid
409The request has some conflict (ex: you are using the same order id for two different transactions)
429Too many request.
5xxOur 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"
}