---
title: "Get checkout session"
method: GET
path: "/checkout/sessions/{id}"
tags: ["Checkout"]
---

# Get checkout session

`GET /checkout/sessions/{id}`

Retrieve a checkout session by ID.

## Path parameters

- `id` string, required

## Response `200`

OK

- CheckoutSessionResponse
  - `action` 'create_subscription'
  - `cancel_url` string
  - `cancelled_at` string, date-time
  - `checkout_invoice_id` string — CheckoutInvoiceID and CheckoutPaymentID are set once the apply step creates the corresponding Flexprice entities (completed sessions only).
  - `checkout_payment_id` string
  - `checkout_status` 'initiated' | 'pending' | 'completed' | 'failed' | 'expired'
  - `completed_at` string, date-time
  - `configuration` TypesCheckoutConfiguration
    - `create_subscription_params` TypesCreateSubscriptionParams
      - `billing_cycle` 'anniversary' | 'calendar'
      - `billing_period` 'MONTHLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY' | 'QUARTERLY' | 'HALF_YEARLY' | 'ONETIME', required
      - `billing_period_count` integer
      - `credit_grants` TypesCheckoutCreditGrant[]
        - `amount` string
        - `currency` string
        - `expires_at` string, date-time
        - `metadata` object
        - `name` string
      - `currency` string, required
      - `end_date` string, date-time
      - `line_items` TypesCheckoutLineItem[]
        - `price_id` string
        - `quantity` integer
      - `lookup_key` string
      - `metadata` object
      - `plan_id` string, required
      - `start_date` string, date-time
      - `subscription_coupons` TypesCheckoutCouponInput[]
        - `coupon_code` string
        - `price_id` string
  - `created_at` string, date-time
  - `created_by` string
  - `customer_id` string
  - `environment_id` string
  - `expires_at` string, date-time — ExpiresAt is required. A Temporal timer fires at this time for any session still in initiated|pending, marking it expired. The caller must create a new session after expiry (expire-and-restart model).
  - `failure_reason` string — FailureReason is a human-readable string set on failed sessions.
  - `failure_url` string
  - `id` string
  - `idempotency_key` string — IdempotencyKey is caller-supplied. It is unique only while the session is active (initiated|pending). The same key may be reused once the session reaches a terminal state (completed|failed|expired).
  - `metadata` object
  - `payment_action` PaymentAction
    - `type` 'checkout_url' | 'payment_link'
    - `url` string
  - `payment_provider` 'stripe'
  - `provider_result` TypesCheckoutProviderResult
    - `create_subscription_result` TypesProviderSubscriptionResult
      - `payment_intent_id` string
      - `session_id` string
      - `session_url` string
  - `result` TypesCheckoutResult
    - `create_subscription_result` TypesCreateSubscriptionResult
      - `invoice_id` string
      - `payment_id` string
      - `subscription_id` string
  - `status` 'published' | 'deleted' | 'archived'
  - `success_url` string — Redirect URLs sent to the payment provider. The provider redirects the user browser to the appropriate URL after the payment flow completes.
  - `tenant_id` string
  - `updated_at` string, date-time
  - `updated_by` string

## Other responses

- `404` — Not found
- `500` — Server error

## Changes

- **2026-06-24** `08e2dac200bb` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/checkout/sessions/:id/get.md)

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.dev/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/revisions/08e2dac200bb/schema)
