Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

BLIK Drop-in

Learn how to accept BLIK payments.

Our Web Drop-in renders BLIK in your payment form, and presents the waiting screen while the shopper completes the payment in their bank app.

BLIK is supported from Drop-in version 3.9.0 and later. For more information, refer to Release notes.

Before you begin

This page explains how to add BLIK to your existing Web Drop-in integration. The Web Drop-in integration works the same way for all payment methods. If you haven't done this integration yet, refer to our Drop-in integration guide.

Before starting your BLIK integration:

  1. Make sure that you have set up your back end implementation, and added Drop-in to your payments form.
  2. Add BLIK in your Customer Area.

Show BLIK in your payment form

Drop-in uses the countryCode and the amount.currency from your /paymentMethods request to show the available payment methods to your shopper.

To show BLIK in your payment form, specify in your /paymentMethods request:

Make a payment

When the shopper selects to pay, Drop-in calls the onSubmit event, which contains a state.data.

  1. Pass the state.data to your server.

  2. From your server, make a POST /payments request, specifying:

    • paymentMethod: The state.data.paymentMethod from the onSubmit event from your front end.
    curl https://checkout-test.adyen.com/v68/payments \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
      "reference":"YOUR_ORDER_NUMBER",
      "amount":{
        "currency":"PLN",
        "value":1000
      },
      "{hint:state.data.paymentMethod from onSubmit}paymentMethod{/hint}":{
        "type":"blik",
        "blikCode":"777987"
      },
      "countryCode" : "PL"
    }'
    # Set your X-API-KEY with the API key from the Customer Area.
    adyen = Adyen::Client.new
    adyen.api_key = "YOUR_X-API-KEY"
     
    response = adyen.checkout.payments({
      :amount => {
        :currency => "PLN",
        :value => 1000
      },
      :reference => "YOUR_ORDER_NUMBER",
      :paymentMethod => {
        :type => "blik",
        :blikCode => "777987"
      },
      :countryCode => "PL",
      :merchantAccount => "YOUR_MERCHANT_ACCOUNT"
    })
    // Set your X-API-KEY with the API key from the Customer Area.
    $client = new \Adyen\Client();
    $client->setXApiKey("YOUR_X-API-KEY");
    $service = new \Adyen\Service\Checkout($client);
    
    $params = array(
      "amount" => array(
        "currency" => "PLN",
        "value" => 1000
      ),
      "reference" => "YOUR_ORDER_NUMBER",
      "paymentMethod" => array(
        "type" => "blik",
        "blikCode" => "777987"
      ),
      "countryCode" => "PL",
      "merchantAccount" => "YOUR_MERCHANT_ACCOUNT"
    );
    $result = $service->payments($params);
    #Set your X-API-KEY with the API key from the Customer Area.
    adyen = Adyen.Adyen()
    adyen.client.xapikey = 'YOUR_X-API-KEY'
    
    result = adyen.checkout.payments({
       'amount': {
          'value': 1000,
          'currency': 'PLN'
       },
       'reference': 'YOUR_ORDER_NUMBER',
       'paymentMethod': {
          'type': 'blik',
          'blikCode': '777987'
       },
       'countryCode': 'PL',
       'merchantAccount': 'YOUR_MERCHANT_ACCOUNT'
    })
    // Set your X-API-KEY with the API key from the Customer Area.
    const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
    const config = new Config();
    // Set your X-API-KEY with the API key from the Customer Area.
    config.apiKey = '[API_KEY]';
    config.merchantAccount = '[YOUR_MERCHANT_ACCOUNT]';
    const client = new Client({ config });
    client.setEnvironment("TEST");
    const checkout = new CheckoutAPI(client);
    checkout.payments({
        amount: { currency: "PLN", value: 1000 },
        paymentMethod: {
            type: 'blik',
            blikCode: '777987'
        },
        countryCode: "PL",
        reference: "YOUR_ORDER_NUMBER",
        merchantAccount: config.merchantAccount
    }).then(res => res);

    The /payments response contains:

    • resultCode: Pending.
    • action: Use this object in the next step to display the waiting screen while the shopper completes the payment in their BLIK app.
    /payments response
      {
          "resultCode": "Pending",
          "action": {
              "paymentData": "Ab02b4c0!BQABAg...",
              "paymentMethodType": "blik",
              "type": "await"
          },
          "paymentData": "Ab02b4c0!BQABAg..."
      }.
      }
  3. Pass the action object to your front end. Drop-in needs the action object to show the waiting screen to the shopper while they complete the payment in their bank app.

