> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gomry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Checkout Session

> Retrieve the current state of a checkout session

# Get Checkout Session

Returns a session as currently stored.

<Note>
  Requires `checkout: write` and an allowlisted partner key. **No signature is needed** — a `GET` has no body to sign. Send `API-Version` as on every other checkout call.
</Note>

Sessions are scoped to the API key that created them. A session belonging to another key returns `404 session_not_found`.

## Path Parameters

<ParamField path="checkout_session_id" type="string" required>
  The session id returned at creation.
</ParamField>

## Response

<ResponseField name="id" type="string">Session identifier.</ResponseField>

<ResponseField name="status" type="string">
  `not_ready_for_payment`, `ready_for_payment`, `completed`, or `canceled`.

  <Warning>
    **`completed` means tickets exist.** A succeeded payment with no issued tickets is never reported as `completed` — that would be money taken without a product.
  </Warning>
</ResponseField>

<ResponseField name="buyer" type="object | null">
  <Expandable>
    <ResponseField name="name" type="string">Attendee name.</ResponseField>
    <ResponseField name="email" type="string">Delivery address.</ResponseField>
    <ResponseField name="phone_number" type="string">Optional.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="payment_provider" type="object">
  <Expandable>
    <ResponseField name="provider" type="string">Always `stripe`.</ResponseField>
    <ResponseField name="supported_payment_methods" type="array">Methods accepted for this session.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="currency" type="string">ISO 4217, lowercase.</ResponseField>

<ResponseField name="line_items" type="array">
  <Expandable title="Line item">
    <ResponseField name="id" type="string">Line identifier.</ResponseField>
    <ResponseField name="item" type="object">The requested `{ id, quantity }`.</ResponseField>
    <ResponseField name="base_amount" type="integer">Pre-discount, in **minor units** (cents).</ResponseField>
    <ResponseField name="discount" type="integer">Discount applied.</ResponseField>
    <ResponseField name="subtotal" type="integer">After discount, before tax and fees.</ResponseField>
    <ResponseField name="tax" type="integer">Tax.</ResponseField>
    <ResponseField name="total" type="integer">Line total.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="totals" type="array">
  Ordered rows for display. `type` is one of `items_base_amount`, `items_discount`, `subtotal`, `discount`, `fulfillment`, `tax`, `fee`, `total`; `display_text` is what to show a buyer; `amount` is in minor units.
</ResponseField>

<ResponseField name="fulfillment_options" type="array">
  Always exactly one option — the buyer is not choosing a delivery speed, they are being told how the ticket they already chose will arrive.

  <Expandable title="Option">
    <ResponseField name="type" type="string">
      `digital` or `shipping`. Most tickets are digital, but some externally supplied inventory is a **paper ticket sent by post** — for those, `type` is `shipping` and a `fulfillment_address` is required.
    </ResponseField>

    <ResponseField name="id" type="string">`digital` or `shipping`.</ResponseField>
    <ResponseField name="title" type="string">Display title.</ResponseField>
    <ResponseField name="subtitle" type="string">Display subtitle.</ResponseField>
    <ResponseField name="total" type="integer">Fulfillment cost in minor units.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="fulfillment_option_id" type="string | null">The selected option.</ResponseField>

<ResponseField name="fulfillment_address" type="object | null">Stored address, when one was supplied.</ResponseField>

<ResponseField name="messages" type="array">
  Why the session is not payable, or what to tell the buyer. `type: "error"` blocks payment; `type: "info"` is advisory. See [Checkout Errors](/commerce/errors#blocking-messages-vs-errors).
</ResponseField>

<ResponseField name="links" type="array">
  Seller policy documents. `type` is `terms_of_use`, `privacy_policy`, or `seller_shop_policies`.

  The event page URL is **not** here — that field is for policies, not merchandising. Get the event URL from the [catalog](/api-reference/catalog/get-catalog-event).
</ResponseField>

<ResponseField name="order" type="object">
  Present only once `status` is `completed`.

  <Expandable>
    <ResponseField name="id" type="string">Order identifier.</ResponseField>
    <ResponseField name="checkout_session_id" type="string">This session.</ResponseField>

    <ResponseField name="permalink_url" type="string">
      Where your buyer views what they bought. Openable by the customer with no Gomry login — the same link the confirmation email sends. Safe to surface directly.
    </ResponseField>
  </Expandable>
</ResponseField>

Responses are always `Cache-Control: no-store`. Sessions are per-buyer and must never be shared by a cache.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://www.gomry.com/api/v1/checkout_sessions/acp_sess_AbCdEfGhIjKlMnOpQrSt" \
    -H "X-API-KEY: your_api_key" \
    -H "API-Version: 2025-09-12"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    `https://www.gomry.com/api/v1/checkout_sessions/${sessionId}`,
    {
      headers: {
        "X-API-KEY": process.env.GOMRY_API_KEY,
        "API-Version": "2025-09-12",
      },
    }
  );
  const session = await res.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 completed theme={null}
  {
    "id": "acp_sess_AbCdEfGhIjKlMnOpQrSt",
    "buyer": { "name": "Ada Lovelace", "email": "ada@example.com" },
    "payment_provider": { "provider": "stripe", "supported_payment_methods": ["card"] },
    "status": "completed",
    "currency": "usd",
    "line_items": [
      {
        "id": "li_1",
        "item": { "id": "TktAbCdEfGhIjKlMnOpQ", "quantity": 2 },
        "base_amount": 15800,
        "discount": 0,
        "subtotal": 15800,
        "tax": 0,
        "total": 16790
      }
    ],
    "fulfillment_address": null,
    "fulfillment_option_id": "digital",
    "fulfillment_options": [
      {
        "type": "digital",
        "id": "digital",
        "title": "Digital ticket",
        "subtitle": "Delivered by email",
        "subtotal": 0,
        "tax": 0,
        "total": 0
      }
    ],
    "totals": [
      { "type": "items_base_amount", "display_text": "Tickets", "amount": 15800 },
      { "type": "fee", "display_text": "Service fee", "amount": 990 },
      { "type": "total", "display_text": "Total", "amount": 16790 }
    ],
    "messages": [],
    "links": [{ "type": "terms_of_use", "url": "https://www.gomry.com/terms" }],
    "order": {
      "id": "ord_AbCdEfGhIjKlMnOpQrSt",
      "checkout_session_id": "acp_sess_AbCdEfGhIjKlMnOpQrSt",
      "permalink_url": "https://www.gomry.com/ticket/AbCdEfGhIjKlMnOpQrSt?pk=pay_XyZ123"
    }
  }
  ```
</ResponseExample>
