If the API request and response are successful, the API will return one of the following HTTP status codes:
- 200: when a new resource is created and returned in the body of the response
- 201: when a new resource is created and the URL to it is returned in the header (typically as a “Location" parameter)
- 204: when an update resource is successful but nothing is returned in the body or header
Otherwise, the API will return one of the following error types.
HTTP 500 errors
If an unexpected error occurs in the BlueSnap system, the API will send an error with HTTP 500 status code. Please contact BlueSnap Merchant Support, if you need further assistance or information regarding an HTTP 500 error.
HTTP 503 and 423 errors
These HTTP error codes are returned when a merchant exceeds the authorized thresholds for API calls to the BlueSnap system, or if a specific service has reached its maximum allowed limits of calls. One of the messages below is also returned to further indicate the specific threshold reached:
- Client request rate is too high
- Client request concurrency is too high
- Request rate for service is too high
- Request concurrency to specific service is too high
- Service is temporarily unavailable
HTTP 403 error
When an API user does not have the required role (authorization) to perform a specific operation, the API returns an error with HTTP 403 status code and the error name USER_NOT_AUTHORIZED. API user roles depend on your SAQ level, as described in PCI compliance.
HTTP 400 errors
If the request contains invalid data or the acquirer/processor has an issue with processing the transaction, the API will send an error with HTTP 400 status code, and an error message in XML format in the body of the response. In most cases, these errors are formatted as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<messages xmlns="http://ws.plimus.com">
<message>
<error-name>{ERROR_NAME}</error-name>
<code>{BLUESNAP_ERROR_CODE}</code>
<description>{GENERAL_DESCRIPTION_OF_THE_ERROR}</description>
</message>
</messages>
For reference, see the following error lists: