Test Merchant Setup

Test how your platform submits merchant applications, receives onboarding status updates, and generates merchant API credentials before moving on to payment processing.

Before going live, repeat this full flow using production configuration and real merchant data.

📘

Testing Document Uploads

If your platform uses platform-managed document requests and uploads documents to BlueSnap by API, work with your BlueSnap implementation team before testing document uploads. Document upload testing is limited and must be coordinated with BlueSnap. Your implementation team can help you run a controlled test using the correct merchant application, document request case, and underwriting setup.

The Testing Process

A complete embedded payments flow has four major testing areas:

  1. Test the merchant application flow
  2. Test onboarding status webhooks
  3. Test merchant API credential generation
  4. Test payment processing

1. Test the Merchant Application Flow

Testing the merchant application is different depending on which onboarding method your platform uses.

BlueSnap-Hosted Application

Testing is more limited when your platform uses a BlueSnap-hosted application flow.

Do not submit test merchant data through a hosted application unless your BlueSnap implementation team has coordinated the test. Hosted applications may be treated as real applications, and invalid merchant data can cause underwriting to decline the application.

Work with your BlueSnap implementation team to run a controlled test. BlueSnap can help ensure the appropriate underwriting and implementation teams know the application is for testing and can support the flow you need to validate.

API Application

Before going live, use the New Application API approvalTesting property to test how your platform handles different merchant application outcomes.

Each approvalTesting value simulates a different review result and triggers a MERCHANT_PARTNER_ONBOARDED webhook. This lets you test your application submission flow and onboarding webhook handling without waiting for a real merchant review.

ValueSimulated Outcome
APPROVEDMerchant application is approved for processing and payout. BlueSnap returns a merchant ID, which you can use to create API credentials for the sandbox account.
RECOMMEND_APPROVEMerchant application is approved for processing, but payout approval is still pending. BlueSnap returns a merchant ID, which you can use to create API credentials for the sandbox account. BlueSnap sends another webhook when the merchant is approved for payout.
RECOMMEND_DECLINEMerchant is not approved for processing or payout. BlueSnap sends another webhook if the merchant is later approved.
DECLINEMerchant application is declined. BlueSnap does not send additional approval webhooks.

To test an outcome, add approvalTesting as a top-level property in a complete New Application API request. The example below shows where to add approvalTesting, but your request must still include all required fields for the New Application API.

{
  "approvalTesting": "APPROVED",
  "businessInfo": {
    "...": "Required business information"
  },
  "bankingInfo": {
    "...": "Required banking information"
  },
  "ownershipInfoArr": [
    {
      "...": "Required owner information"
    }
  ],
  "companyRep": {
    "...": "Required company representative information"
  },
  "merchantAgreementsSign": {
    "...": "Required agreement information"
  }
}

When BlueSnap processes the request, it sends a MERCHANT_PARTNER_ONBOARDED webhook for the simulated outcome.

transactionType=MERCHANT_PARTNER_ONBOARDED&merchantId=13224446&sandboxId=1165743&payoutStatus=Y&accountCanProcess=Y&merchantName="Business Name"

Use this test to confirm that your platform can:

  1. Submit a New Application API request successfully.
  2. Receive the MERCHANT_PARTNER_ONBOARDED webhook.
  3. Store the returned merchantId and sandboxId.
  4. Map accountCanProcess and payoutStatus to the correct merchant status in your system.

White-Labeled Hosted Application

If your platform uses the white-label hosted application flow, use the Create Hosted Application API to test merchant application outcomes.

Set merchantInfo.approvalTesting to the outcome you want to simulate. Each value triggers a MERCHANT_PARTNER_ONBOARDED webhook for the corresponding application status.

Use this flow when your platform launches merchant applications through BlueSnap’s white-label hosted application instead of submitting the full application payload through the New Application API.

ValueSimulated Outcome
APPROVEDMerchant application is approved for processing and payout. BlueSnap returns a merchant ID, which you can use to create API credentials for the sandbox account.
RECOMMEND_APPROVEMerchant application is approved for processing, but payout approval is still pending. BlueSnap returns a merchant ID, which you can use to create API credentials for the sandbox account. BlueSnap sends another webhook when the merchant is approved for payout.
RECOMMEND_DECLINEMerchant is not approved for processing or payout. BlueSnap sends another webhook if the merchant is later approved.
DECLINEMerchant application is declined. BlueSnap does not send additional approval webhooks.
curl -v -X POST https://platform.bluesnap.com/services/2/merchants/partner-side-initiated-submission \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
  -d '{
    "successUrl": "https://example.com/success",
    "returnUrl": "https://example.com/return",
    "refreshUrl": "https://example.com/refresh",
    "merchantInfo": {
      "email": "[email protected]",
      "approvalTesting": "APPROVED"
    }
  }'

When BlueSnap processes the request, it sends a MERCHANT_PARTNER_ONBOARDED webhook for the simulated outcome.

transactionType=MERCHANT_PARTNER_ONBOARDED&merchantId=13224446&sandboxId=1165743&payoutStatus=Y&accountCanProcess=Y&merchantName="Merchant Name"

Use this test to confirm that your platform can:

  1. Create or launch the white-label hosted application.
  2. Simulate merchant application review outcomes.
  3. Receive the MERCHANT_PARTNER_ONBOARDED webhook.
  4. Store the returned merchantId and sandboxId.
  5. Map accountCanProcess and payoutStatus to the correct merchant status in your system.

2. Test Onboarding Status Webhooks

Use this test to confirm that your platform can receive the MERCHANT_PARTNER_ONBOARDED webhook and update the merchant’s onboarding status.

BlueSnap sends this webhook after a merchant application outcome is available. Your platform uses the webhook fields to determine whether the merchant can process payments, receive payouts, and continue technical setup.

transactionType=MERCHANT_PARTNER_ONBOARDED&merchantId=13224446&sandboxId=1165743&payoutStatus=Y&accountCanProcess=Y&merchantName="Business Name"

When your platform receives the webhook:

  1. Store the webhook event.
  2. Match the event to the merchant in your platform.
  3. Store both merchantId and sandboxId.
  4. Update the merchant’s processing status using accountCanProcess.
  5. Update the merchant’s payout status using payoutStatus.
  6. Create merchant API credentials only when accountCanProcess=Y.

3. Test Merchant API Credential Generation

Use this test to confirm that your platform can call the API Credentials endpoint in test mode, handle the response, store merchant credentials securely, and associate the credentials with the correct merchant.

📘

Important

For test-mode credential generation, use the merchantId returned from a simulated application approval in Step 1. A merchantId from a non-testing application flow will not work with approvalTesting = true.

In the API Credentials request, set approvalTesting to true. This will simulate the credential generation request and response without generating production API credentials for the merchant.

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"
  }'
{
  "merchantId": 857345,
  "username": "ABCMerchant",
  "password": "kjhdA@3aA",
  "dataProtectionKey": "Kru5Y50p"
}

Use this test to confirm that your platform can:

  1. Use the merchantId from the simulated onboarding webhook.
  2. Call the API Credentials endpoint in test mode.
  3. Handle a successful credential generation response.
  4. Store the returned username, password, and dataProtectionKey securely.
  5. Associate the credentials with the correct merchant record.
  6. Base64-encode the username:password pair for merchant API authentication.
  7. Enable payment processing only after the correct merchant credentials are created and stored.

4. Test Payment Processing

After merchant API credentials are generated, continue to Processing Payments to test Payment API requests for that merchant.

📘

To run Payment API calls, your platform needs merchant API credentials for the merchant account being tested.