> For the complete documentation index, see [llms.txt](https://developer.convergegate.com/legacy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.convergegate.com/legacy/apm-checkout-blik/pay-a-checkout-session.md).

# 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**](/legacy/apm-checkout-blik/webhoook-event-notification.md) section for more details.<br>
* **If the checkout session status is "completed":**\
  \
  The payment has been successfully processed, and no waiting page is required.

{% hint style="info" %}

## 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.
{% endhint %}

## Arguments <a href="#arguments-9" id="arguments-9"></a>

| Parameter  | Description                    |
| ---------- | ------------------------------ |
| id         | The ID of the Checkout Session |
| blik\_code | The blik code                  |

<mark style="color:green;">**`GET`**</mark>  `https://{provided url}/v1/checkout/sessions/:id/pay`

{% tabs %}
{% tab title="CURL" %}

```curl
curl https://{provided url}/v1/checkout/sessions/2AW-kLcRRC5P8U68CYe0kVA/pay \
  -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
  -d blik_code=123456
```

{% endtab %}
{% endtabs %}

The above event type returns JSON structured like this:

```json
{
	"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": "john@example.com",
	"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
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.convergegate.com/legacy/apm-checkout-blik/pay-a-checkout-session.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
