If the API request and response are successful, the Payment 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 to a resource is successful but nothing is returned in the body or header
Otherwise, the API returns 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 429 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. API user roles depend on your SAQ level, as described in PCI compliance. HTTP 403 is also returned if a merchant tries to access a resource (shopper, transaction or other) that does not exist, or if the API call has been blocked by BlueSnap’s security defenses for suspected malicious content.
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: