# Retrieve a Checkout Session

## Arguments

| Parameter | Description                                    |
| --------- | ---------------------------------------------- |
| id        | The ID of the Checkout Session to be retrieved |

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

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

```
curl https://{provided url}/v1/checkout/sessions/2AW-kLcRRC5P8U68CYe0kVA \
  -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
```

{% endtab %}
{% endtabs %}

## Response Fields

| **Field**              | **Type** | **Description**                                                                                                 |
| ---------------------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `id`                   | string   | Unique identifier for the object.                                                                               |
| `amount_total`         | int      | Total amount after discounts and fees are applied.                                                              |
| `amount_subtotal`      | int      | Total amount before discounts or fees are applied.                                                              |
| `amount_refunded`      | int      | The total amount that has been refunded from the checkout session..                                             |
| `currency`             | string   | Three-letter ISO currency code (ISO-4217). Must be a supported currency.                                        |
| `success_url`          | string   | The URL to which the application should send customers when the checkout session is completed.                  |
| `cancel_url`           | string   | If set, checkout displays a back button and the customer will be redirected to this URL if they cancel payment. |
| `customer_firstname`   | string   | Customer’s first name.                                                                                          |
| `customer_lastname`    | string   | Customer’s last name.                                                                                           |
| `customer_email`       | string   | Customer’s email.                                                                                               |
| `customer_ip`          | string   | Customer’s IP address.                                                                                          |
| `expires_at`           | int      | The timestamp at which the Session will expire.                                                                 |
| `locale`               | string   | The IETF language tag of the locale Checkout is displayed in. If blank, the browser’s locale is used.           |
| `payment_method_types` | list     | A list of the types of payment methods the Checkout Session is allowed to accept. Possible values: blik         |
| `metadata`             | hash     | A set of key-value pairs attached to a payout object. Useful for storing additional information.                |
| `created_at`           | int      | The timestamp at which the Session was created.                                                                 |
| `status`               | enum     | The status of the charge: "open", "pending", "expired", or "completed".                                         |
| `fees`                 | list     | The list of discounts or fees applied to the Checkout Session.                                                  |
| `refunds`              | list     | A list of refunds associated with the Checkout Session.                                                         |
| `refunded`             | bool     | Indicates whether the session has been fully refunded (true if fully refunded).                                 |
| `livemode`             | bool     | True if the object exists in live mode, false if in test mode.                                                  |

## Example JSON Response

```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",
	"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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
