{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Authentication & Headers","type":"basic","slug":"authentication","excerpt":"","body":"###Authentication\nEvery API request must be authenticated using a HTTP Basic Authentication header, as follows:\n`Authorization: Basic {Base64 encoding of 'username:password'}`\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Note:\",\n  \"body\": \"Only 1 space is allowed after the \\\"Basic\\\" prefix and before you add the Base64 encoding.  The use of additional spaces results in a transaction failure.\\n\\nFor example:  `Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=`\"\n}\n[/block]\nThe username and password can be found in the Merchant Console, under **Settings > API Settings**. To get your credentials, refer to [API credentials](doc:api-credentials).\n\n###Content type\nEvery Payment API request must specify the relevant content type, as follows:\n* For JSON: `Content-Type: application/json`\n* For XML: `Content-Type: application/xml`\n\n###Version\nIn the Payment API, we support versions 3.0, 2.0, and 1.0. You can specify the API version, as follows:\n`bluesnap-version: 3.0`\nIf you do not specify a version, it is automatically defined for you based on your account settings.\n\nThe differences between versions are as follows:\n* Version 3.0:  Functionality was added to support Multiple ACH accounts for vaulted shoppers.\n* Version 2.0:  Functionality was added to [Create Vaulted Shopper](/v8976-JSON/docs/create-vaulted-shopper) and [Update Vaulted Shopper](/v8976-JSON/docs/update-vaulted-shopper) requests.","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5ed00a7701fdb400214da298","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"API Usage","slug":"payment-api-essentials","order":1,"from_sync":false,"reference":false,"_id":"5ed00a7701fdb400214da260","version":"5ed00a7701fdb400214da2b6","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2015-10-01T16:42:25.324Z","__v":0},"parentDoc":null,"user":"560d5913af97231900938124","project":"57336fd5a6a9c40e00e13a0b","version":{"version":"8976-Basics","version_clean":"8976.0.0-Basics","codename":"3.34.0 Release","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5ed00a7701fdb400214da25f","5ed00a7701fdb400214da260","5ed00a7701fdb400214da261","5ed00a7701fdb400214da262","5ed00a7701fdb400214da263","5ed00a7701fdb400214da264","5beb278ac442ab0213f00990","5ed00a7701fdb400214da265","5c3f542c12c4ac004bc51718","5ed00a7701fdb400214da266","5df806ccecebde0059f17225","5dfa8a8f340c2b007418eb8a","5ed00a7701fdb400214da267","5e597199fd2b0200117c2c1c"],"_id":"5ed00a7701fdb400214da2b6","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5e5d3ad3e9eec8004ca0ac6d","createdAt":"2018-04-23T14:36:48.535Z","releaseDate":"2018-04-23T14:36:48.535Z"},"createdAt":"2015-10-06T17:24:25.002Z","githubsync":"","__v":0}

Authentication & Headers


Authentication

Every API request must be authenticated using a HTTP Basic Authentication header, as follows:
Authorization: Basic {Base64 encoding of 'username:password'}

Note:

Only 1 space is allowed after the "Basic" prefix and before you add the Base64 encoding. The use of additional spaces results in a transaction failure.

For example: Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

The username and password can be found in the Merchant Console, under Settings > API Settings. To get your credentials, refer to API credentials.

Content type

Every Payment API request must specify the relevant content type, as follows:

  • For JSON: Content-Type: application/json
  • For XML: Content-Type: application/xml

Version

In the Payment API, we support versions 3.0, 2.0, and 1.0. You can specify the API version, as follows:
bluesnap-version: 3.0
If you do not specify a version, it is automatically defined for you based on your account settings.

The differences between versions are as follows: