Each merchant account needs unique API credentials. These credentials identify the merchant account when your platform sends payment requests on the merchant’s behalf.
Endpoint
https://platform.bluesnap.com/services/2/merchants/api-credentials
Request Content
| Parameter | Required | Description |
|---|---|---|
merchantId | Yes | Unique identifier BlueSnap assigned to the merchant. This value is included in the MERCHANT_PARTNER_ONBOARDED webhook. |
approvalTesting | No | When set to true, sends the request in test mode. Default is false. |
username | No | Username for the merchant account. When omitted, BlueSnap generates a username and returns it in the response. |
password | No | Password for the merchant account. When omitted, BlueSnap generates a password and returns it in the response. Allowed length is 8-64 characters. |
dataProtectionKey | No | Data Protection Key for the merchant account. When omitted, BlueSnap generates a key and returns it in the response. |
Response
A successful request returns a 200 OK response with the merchant credentials.
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"
}'Responses
{
"merchantId": 857345,
"username": "ABCMerchant",
"password": "kjhdA@3aA",
"dataProtectionKey": "Kru5Y50p"
}{
"merchantId": 857345,
"username": "MerchantUsername",
"password": "kjhdA@3aA",
"dataProtectionKey": "Kru5Y50p"
}