BLIK (One-Click)
Overview
Availability
BLIK One-Click is currently in limited release and is available to pilot merchants in selected
countries. If you want to participate in the pilot, please
contact us.
- 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 type | Buyer countries | Seller countries | Currency codes | Customer transaction limits | Refunds |
|---|---|---|---|---|---|
| `blik` | Poland | Available globally | PLN | Min: 1.00 PLN, Max: 10,000 PLN | Within 180 days |
Loading the SDK
You will need to load the Client SDK and Local Payments SDK. One way is to load these from external
sources:
- 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>Capturing BLIK One-Click Transactions
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 GraphQL
Note
BLIK One-Click is currently available only through the Javascript Client SDK and various
server-side SDKs.
Example Requests
The client-side implementation of BLIK One-Click is the same as described for
other LPM types
with these caveats:
- 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.
-
The merchant will need to provide an additional
blikOptionsfield in the call tostartPayment. (See below for examples.)
- Callback
- 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.
}
});
};
}- Callback
- 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.
}
});
};
}- 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.