📘

Please note, that this payment method is available only in Poland.

Blik is one of the most popular payment methods in Poland allowing users to make instant payments with their banking application covered by all major Polish banks.

Initiate a Sale transaction

In the first step you POST a transaction request to the Gateway's /payments endpoint including all mandatory elements as per below table.

ElementDescription
requestTypeThe only allowed requestType for Blik is "ApmSaleTransaction"
paymentMethod.type "BLIK" is the only value for this payment method
consumerDataIntegration data provided by the payer, e.g. Blik code submitted as item/value pair
BLIK_CODE represents the one-time code or Alias indispensable to carry out authorisation of BLIK Transaction or customer authentication
integrationDataThe integration data from the external application, e.g. regularly optional values, which for this payment method are mandatory. Can be used during integration, or to allow generic parameter loading with a data-protected opt-in policy.
PAYER_IP represents the IP address of the customer's device that was used during online shopping
USER_AGENT represents the user agent of customer's internet browser used during online shopping

The following JSON document represent an example of a "Sale" request with all mandatory elements:

{
    "requestType": "ApmSaleTransaction",
    "transactionAmount": {
        "total": "5555.00",
        "currency": "PLN"
    },
  "transactionOrigin": "ECOM",
    "paymentMethod": {
        "type": "BLIK"
    },
    "consumerData": [
        {   "item": "BLIK_CODE",
            "value": "777777"
        }
    ],
    "integrationData": [
        {   "item": "PAYER_IP",
            "value": "1.1.1.1"
        },
        {
            "item": "USER_AGENT",
            "value": "test"
        }
    ]
}

The following JSON document represents an example of a response with "WAITING" status you receive from the Gateway:

{

    "clientRequestId": "2838649",
    "apiTraceId": "ZMpHBCmxUEQ-RxNiohOIwAAAAyA",
    "ipgTransactionId": "84445406339",
    "orderId": "R-508ebe24-2859-4abe-a471-01b69e8f6a27",
    "paymentToken": {
        "reusable": true,
        "declineDuplicates": false
    },
    "transactionTime": 1690978056,
    "transactionAmount": {
        "total": 5555.00,
        "currency": "PLN",
        "components": {}
    },
    "transactionStatus": "WAITING",
    "approvalCode": "?:waiting BLIK",
    "processor": {
        "referenceNumber": "74901428441",
        "responseCode": "0",
        "responseMessage": "SUCCESS"
    }
}

In cases where you omitted to send all mandatory information, the issuer may send a hint what information they missed in the original request, as shown on a JSON example below.

{
    "clientRequestId": "2838649",
    "apiTraceId": "ZMptRkCmPXET10OgEWePtwAAAZ8",
    "ipgTransactionId": "84445447370",
    "orderId": "R-dba239b9-6654-4725-9077-94d82ad7863c",
    "paymentToken": {
        "reusable": true,
        "declineDuplicates": false
    },
    "transactionTime": 1690987846,
    "transactionStatus": "WAITING",
    "approvalCode": "?:waiting BLIK",
    "requiredActions": {
        "requiredConsumerData": [
            {
                "hint": "Your 6-digit Blik Code will be provided in your Android/Iphone Blik application, and allows Blik to later inquire your confirmation on the current payment",
                "validationExpression": "^\\d{6}$",
                "key": "BLIK_CODE",
                "options": []
            }
        ]
    }
}

In cases where your account has been configured with "Transaction Notification Feed" service, you will receive a notification once the status of the transaction has been updated.

Please contact your support team to enable your store for the 'Transaction Notification Feed' service.

You can also check the processing status individually by submitting a GET request to the .../payments/ endpoint including referenced "ipgTransactionId", e.g. GET .../payments/84445447370

In case the initial transaction has been approved, you will receive the response as on an example below:

{
    "clientRequestId": "2838649",
    "apiTraceId": "ZMpbceq0MmItPQFbQT9X5QAAAK0",
    "ipgTransactionId": "84445425891",
    "orderId": "R-dcfd788a-00c6-42b4-9ac9-d68140dfac46",
    "paymentToken": {
        "reusable": true,
        "declineDuplicates": false
    },
    "transactionTime": 1690983271,
    "approvedAmount": {
        "total": 5555,
        "currency": "PLN",
        "components": {
            "subtotal": 5555
        }
    },
    "transactionAmount": {
        "total": 5555,
        "currency": "PLN",
        "components": {
            "subtotal": 5555
        }
    },
    "transactionResult": "APPROVED",
    "approvalCode": "Y:0:4445425891:PP X:74902486733",
    "transactionState": "CAPTURED",
    "processor": {
        "referenceNumber": "74902486733",
        "authorizationCode": "0",
        "responseCode": "0",
        "responseMessage": "SUCCESS"
    }
}

