Accept BLIK payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.
Requirements
Requirement | Description |
---|---|
Integration type | Make sure that you have built your API-only integration. An API-only integration of BLIK works with all versions of Checkout API. For more information, refer to Release notes. |
Setup steps | Before you begin, add BLIK in your test Customer Area. |
Build your payment form for BLIK
To show BLIK in your payment form, you need to:
- Show BLIK as an available payment method.
- Include a field where the shopper can enter the
blikCode
for their corresponding payment.
In your /paymentMethods request, specify:
- countryCode: PL
- amount.currency: PLN
- amount.value: The value of the payment, in minor units.
The response contains paymentMethod.type
: blik. The response contains paymentMethod.type
: blik and storedPaymentMethods.type
: blik (if your shopper already signed up for BLIK One Click in one of the previous BLIK transactions).
Make a payment
In your /payments request, specify:
paymentMethod.type
: blikpaymentMethod.blikCode
: The 6-digitblikCode
that the shopper entered at checkout.
curl https://checkout-test.adyen.com/v68/payments \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "reference":"YOUR_ORDER_NUMBER", "amount":{ "currency":"PLN", "value":1000 }, "paymentMethod":{ "type":"blik", "blikCode":"777987" }, "countryCode":"PL" }'
The /payments response contains:
resultCode
: Pending (The shopper must complete the payment in their BLIK app.)action
: Use this object to display the waiting screen while the shopper completes the payment in their BLIK app.
{ "resultCode": "Pending", "action": { "paymentData": "Ab02b4c0!BQABAg...", "paymentMethodType": "blik", "type": "awaitWait for the webhook to know the payment outcome." }, "paymentData": "Ab02b4c0!BQABAg..." }
Show the waiting screen
- Show a waiting screen to the shopper, telling them you are waiting for them to complete the payment.
- Check your webhooks to see the payment result.
We send you an AUTHORISATION webhook after the shopper completes the payment in their BLIK app. - Once you receive the webhook, redirect them to your website, and present the payment result.
Present the payment result
Use the resultCode
that you received in the /payments response to inform your shopper of the payment status.
The resultCode
values you can receive for payments made through are:
resultCode | Action to take |
---|---|
Pending | Show the waiting screen to the shopper, informing them that they have to go to their bank app to complete the payment. |
Refused | Inform the shopper that the payment is refused, for example, because of incorrect blikCode value. |
Wait for webhooks to know the outcome of the payment. The webhooks you can receive for 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
In order to successfully authorize a BLIK One Click payment in TEST, please use BLIK code 999016.
Important steps:
- Make sure your implementation satisfies BLIK’s guidelines.
- Test your integration end-to-end.
- Add BLIK in your live Customer Area.