Show the waiting screen

Use dropin.handleAction(action) with the action object from the /payments response to show the waiting screen on your frontend. During this time, the shopper uses their bank app to complete the payment.

In the background, Drop-in checks the status of the payment and calls onAdditionalDetails.

Check the payment result

To check the payment result, use the state.data object from the corresponding event handler:

  • onAdditionalDetailsfor successful payments.
  • onError for unsuccessful or timed out payments.

From your server, make a POST /payments/details request with:

  • details: the state.data.details from the onAdditionalDetails or onError event.
  • paymentData: the state.data.paymentData from the onAdditionalDetails or onError event.
/payments/details request
{
  "{hint:state.data.details from onAdditionalDetails or onError}details{/hint}": {
    "redirectResult": "X6XtfGC3!Y..."
  },
  "{hint:state.data.paymentData from onAdditionalDetails or on Error}paymentData{/hint}": "Ab02b4c0!BQABAgCX79JLFTqePTGTb..."
}

You receive a response containing:

  • additionalData: Object containing the value and currency for the payment.
  • pspReference: Our unique identifier for the transaction.
  • resultCode: Authorised for successful payments or Refused for unsuccessful or timed-out payments. Use this to present the payment result to your shopper.
/payments/details response
{
  "additionalData":
  {
    "authorisedAmountCurrency": "PLN",
    "authorisedAmountValue": "1000"
  },
  "pspReference": "88154795347618C",
  "resultCode": "Authorised"
}

Present the payment result

Use the resultCode from the /payments/details response to show the payment outcome on your frontend.
You will also receive the outcome of the payment asynchronously in a webhook.
The resultCode values you can receive for BLIK are:

resultCode Description Action to take
Authorised The payment was successful. Inform the shopper that the payment has been successful.
You will receive the funds in 2-3 days.
Error There was an error when the payment was being processed. Inform the shopper that there was an error processing their payment. The response contains a refusalReason, indicating the cause of the error.
Pending or
Received
The shopper has completed the payment but the final result is not yet known. It may take minutes or hours for the payments network to confirm this. Inform the shopper that you've received their order, and are waiting for the payment to be completed.
You will receive the final result of the payment in an AUTHORISATION webhook.
Refused The payment was refused by the shopper's bank. Ask the shopper to try the payment again using a different payment method.

The webhooks you can receive for BLIK are:

eventCode success field Description Action to take
AUTHORISATION false The transaction failed. Cancel the order and inform the shopper that the payment failed.
AUTHORISATION true The shopper successfully completed the payment. Inform the shopper that the payment has been successful and proceed with the order.

Test and go live

To test BLIK, you can use any 6-digit blikCode that starts with 777.
You can test different refused payment result scenarios by using the following amounts in your /payments request:

Refusal reason Amount
ALIAS_DECLINED 288.00
TAS_DECLINED 192.00
USER_DECLINED 144.00
SEC_DECLINED 216.00
SYSTEM_ERROR 264.00
GENERAL_ERROR 360.00
INSUFFICIENT_FUNDS 120.00
TIMEOUT 312.00
LIMIT_EXCEEDED 96.00
USER_TIMEOUT 336.00
ISSUER_DECLINED 9.99

You can check the status of BLIK test payments in your Customer Area > Transactions > Payments.

Before you can accept live BLIK payments, you need to add BLIK in your live Customer Area.

See also