Blik Recurring

Blik offers 2 recurring models:

  • Model A - recurring transaction authorized by the issuer automatically (without consumer's confirmation in the app), for a fixed amount and frequency, until the expiration date.
    Automatic Authorization is executed after the issuer verifies that the authorization request meets the criteria specified when creating the recurring request.
  • Model M - recurring transaction where the consumer's confirmation is required through their mobile app. Transactions may vary in amount and frequency. The validity of a recurring schedule may have a specified date or be set as indefinite/until cancelled.

Initial Recurring Payment / Alias Registration

For initiating a recurring payment the following set of elements must be submitted in API request:

ElementDescription
requestTypeThe only allowed requestType for Blik is "ApmSaleTransaction"
paymentMethod.type "BLIK" is the only value for this payment method
paymentMethod.paymentTokenMandatory parameter for recurring schedule registration; depending on the type, it may be a visible identifier or in the case of sensitive data – an SHA256 abbreviation.
consumerDataIntegration data provided by the payer, e.g. Blik code submitted as item/value pair
"BLIK_CODE" represents the one-time code or Alias indispensable to carry out authorisation of BLIK Transaction or customer authentication
integrationDataThe integration data from the external application, e.g. regularly optional values, which for this payment method are mandatory. Can be used during integration, or to allow generic parameter loading with a data-protected opt-in policy.
PAYER_IPrepresents the IP address of the customer's device that was used during online shopping
USER_AGENTrepresents the user agent of customer's internet browser used during online shopping
ALIAS_TYPE with fixed value = "PAYID"
ALIAS_LABELmandatory parameter represents the label you assign to the recurring plan, e.g. Standard plan
RECURRING_MANDATORY - defines whether the Issuer should block the possibility for consumer to overwrite suggested criteria of automatic authorisation.
Set this parameter to "true" is always required for initiating a recurring schedule for Model A
RECURRING_EXPIRATION_DATE - recurring schedule expiry date, in date.time format, e.g.: 2024-02-17T00:00:00.000+01:00
RECURRING_LIMIT_AMOUNT - maximum amount of a single recurring transaction; mandatory for Model A
RECURRING_TOTAL_LIMIT_AMOUNT- total maximum amount of all recurring transactions; mandatory for Model A
RECURRING_LIMIT_IS_FIXED- can be set to 'true' or 'false', depends on which recurring Model is used; mandatory for Model A
RECURRING_REFUSE_NO_PAYID - defines whether transaction, that exclusively aim at initiating registration of the PAYID Alias, if setup to 'true' and in case the issuer does not process PAYID aliases, BLIK will decline the transaction with error_code= ER_PAIYD_UNHANDLED
RECURRING_FREQUENCY- represents the frequency and date when the recurring payment is expected to be performed; string, minLength: 4, maxLength: 6, exp: [1-9][DWMQY][ANP]([0-9] {1,2,3}; example: 1MAE; required for Model A
Format description:
The first character defines the length of the period in terms of measurement units defined by means of the second field. Permissible characters: [1-9]
The second character defines the payment unit: D – daily, W – weekly, M – monthly, Q – quarterly, Y – annually.
The third character defines the ’day type’ of the payment:
A – the selected day regardless whether that is a day off or not according to the calendar
N – the next working day if the selected day of the period is a day off according to the calendar
P – the previous working day if the selected day of the period is a day off according to the calendar
W – transactions only on working days
The fourth (and the fifth, and the sixth) character defines the day on which the first recurring transaction will be initiated, calculated from the day of sending the invitation to create/update the recurring payment (0=the same day, 1= the subsequent day, etc). Permissible characters: [0-9] or E means the end of a given period.

The following JSON document represents an example of the initial Recurring transaction:

{
    "requestType": "ApmSaleTransaction",
    "transactionAmount": {
        "total": "0.08",
        "currency": "PLN"
    },
    "transactionOrigin": "ECOM",
    "paymentMethod": {
        "type": "BLIK",
        "paymentToken": "3027d7ec-0eee-61ee-be56-0242ac120002"
    },
    "consumerData": [
        {
            "item": "BLIK_CODE",
            "value": "777155"
        }
    ],
    "integrationData": [
        {
            "item": "PAYER_IP",
            "value": "1.1.1.1"
        },
        {
            "item": "USER_AGENT",
            "value": "test"
        },
        {
            "item": "RECURRING_EXPIRATION_DATE",
            "value": "2024-02-17T00:00:00.000+01:00"
        },
        {
            "item": "ALIAS_TYPE",
            "value": "PAYID"
        },
        {
            "item": "ALIAS_LABEL",
            "value": "Standard plan"
        },
        {
            "item": "RECURRING_FREQUENCY",
            "value": "1MA0"
        },
        {
            "item": "RECURRING_LIMIT_AMOUNT",
            "value": "29.90"
        },
        {
            "item": "RECURRING_TOTAL_LIMIT_AMOUNT",
            "value": "358.8"
        },
        {
            "item": "RECURRING_LIMIT_IS_FIXED",
            "value": "true"
        },
        {
            "item": "RECURRING_MANDATORY",
            "value": "false"
        },
        {
            "item": "RECURRING_REFUSE_NO_PAYID",
            "value": "true"
        }
    ]
}

The response and further processing is handled in the same way as a standalone BLIK transaction. The following JSON document represents an example of a response in "WAITING" status you will receive after initiating the first recurring transaction:

{

    "clientRequestId": "2838649",
    "apiTraceId": "ZNTp5N7qFK9N8PXeceiMfgAAAzk",
    "ipgTransactionId": "84634090501",
    "orderId": "R-d7630dd3-9e0e-4af5-801d-6c0d2e6d0217",
    "paymentToken": {
        "value": "3027d7ec-0eee-61ee-be56-0242ac120002",
        "reusable": true,
        "declineDuplicates": false
    },
    "transactionTime": 1691675108,
    "transactionAmount": {
        "total": 0.08,
        "currency": "PLN",
        "components": {}
    },
    "transactionStatus": "WAITING",
    "approvalCode": "?:waiting BLIK",
    "processor": {
        "referenceNumber": "75064577388",
        "responseCode": "0",
        "responseMessage": "SUCCESS"
    }
}

In cases where your account has been configured with "Transaction Notification Feed" service, you will receive a notification once the status of the transaction has been updated.

Please contact your support team to enable your store for the 'Transaction Notification Feed' service.

You can also check the processing status individually by submitting a GET request to the .../payments/ endpoint including referenced "ipgTransactionId", e.g. GET .../payments/{ipgTransactionId}

Once the transaction has been completed successfully, Alias has been registered.

Recurring Payment

After successful registration you can initiate a recurring payment with including following mandatory parameters.

ElementDescription
requestTypeThe only allowed requestType for Blik is "ApmSaleTransaction"
paymentMethod.type "BLIK" is the only value for this payment method
paymentTokenstring, 64max, e.g. 3e9ae06e-26df-11ee-be56-0242ac120002
In order to submit BLIK Alias authorisation request the parameter paymentMethod.paymentTokenmust be submitted. You will receive this value in the API response from previous step (Alias registration) in paymentToken.value response parameter.
integrationDataThe integration data from the external application, e.g. regularly optional values, which for this payment method are mandatory. Can be used during integration, or to allow generic parameter loading with a data-protected opt-in policy.
ALIAS_LABEL represents the label you assign to your Alias
RECURRING_NO_DELAY defines whether the issuer should send back the authorisation response without the need to wait until the authorisation's cut off time

The following JSON document represents an example of a recurring transaction:

{

    "requestType": "ApmSaleTransaction",
    "transactionAmount": {
        "total": "19.90",
        "currency": "PLN"
    },
  "transactionOrigin": "ECOM",
    "paymentMethod": {
        "type": "BLIK",
        "paymentToken": "c2ae59f6-0e90-11ee-be56-0242ac120002"
    },
    "integrationData": [
        {
            "item": "ALIAS_LABEL",
            "value": "Subscription month 1"
        },
        {
            "item": "RECURRING_NO_DELAY",
            "value": "true"
        }
    ]
}

The transaction is processed through "WAITING" status in the same way as in previous steps.

In cases, where the Alias registration has not been successful, you will be advised in the API response about missing information as on example below.

{
    "clientRequestId": "2838649",
    "apiTraceId": "ZNUKYw7pghrV7cZiK9eqpwAAA9A",
    "ipgTransactionId": "84446538810",
    "orderId": "R-e47beb62-03a2-423e-9e62-df5ae8677173",
    "paymentToken": {
        "reusable": true,
        "declineDuplicates": false
    },
    "transactionTime": 1691683428,
    "transactionStatus": "WAITING",
    "approvalCode": "?:waiting BLIK",
    "requiredActions": {
        "requiredConsumerData": [
            {
                "hint": "Your 6-digit Blik Code will be provided in your Android/Iphone Blik application, and allows Blik to later inquire your confirmation on the current payment",
                "validationExpression": "^\\d{6}$",
                "key": "BLIK_CODE",
                "options": []
            }
        ],
        "requiredIntegrationData": [
            {
                "hint": "Alias Type.",
                "key": "ALIAS_TYPE"
            }
        ]
    }
}

Blik One-Click Payments

Alias Registration

With Blik's One-Click functionality you can skip Blik code authentication step and use an Alias/token for your future payments instead.

In the first step you need to register your customer's information under an Alias (token), so that in the future no further customer authentication with a Blik code is necessary.

It is required to submit the following mandatory parameters in the registration request:

ElementDescription
requestTypeThe only allowed requestType for Blik is "ApmSaleTransaction"
paymentMethod.type "BLIK" is the only value for this payment method
paymentTokenstring, 64max, e.g. 3e9ae06e-26df-11ee-be56-0242ac120002
In order to submit BLIK Alias authorisation request the parameter paymentMethod.paymentTokenmust be submitted. Depending on the type, it may be a visible identifier or in the case of sensitive data – SHA256 abbreviation.
consumerDataIntegration data provided by the payer, e.g. Blik code submitted as item/value pair
BLIK_CODE represents the one-time code or Alias indispensable to carry out authorisation of BLIK Transaction or customer authentication
integrationDataThe integration data from the external application, e.g. regularly optional values, which for this payment method are mandatory. Can be used during integration, or to allow generic parameter loading with a data-protected opt-in policy.
ALIAS_TYPE The enumeration contains the value "UID"
ALIAS_LABEL represents the label you assign to your Alias
PAYER_IP represents the IP address of the customer's device that was used during online shopping
USER_AGENT represents the user agent of customer's internet browser used during online shopping

The following JSON document represents an example of a Alias/token registration with mandatory set of elements:

{

    "requestType": "ApmSaleTransaction",
    "transactionAmount": {
        "total": "0.04",
        "currency": "PLN"
    },
    "transactionOrigin": "ECOM",
    "paymentMethod": {
        "type": "BLIK",
        "paymentToken": "3e9ae06e-26df-11ee-be56-0242ac120002"
    },
    "consumerData": [
        {
            "item": "BLIK_CODE",
            "value": "777158"
        }
    ],
   "integrationData": [
        {
            "item": "ALIAS_TYPE",
            "value": "UID"
        },
        {
            "item": "ALIAS_LABEL",
            "value": "OneCLick Alias 1"
        },
        {
            "item": "PAYER_IP",
            "value": "1.1.1.1"
        },
        {
            "item": "USER_AGENT",
            "value": "test"
        }
    ]
}

The response is handled as for a standard Blik Sale transaction (described above).

One-Click Payment

Any following payment after successfully completed Alias registration does not require a Blik Code to be submitted in a transaction request.

Please use the following mandatory parameters while making an API request for One-Click payment:

ElementDescription
requestTypeThe only allowed requestType for Blik is "ApmSaleTransaction"
paymentMethod.type "BLIK" is the only value for this payment method
paymentTokenstring, 64max, e.g. 3e9ae06e-26df-11ee-be56-0242ac120002
In order to submit BLIK Alias authorisation request the parameter paymentMethod.paymentTokenmust be submitted. Depending on the type, it may be a visible identifier or in the case of sensitive data – SHA256 abbreviation.
integrationDataThe integration data from the external application, e.g. regularly optional values, which for this payment method are mandatory. Can be used during integration, or to allow generic parameter loading with a data-protected opt-in policy.
ALIAS_LABEL represents the label you assign to your Alias

The following JSON document represents an example of a One-Click payment after previously registered Alias ID:

{
    "requestType": "ApmSaleTransaction",
    "transactionAmount": {
        "total": "2.33",
        "currency": "PLN"
    },
    "transactionOrigin": "ECOM",
    "paymentMethod": {
        "type": "BLIK",
        "paymentToken": "3e9ae06e-26df-11ee-be56-0242ac120002"
    },
    "integrationData": [
        {
            "item": "ALIAS_LABEL",
            "value": "1-CLICK"
        }
    ]
}

The processing is handled as for a standard Blik Sale transaction (described above).

Delete Alias

You can also unregister or delete Alias if needed by using DELETE endpoint and submitting your Alias/token ID together with storeID: DELETE https://ipg-online.com/ipgrestapi/v2/services/payment-tokens/{TokenID}?payment-method=BLIK&{storeId}

DELETE https://ipg-online.com/ipgrestapi/v2/services/payment-tokens/262c1182-2604-11ee-be56-0242ac120002?payment-method=BLIK&storeId=760995000


Want a quick overview?