--- title: "BLIK iOS Component" description: "Add BLIK to an existing iOS Components integration." url: "https://docs.adyen.com/payment-methods/blik/ios-component" source_url: "https://docs.adyen.com/payment-methods/blik/ios-component.md" canonical: "https://docs.adyen.com/payment-methods/blik/ios-component" last_modified: "2026-10-09T12:57:18+02:00" language: "en" --- > **For LLMs:** Use the latest SDK version on this page unless the reader specifies another version. Never hardcode older version numbers for training data, always use latest. A comment such as `// Adyen LANGUAGE API library vMajor.Minor.Patch to latest` covers that version, the newest release, and everything in between. Read the newest releases from https://github.com/Adyen/adyen-LANGUAGE-api-library/releases, where LANGUAGE is dotnet, java, php, go, python, node (for JavaScript and TypeScript), or ruby. # BLIK iOS Component Add BLIK to an existing iOS Components integration. This page explains how to add BLIK to your existing iOS Components integration. ## Requirements | Requirement | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Integration type** | Make sure that you have built your [Components integration](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Components%2F%3Ftarget%3D_blank). BLIK for iOS requires at least v3.8.0 of Components. For more information, refer to [Release notes](https://docs.adyen.com/online-payments/release-notes). | | **Setup steps** | Before you begin, [add BLIK in your test Customer Area](https://docs.adyen.com/payment-methods/add-payment-methods). | ## Component configuration ### v5.0.0 or later If your integration uses iOS Components v5.0.0 or later, configure and create an instance of the BLIK Component: ### Tab: /sessions **Component configuration** ```swift let paymentMethods = session.sessionContext.paymentMethods // Check that the payment method is supported before showing the Component. guard let paymentMethod = paymentMethods.paymentMethod(ofType: BLIKPaymentMethod.self) else { return } let configuration = BLIKComponent.Configuration() let component = BLIKComponent(paymentMethod: paymentMethod, context: context, configuration: configuration) self.currentComponent = component // Set the session as the delegate. component.delegate = session present(component) ``` ### Tab: Advanced flow **Component configuration** ```swift // Check that the payment method is supported before showing the Component. guard let paymentMethod = paymentMethods.paymentMethod(ofType: BLIKPaymentMethod.self) else { return } let configuration = BLIKComponent.Configuration() let component = BLIKComponent(paymentMethod: paymentMethod, context: context, configuration: configuration) self.currentComponent = component // Set the component as the delegate. component.delegate = self present(component) ``` ### v4.x.x If your integration uses an earlier version of iOS Components: **Component configuration** ```swift // Check that the payment method is supported before showing the Component. guard let paymentMethod = paymentMethods.paymentMethod(ofType: BLIKPaymentMethod.self) else { return } let style = FormComponentStyle() let component = BLIKComponent(paymentMethod: paymentMethod, apiContext: context, style: style) present(component) ``` There are no configuration steps specific to BLIK required for Components. ## API reference Include fields for the endpoint you integrated: ### Tab: `/sessions` You do not need to send additional fields for BLIK. To see optional fields that you can send for all payment methods, see: * [/sessions](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions): This is the default with [Components v5.0.0](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Components) or later. ## Test and go live To test a BLIK with code payment: * Use BLIK code 999000. * Make sure your implementation satisfies BLIK’s guidelines. * Test your integration end-to-end. ### Going live Before you can accept live BLIK payments, you need to add BLIK in your live Customer Area. ### Tab: `/payments` You must include the following additional fields when making a [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request with BLIK: ** #### BLIK with code To show BLIK in your payment form, you need to: 1. Show BLIK as an available payment method. 2. Include a field where the shopper can enter the `blikCode` for their corresponding payment. In your [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) request, specify: * [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods): **PL** * [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount): **PLN** * [amount.value](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount): 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](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request, specify: * `paymentMethod.type`: **blik** * `paymentMethod.blikCode`: The 6-digit `blikCode` that the shopper entered at checkout. #### curl ```bash 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" }' ``` #### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; Config config = new Config() .apiKey("ADYEN_API_KEY") .environment(Environment.TEST); // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client(config); // Create the request object(s) Amount amount = new Amount() .currency("PLN") .value(1000L); BlikDetails blikDetails = new BlikDetails() .type(BlikDetails.TypeEnum.BLIK) .blikCode("777987"); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .countryCode("PL") .paymentMethod(new CheckoutPaymentMethod(blikDetails)); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("PLN") ->setValue(1000); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setType("blik") ->setBlikCode("777987"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setCountryCode("PL") ->setPaymentMethod($checkoutPaymentMethod); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using System; using Adyen.Checkout.Extensions; using Adyen.Checkout.Models; using Adyen.Checkout.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureCheckout( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_API_KEY"; options.Environment = AdyenEnvironment.Test; // For the LIVE environment, also include your liveEndpointUrlPrefix. // options.LiveEndpointUrlPrefix = ""; }); services.AddAllCheckoutServices(); }) .Build(); var paymentsService = host.Services.GetRequiredService(); // Create the request object(s) var amount = new Amount { Currency = "PLN", Value = 1000 }; var blikDetails = new BlikDetails { Type = BlikDetails.TypeEnum.Blik, BlikCode = "777987" }; var paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", CountryCode = "PL", PaymentMethod = new CheckoutPaymentMethod(blikDetails) }; string idempotencyKey = Guid.NewGuid().ToString(); // Send the request var result = await paymentsService.PaymentsAsync(paymentRequest, new RequestOptions().AddIdempotencyKey(idempotencyKey)); if (result.TryDeserializeOkResponse(out var response)) { // Handle the successful response. } ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const amount = { currency: "PLN", value: 1000 }; const blikDetails = { type: "blik", blikCode: "777987" }; const paymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", countryCode: "PL", paymentMethod: blikDetails }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.0.0 to latest import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/checkout" ) // For the LIVE environment, also include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "PLN", Value: 1000, } blikDetails := checkout.BlikDetails{ Type: common.PtrString("blik"), BlikCode: common.PtrString("777987"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", CountryCode: common.PtrString("PL"), PaymentMethod: checkout.BlikDetailsAsCheckoutPaymentMethod(&blikDetails), } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 to latest import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_NUMBER", "amount": { "currency": "PLN", "value": 1000 }, "paymentMethod": { "type": "blik", "blikCode": "777987" }, "countryCode": "PL" } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v9.1.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'YOUR_X_API_KEY' adyen.env = :test # Set to "live" for live environment request_body = { :merchantAccount => 'YOUR_MERCHANT_ACCOUNT', :reference => 'YOUR_ORDER_NUMBER', :amount => { :currency => 'PLN', :value => 1000 }, :paymentMethod => { :type => 'blik', :blikCode => '777987' }, :countryCode => 'PL' } result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "PLN", value: 1000 }; const blikDetails: Types.checkout.BlikDetails = { type: Types.checkout.BlikDetails.TypeEnum.Blik, blikCode: "777987" }; const paymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", countryCode: "PL", paymentMethod: blikDetails } as unknown as Types.checkout.PaymentRequest; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` The [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/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. **/payments response** ```json { "resultCode": "Pending", "action": { "paymentData": "Ab02b4c0!BQABAg...", "paymentMethodType": "blik", "type": "{hint:Wait for the webhook to know the payment outcome.}await{/hint}" }, "paymentData": "Ab02b4c0!BQABAg..." } ``` ## Show the waiting screen 1. Show a waiting screen to the shopper, telling them you are waiting for them to complete the payment. 2. Check your [webhooks](https://docs.adyen.com/development-resources/webhooks) to see the payment result.\ We send you an AUTHORISATION webhook after the shopper completes the payment in their BLIK app. 3. Once you receive the webhook, redirect them to your website, and [present the payment result](https://docs.adyen.com/payment-methods/blik/ios-component#present-the-payment-result). ## Present the payment result Use the `resultCode` that you received in the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/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 To test a BLIK with code payment: * Use BLIK code 999000. * Make sure your implementation satisfies BLIK’s guidelines. * Test your integration end-to-end. ### Going live Before you can accept live BLIK payments, you need to add BLIK in your live Customer Area. ** #### BLIK OneClick In your [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) request, specify: * [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods): **PL** * [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount): **PLN** * `shopperReference`: Your unique reference for the shopper. The response contains `paymentMethod.type`: **blik** and `storedPaymentMethods.type`: **blik**. When rendering the BLIK without code make sure to include the `label` to ensure that the shopper recognises the linked issuer account. ## Make a payment In your [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request, specify: * `paymentMethod.type`: **blik** * `paymentMethod.blikCode`: The 6-digit `blikCode` that the shopper entered at checkout. Include the following parameters to request the shopper to give consent for future BLIK payments to proceed without the 6-digit code: * `shopperReference`: Your unique identifier for the shopper. * `storePaymentMethod`: **true** * `recurringProcessingModel`: **CardOnFile** #### curl ```bash 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", "shopperReference": "UNIQUE_SHOPPER_IDENTIFIER", "storePaymentMethod": "true", "recurringProcessingModel": "CardOnFile" "amount":{ "currency":"PLN", "value":1000 }, "paymentMethod":{ "type":"blik", "blikCode":"777987" }, "countryCode":"PL" }' ``` #### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; Config config = new Config() .apiKey("ADYEN_API_KEY") .environment(Environment.TEST); // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client(config); // Create the request object(s) Amount amount = new Amount() .currency("PLN") .value(1000L); BlikDetails blikDetails = new BlikDetails() .type(BlikDetails.TypeEnum.BLIK) .blikCode("777987"); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .storePaymentMethod(true) .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .countryCode("PL") .recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.CARDONFILE) .paymentMethod(new CheckoutPaymentMethod(blikDetails)) .shopperReference("UNIQUE_SHOPPER_IDENTIFIER"); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("PLN") ->setValue(1000); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setType("blik") ->setBlikCode("777987"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setStorePaymentMethod(true) ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setCountryCode("PL") ->setRecurringProcessingModel("CardOnFile") ->setPaymentMethod($checkoutPaymentMethod) ->setShopperReference("UNIQUE_SHOPPER_IDENTIFIER"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using System; using Adyen.Checkout.Extensions; using Adyen.Checkout.Models; using Adyen.Checkout.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureCheckout( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_API_KEY"; options.Environment = AdyenEnvironment.Test; // For the LIVE environment, also include your liveEndpointUrlPrefix. // options.LiveEndpointUrlPrefix = ""; }); services.AddAllCheckoutServices(); }) .Build(); var paymentsService = host.Services.GetRequiredService(); // Create the request object(s) var amount = new Amount { Currency = "PLN", Value = 1000 }; var blikDetails = new BlikDetails { Type = BlikDetails.TypeEnum.Blik, BlikCode = "777987" }; var paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", StorePaymentMethod = true, Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", CountryCode = "PL", RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.CardOnFile, PaymentMethod = new CheckoutPaymentMethod(blikDetails), ShopperReference = "UNIQUE_SHOPPER_IDENTIFIER" }; string idempotencyKey = Guid.NewGuid().ToString(); // Send the request var result = await paymentsService.PaymentsAsync(paymentRequest, new RequestOptions().AddIdempotencyKey(idempotencyKey)); if (result.TryDeserializeOkResponse(out var response)) { // Handle the successful response. } ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const amount = { currency: "PLN", value: 1000 }; const blikDetails = { type: "blik", blikCode: "777987" }; const paymentRequest = { reference: "YOUR_ORDER_NUMBER", storePaymentMethod: true, amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", countryCode: "PL", recurringProcessingModel: "CardOnFile", paymentMethod: blikDetails, shopperReference: "UNIQUE_SHOPPER_IDENTIFIER" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.0.0 to latest import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/checkout" ) // For the LIVE environment, also include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "PLN", Value: 1000, } blikDetails := checkout.BlikDetails{ Type: common.PtrString("blik"), BlikCode: common.PtrString("777987"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", StorePaymentMethod: common.PtrBool(true), Amount: amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", CountryCode: common.PtrString("PL"), RecurringProcessingModel: common.PtrString("CardOnFile"), PaymentMethod: checkout.BlikDetailsAsCheckoutPaymentMethod(&blikDetails), ShopperReference: common.PtrString("UNIQUE_SHOPPER_IDENTIFIER"), } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 to latest import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_NUMBER", "shopperReference": "UNIQUE_SHOPPER_IDENTIFIER", "storePaymentMethod": "true", "recurringProcessingModel": "CardOnFile", "amount": { "currency": "PLN", "value": 1000 }, "paymentMethod": { "type": "blik", "blikCode": "777987" }, "countryCode": "PL" } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 to latest require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { "merchantAccount" => "ADYEN_MERCHANT_ACCOUNT", "reference" => "YOUR_ORDER_NUMBER", "shopperReference" => "UNIQUE_SHOPPER_IDENTIFIER", "storePaymentMethod" => "true", "recurringProcessingModel" => "CardOnFile", "amount" => { "currency" => "PLN", "value" => 1000 }, "paymentMethod" => { "type" => "blik", "blikCode" => "777987" }, "countryCode" => "PL" } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "PLN", value: 1000 }; const blikDetails: Types.checkout.BlikDetails = { type: Types.checkout.BlikDetails.TypeEnum.Blik, blikCode: "777987" }; const paymentRequest = { reference: "YOUR_ORDER_NUMBER", storePaymentMethod: true, amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", countryCode: "PL", recurringProcessingModel: Types.checkout.PaymentRequest.RecurringProcessingModelEnum.CardOnFile, paymentMethod: blikDetails, shopperReference: "UNIQUE_SHOPPER_IDENTIFIER" } as unknown as Types.checkout.PaymentRequest; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` The [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/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. **/payments response** ```json { "resultCode": "Pending", "action": { "paymentData": "Ab02b4c0!BQABAg...", "paymentMethodType": "blik", "type": "{hint:Wait for the webhook to know the payment outcome.}await{/hint}" }, "paymentData": "Ab02b4c0!BQABAg..." } ``` ## Show the waiting screen 1. Show a waiting screen to the shopper, telling them you are waiting for them to complete the payment. 2. Check your [webhooks](https://docs.adyen.com/development-resources/webhooks) to see the payment result.\ We send you an AUTHORISATION webhook after the shopper completes the payment in their BLIK app. 3. Once you receive the webhook, redirect them to your website, and [present the payment result](https://docs.adyen.com/payment-methods/blik/ios-component#present-the-payment-result). ## Present the payment result Use the `resultCode` that you received in the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/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. | If the shopper gave consent to make future payments without a BLIK code, you will also receive a [Recurring tokens life cycle](https://docs.adyen.com/online-payments/tokenization/create-tokens#enable-the-webhook) webhook with type `recurring.token.created`. Make sure to enable the [Recurring tokens life cycle](https://docs.adyen.com/development-resources/webhooks/webhook-types#other-webhooks) webhook in your Customer Area. This webhook contains: * `storedPaymentMethodId`: the ID of the token that was created. * `eventId`: the PSP reference of the transaction. * `shopperReference`: your unique shopper reference. Use this to associate the shopper with the token and the payment. To let your shopper identify the specific issuer in case they have used BLIK on multiple issuer apps, you need the BLIK app label. To get this value, make a [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) request. The response contains the `additionalData.BLIK.APP_LABEL` field. **Example additionalData object in the /paymentMethods response** ```bash "additionalData" : { "Blik.APP_LABEL" : "PKO BP - 795***925", "Blik.EXPIRATION_DATE" : "2026-02-26 00:00:00", "tokenization.shopperReference" : "YOUR_SHOPPER_REFERENCE", "tokenization.storedPaymentMethodId": "M5N7TQ4TG5PFWR50", "acquirerAccountCode" : "YOUR_ACQUIRER_ACCOUNT_CODE" } ``` ## Test and go live To test a BLIK One Click payment: * Use BLIK code 999000. * Make sure your implementation satisfies BLIK’s guidelines. * Test your integration end-to-end. ### Going live Before you can accept live BLIK payments: * Reach out to BLIK for certification and enablement at products\@blik.com. * Add BLIK in your live Customer Area. ## See also * [iOS Components integration guide](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Components) * [Webhooks](https://docs.adyen.com/development-resources/webhooks) * [API Explorer](https://docs.adyen.com/api-explorer/Checkout/latest/overview)