API Credentials

Generates API credentials for a merchant after they are approved to process transactions.

Endpoint

https://platform.bluesnap.com/services/2/merchants/api-credentials

Request Content

ParameterRequiredDescription
approvalTestingNoWhen set to true, sends the request in Test Mode.
By default, set to false.
merchantIdYesUnique identifier that BlueSnap assigned to the merchant. Included in the MERCHANT_PARTNER_ONBOARDED webhook that is sent after you submit the merchant application.
usernameNoUsername for the merchant account. When omitted, BlueSnap generates a username and sends it in the response.
passwordNoPassword for the merchant account. When omitted, BlueSnap generates a password and sends it in the response.

Limits:

- Minimum 8 characters
- Maximum 64 characters
dataProtectionKeyNoData Protection Key for the merchant account. When omitted, BlueSnap generates a data protection key and sends it in the response.

The Data Protection Key is required to perform certain functions.

Examples

Requests

curl -v -X POST https://platform.bluesnap.com/services/2/merchants/api-credentials \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
  "merchantId":857345
}
curl -v -X POST https://platform.bluesnap.com/services/2/merchants/api-credentials \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
  "merchantId":857345,
  "username":"MerchantUsername",
  "password":"kjhdA@3aA",
  "dataProtectionKey": "Kru5Y50p"
}
curl -v -X POST https://platform.bluesnap.com/services/2/merchants/api-credentials \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
  "approvalTesting": true,
  "merchantId": 857345,
  "username": "MerchantUsername",
  "password": "kjhdA@3aA",
  "dataProtectionKey": "Kru5Y50p"
}

Responses

{
    "merchantId": 857345,
    "username": "MerchantUsername",
    "password": "kjhdA@3aA",
    "dataProtectionKey": "Kru5Y50p"
}