BLIK (One-Click)

OverviewAnchorIcon

BLIK is a payment system in Poland that allows users to make instant payments and withdraw cash using only the user's standard mobile banking app. With BLIK One-Click, merchants can offer BLIK as a payment option without the need for a pop-up that redirects consumers to a third-party site. Merchants who implement BLIK One-Click will be able to reuse consumers' payment information on subsequent purchases. To implement BLIK One-Click, they will need to provide the appropriate information on the first transaction, and the separate and appropriate information for all subsequent transactions using this information.
  • Create, verify, and link your PayPal business account in the Braintree Control Panel. In order to process Local Payment Methods, you need to have a valid PayPal business account.
  • Make sure you are using the latest version of the Client SDK.
Payment typeBuyer countriesSeller countriesCurrency codesCustomer transaction limitsRefunds
`blik`PolandAvailable globallyPLNMin: 1.00 PLN, Max: 10,000 PLNWithin 180 days

Loading the SDKAnchorIcon

You will need to load the Client SDK and Local Payments SDK. One way is to load these from external sources:
  1. HTML
<script src="https://js.braintreegateway.com/web/3.141.0/js/client.min.js"></script>
<script src="https://js.braintreegateway.com/web/3.141.0/js/local-payment.min.js"></script>
Other methods of loading SDKs are discussed in the documentation for the Client SDK.

Capturing BLIK One-Click TransactionsAnchorIcon

BLIK One-Click works by circumventing the normal tokenization process. For this reason, merchants must be signed up to receive and process the LPMs webhooks. The merchant will receive the nonce they will need to transact upon through the local_payment_completed webhook.

BLIK One-Click with GraphQLAnchorIcon

Example RequestsAnchorIcon

The client-side implementation of BLIK One-Click is the same as described for other LPM types with these caveats:
  1. No pop-up will be launched, and the merchant will not receive a response with a nonce. The merchant will receive a response with a payment ID that they will need to keep track of in their system.
  2. The merchant will need to provide an additional blikOptions field in the call to startPayment. (See below for examples.)
Implementation: The merchant must provide a 6-digit authorization code. This authorization code is a 6-digit code generated by the Blik-enabled banking app to authenticate a consumer within BLIK. The formats of those transactions are as follows, in the order of first transaction and subsequent transactions. First transaction:
  1. Callback
  2. Promise
function createLocalPaymentClickListener(type) {
    return function (event) {
        event.preventDefault();
        localPaymentInstance.startPayment({
            paymentType: 'blik',
            amount: '10.00',
            currencyCode: 'PLN',
            shippingAddressRequired: true,
            email: '[email protected]',
            phone: '487238725269',
            givenName: 'Joe',
            surname: 'Doe',
            address: {
                streetAddress: 'Mokotowska 34',
                extendedAddress: 'Zlota Jesien 64',
                locality: 'Warsaw',
                postalCode: '02-697',
                countryCode: 'PL'
            },
            blikOptions: {
                oneClick: {
                    aliasLabel: 'the-alias-label',
                    authCode: '123456',
                    consumerReference: 'the-consumer-reference'
                }
            },
            onPaymentStart: function (data) {
                // NOTE: It is critical here to store data.paymentId on your server
                // so it can be mapped to a webhook sent by Braintree once the
                // buyer completes their payment. See Start the payment
                // section for details.
            }
        }, function (startPaymentError) {
            if (startPaymentError) {
                if (startPaymentError.code === 'LOCAL_PAYMENT_POPUP_CLOSED') {
                    console.error('Customer closed Local Payment popup.');
                } else {
                    console.error('Error!', startPaymentError);
                }
            } else {
                // Success! Respond accordingly here.
            }
        });
    };
}
Subsequent transaction:
  1. Callback
  2. Promise
function createLocalPaymentClickListener(type) {
    return function (event) {
        event.preventDefault();
        localPaymentInstance.startPayment({
            paymentType: 'blik',
            amount: '10.00',
            currencyCode: 'PLN',
            shippingAddressRequired: true,
            email: '[email protected]',
            phone: '487238725269',
            givenName: 'Joe',
            surname: 'Doe',
            address: {
                streetAddress: 'Mokotowska 34',
                extendedAddress: 'Zlota Jesien 64',
                locality: 'Warsaw',
                postalCode: '02-697',
                countryCode: 'PL'
            },
            blikOptions: {
                oneClick: {
                    aliasKey: '123456789',
                    consumerReference: 'the-consumer-reference'
                }
            },
            onPaymentStart: function (data) {
                // NOTE: It is critical here to store data.paymentId on your server
                // so it can be mapped to a webhook sent by Braintree once the
                // buyer completes their payment. See Start the payment
                // section for details.
            }
        }, function (startPaymentError) {
            if (startPaymentError) {
                if (startPaymentError.code === 'LOCAL_PAYMENT_POPUP_CLOSED') {
                    console.error('Customer closed Local Payment popup.');
                } else {
                    console.error('Error!', startPaymentError);
                }
            } else {
                // Success! Respond accordingly here.
            }
        });
    };
}
The values of these fields are as follows:
  • aliasLabel: A bank-defined identifier used as a display name to allow the payer to differentiate between multiple registered bank accounts.
  • authCode: a 6-digit code used to authenticate the consumer within BLIK.
  • consumerReference: The merchant-generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant.
  • aliasKey: A Blik-defined identifier for a specific Blik-enabled bank account that is associated with a given merchant. Used only in conjunction with a Consumer Reference.
See the Local Payment Method guide for an overview of other implementation details.