Pay a Checkout Session
Processing a BLIK Payment
Notifications, often referred to as webhooks, provide a mechanism for applications to receive real-time updates about To process a BLIK payment, display BLIK as an available payment method on your system’s payment page. Include a dedicated field where the payer can enter their 6-digit BLIK code. Once the payer submits the form, verify if the response returns a 2XX status:events. Within this API, webhooks are used to inform your server about a range of events, including transactions, refunds, or card tokenization, allowing your system to react promptly to these occurrences.
If the checkout session status is "open": Inform the payer that the system is waiting for payment confirmation. The payer will receive a push notification from their bank’s mobile app to confirm the payment. You will be notified of the transaction status through a webhook. Refer to the Checkout Session Webhook Events Specification section for more details.
If the checkout session status is "completed": The payment has been successfully processed, and no waiting page is required.
Note:
BLIK transactions typically take 40 to 90 seconds to complete. If you do not receive a webhook notification within this time, prompt the customer to re-enter their BLIK code.
Arguments
id
The ID of the Checkout Session
blik_code
The blik code
GET
https://{provided url}/v1/checkout/sessions/:id/pay
curl https://{provided url}/v1/checkout/sessions/2AW-kLcRRC5P8U68CYe0kVA/pay \
-u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
-d blik_code=123456
The above event type returns JSON structured like this:
{
"id": "AW-kLcRRC5P8U68CYe0kVA",
"amount_total": 1000,
"amount_sub_total": 1000,
"amount_refunded": 0,
"currency": "pln",
"cancel_url": "",
"customer_firstname": "John",
"customer_lastname": "Doe",
"customer_email": "[email protected]",
"customer_phone": "",
"expire_at": null,
"success_url": "",
"payment_method_types": ["blik"],
"locale": "",
"url": "https://{provided url}/pay/2AW-kLcRRC5P8U68CYe0kVA",
"fees": null,
"metadata": null,
"refunds": [],
"refunded": false,
"status": "open",
"livemode": false
}
Last updated