{"_id":"5b19742cb3baf90003cab513","category":{"_id":"5b19742cb3baf90003cab4ef","version":"5b19742cb3baf90003cab5ae","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-15T16:21:09.840Z","from_sync":false,"order":7,"slug":"errors","title":"Errors"},"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","parentDoc":null,"version":{"_id":"5b19742cb3baf90003cab5ae","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5adf4e59ac13b80003d23152","createdAt":"2018-04-24T15:33:45.744Z","releaseDate":"2018-04-24T15:33:45.744Z","categories":["5b19742cb3baf90003cab4e8","5b19742cb3baf90003cab4e9","5b19742cb3baf90003cab4ea","5b19742cb3baf90003cab4eb","5b19742cb3baf90003cab4ec","5b19742cb3baf90003cab4ed","5b19742cb3baf90003cab4ee","5b19742cb3baf90003cab4ef","5b19742cb3baf90003cab4f0","5b19742cb3baf90003cab4f1","5b19742cb3baf90003cab4f2"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.26 Release","version_clean":"8976.0.0-Extended","version":"8976-Extended"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-28T14:33:32.694Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"If the API request and response are successful, the API will return one of the following HTTP status codes:\n  * **200**: when a new resource is created and returned in the body of the response\n  * **201**: when a new resource is created and the URL to it is returned in the header (typically as a “Location\" parameter)\n  * **204**: when an update resource is successful but nothing is returned in the body or header\n\n</br> \nOtherwise, the API will return one of the following error types:\n\n###HTTP 500 errors\nIf an unexpected error occurs in the BlueSnap system, the API will send an error with HTTP 500 status code. Please contact BlueSnap merchant support at [merchants:::at:::bluesnap.com](mailto:merchants@bluesnap.com) if you need further assistance or information regarding an HTTP 500 error.\n\n###HTTP 403 error\nWhen 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](/docs/pci-compliance).\n\n###HTTP 400 errors\nIf 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:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<messages xmlns=\\\"http://ws.plimus.com\\\">\\n  <message>\\n    <error-name>{ERROR_NAME}</error-name>\\n    <code>{BLUESNAP_ERROR_CODE}</code>\\n    <description>{GENERAL_DESCRIPTION_OF_THE_ERROR}</description>\\n  </message>\\n</messages>\",\n      \"language\": \"xml\",\n      \"name\": \"Error message format\"\n    }\n  ]\n}\n[/block]\nFor reference, see the following error lists:\n  * [General errors](doc:general-errors) \n  * [Payment & processor errors](doc:payment-errors) \n  * [Shopper errors](doc:shopper-errors) \n  * [Catalog errors](doc:catalog-errors) \n  * [Fraud errors](doc:fraud-errors)\n  * [Hosted Payment Field errors](/v8976-Tools/docs/hosted-payment-field-errors)\n  * [Wallet errors](/v8976-Tools/docs/wallet-errors)","excerpt":"","slug":"error-handling-overview","type":"basic","title":"Error Handling Overview"}

Error Handling Overview


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 at merchants@bluesnap.com if you need further assistance or information regarding an HTTP 500 error.

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>