---
title: "Get Checkout Session"
method: GET
path: "/api/v1/checkout-sessions/{id}"
tags: ["Checkout Sessions", "Purchases"]
---

# Get Checkout Session

`GET /api/v1/checkout-sessions/{id}`

## Path parameters

- `id` string, required

## Response `200`

Successful response

- object
  - `checkoutSession` union, required
    - PurchaseCheckoutSessionRecord
      - `id` string, required
      - `createdAt` integer, required — Epoch milliseconds.
      - `updatedAt` integer, required — Epoch milliseconds.
      - `livemode` boolean, required
      - `pricingModelId` string, required
      - `status` 'open' | 'pending' | 'succeeded' | 'failed' | 'expired', required
      - `billingAddress` BillingAddress
        - `name` string, nullable
        - `firstName` string, nullable
        - `lastName` string, nullable
        - `email` string, email, nullable
        - `address` object, required
          - `name` string, nullable
          - `line1` string, nullable
          - `line2` string, nullable
          - `city` string, nullable
          - `state` string, nullable
          - `postal_code` string, nullable
          - `country` string, required
        - `phone` string, nullable
      - `priceId` string, required
      - `purchaseId` string, required
      - `invoiceId` string, nullable, required
      - `quantity` integer, required
      - `organizationId` string, required
      - `customerName` string, nullable, required
      - `customerEmail` string, nullable, required
      - `customerId` string, nullable, required
      - `paymentMethodType` 'card' | 'link' | 'us_bank_account' | 'sepa_debit', nullable
      - `discountId` string, nullable, required
      - `successUrl` string, uri, nullable
      - `cancelUrl` string, uri, nullable
      - `type` 'purchase', required
      - `preserveBillingCycleAnchor` false
      - `outputMetadata` Metadata — JSON object
      - `outputName` string, nullable, required
      - `targetSubscriptionId` unknown
      - `automaticallyUpdateSubscriptions` unknown
      - `expires` integer, required — Epoch milliseconds.
    - ProductCheckoutSessionRecord
      - `id` string, required
      - `createdAt` integer, required — Epoch milliseconds.
      - `updatedAt` integer, required — Epoch milliseconds.
      - `livemode` boolean, required
      - `pricingModelId` string, required
      - `status` 'open' | 'pending' | 'succeeded' | 'failed' | 'expired', required
      - `billingAddress` BillingAddress
        - `name` string, nullable
        - `firstName` string, nullable
        - `lastName` string, nullable
        - `email` string, email, nullable
        - `address` object, required
          - `name` string, nullable
          - `line1` string, nullable
          - `line2` string, nullable
          - `city` string, nullable
          - `state` string, nullable
          - `postal_code` string, nullable
          - `country` string, required
        - `phone` string, nullable
      - `priceId` string, required
      - `purchaseId` string, nullable, required
      - `invoiceId` unknown
      - `quantity` integer, required
      - `organizationId` string, required
      - `customerName` string, nullable, required
      - `customerEmail` string, nullable, required
      - `customerId` string, nullable, required
      - `paymentMethodType` 'card' | 'link' | 'us_bank_account' | 'sepa_debit', nullable
      - `discountId` string, nullable, required
      - `successUrl` string, uri, nullable
      - `cancelUrl` string, uri, nullable
      - `type` 'product', required
      - `preserveBillingCycleAnchor` boolean — Whether to preserve the billing cycle anchor date in the case that the customer already has an active subscription that renews. If not provided, defaults to false.
      - `outputMetadata` Metadata — JSON object
      - `outputName` string, nullable, required
      - `targetSubscriptionId` unknown
      - `automaticallyUpdateSubscriptions` unknown
      - `expires` integer, required — Epoch milliseconds.
    - AddPaymentMethodCheckoutSessionRecord
      - `id` string, required
      - `createdAt` integer, required — Epoch milliseconds.
      - `updatedAt` integer, required — Epoch milliseconds.
      - `livemode` boolean, required
      - `pricingModelId` string, required
      - `status` 'open' | 'pending' | 'succeeded' | 'failed' | 'expired', required
      - `billingAddress` BillingAddress
        - `name` string, nullable
        - `firstName` string, nullable
        - `lastName` string, nullable
        - `email` string, email, nullable
        - `address` object, required
          - `name` string, nullable
          - `line1` string, nullable
          - `line2` string, nullable
          - `city` string, nullable
          - `state` string, nullable
          - `postal_code` string, nullable
          - `country` string, required
        - `phone` string, nullable
      - `priceId` string, nullable, required
      - `purchaseId` string, nullable, required
      - `invoiceId` string, nullable, required
      - `quantity` integer, required
      - `organizationId` string, required
      - `customerName` string, nullable, required
      - `customerEmail` string, nullable, required
      - `customerId` string, required — The customer that the payment method will be added to as the default payment method.
      - `paymentMethodType` 'card' | 'link' | 'us_bank_account' | 'sepa_debit', nullable
      - `discountId` string, nullable, required
      - `successUrl` string, uri, nullable
      - `cancelUrl` string, uri, nullable
      - `type` 'add_payment_method', required
      - `preserveBillingCycleAnchor` boolean, required
      - `outputMetadata` Metadata — JSON object
      - `outputName` string, nullable, required
      - `targetSubscriptionId` string, nullable — The subscription that the payment method will be added to as the default payment method.
      - `automaticallyUpdateSubscriptions` boolean, nullable — Whether to automatically update all current subscriptions to the new payment method. Defaults to false.
      - `expires` integer, required — Epoch milliseconds.
    - ActivateSubscriptionCheckoutSessionRecord
      - `id` string, required
      - `createdAt` integer, required — Epoch milliseconds.
      - `updatedAt` integer, required — Epoch milliseconds.
      - `livemode` boolean, required
      - `pricingModelId` string, required
      - `status` 'open' | 'pending' | 'succeeded' | 'failed' | 'expired', required
      - `billingAddress` BillingAddress
        - `name` string, nullable
        - `firstName` string, nullable
        - `lastName` string, nullable
        - `email` string, email, nullable
        - `address` object, required
          - `name` string, nullable
          - `line1` string, nullable
          - `line2` string, nullable
          - `city` string, nullable
          - `state` string, nullable
          - `postal_code` string, nullable
          - `country` string, required
        - `phone` string, nullable
      - `priceId` string, nullable, required
      - `purchaseId` unknown
      - `invoiceId` unknown
      - `quantity` integer, required
      - `organizationId` string, required
      - `customerName` string, nullable, required
      - `customerEmail` string, nullable, required
      - `customerId` string, nullable, required
      - `paymentMethodType` 'card' | 'link' | 'us_bank_account' | 'sepa_debit', nullable
      - `discountId` string, nullable, required
      - `successUrl` string, uri, nullable
      - `cancelUrl` string, uri, nullable
      - `type` 'activate_subscription', required
      - `preserveBillingCycleAnchor` boolean — Whether to preserve the billing cycle anchor date in the case that the customer already has an active subscription that renews. If not provided, defaults to false.
      - `outputMetadata` Metadata — JSON object
      - `outputName` string, nullable, required
      - `targetSubscriptionId` string, required
      - `automaticallyUpdateSubscriptions` boolean, nullable, required
      - `expires` integer, required — Epoch milliseconds.
  - `url` string, required — The URL to redirect to complete the purchase

## Other responses

- `400` — Invalid input data
- `401` — Authorization not provided
- `403` — Insufficient access
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/flowglad/apis/flowglad-api-2.md) · [All operations](https://skmtc.net/flowglad/apis/flowglad-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flowglad/flowglad-api-2/versions/c838c92c3606/schema)
