Stripe · Schema

Session

A Checkout Session represents your customer's session as they pay for one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a new Session each time your customer attempts to pay. Once payment is successful, the Checkout Session will contain a reference to the [Customer](https://stripe.com/docs/api/customers), and either the successful [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active [Subscription](https://stripe.com/docs/api/subscriptions). You can create a Checkout Session on your server and redirect to its URL to begin Checkout. Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)

CommerceFinancial ServicesFintechPaymentsT1StripeAgentic CommercePoint-of-SalePayment Processing

Properties

Name Type Description
after_expiration object When set, provides configuration for actions to take if this Checkout Session expires.
allow_promotion_codes booleannull Enables user redeemable promotion codes.
amount_subtotal integernull Total of all items before discounts or taxes are applied.
amount_total integernull Total of all items after discounts and taxes are applied.
automatic_tax object
billing_address_collection stringnull Describes whether Checkout should collect the customer's billing address.
cancel_url stringnull If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
client_reference_id stringnull A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems.
client_secret stringnull Client secret to be used when initializing Stripe.js embedded checkout.
consent object Results of `consent_collection` for this session.
consent_collection object When set, provides configuration for the Checkout Session to gather active consent from customers.
created integer Time at which the object was created. Measured in seconds since the Unix epoch.
currency stringnull Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
currency_conversion object Currency conversion details for automatic currency conversion sessions
custom_fields array Collect additional information from your customer using custom fields. Up to 2 fields are supported.
custom_text object
customer object The ID of the customer for this Session. For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout will create a new custom
customer_creation stringnull Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
customer_details object The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.
customer_email stringnull If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you alre
expires_at integer The timestamp at which the Checkout Session will expire.
id string Unique identifier for the object.
invoice object ID of the invoice created by the Checkout Session, if it exists.
invoice_creation object Details on the state of invoice creation for the Checkout Session.
line_items object The line items purchased by the customer.
livemode boolean Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
locale stringnull The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
metadata objectnull Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
mode string The mode of the Checkout Session.
object string String representing the object's type. Objects of the same type share the same value.
payment_intent object The ID of the PaymentIntent for Checkout Sessions in `payment` mode.
payment_link object The ID of the Payment Link that created this Session.
payment_method_collection stringnull Configure whether a Checkout Session should collect a payment method.
payment_method_configuration_details object Information about the payment method configuration used for this Checkout session if using dynamic payment methods.
payment_method_options object Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
payment_method_types array A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
payment_status string The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. You can use this value to decide when to fulfill your customer's order.
phone_number_collection object
recovered_from stringnull The ID of the original expired Checkout Session that triggered the recovery flow.
redirect_on_completion string Applies to Checkout Sessions with `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, t
return_url string Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
setup_intent object The ID of the SetupIntent for Checkout Sessions in `setup` mode.
shipping_address_collection object When set, provides configuration for Checkout to collect a shipping address from a customer.
shipping_cost object The details of the customer cost of shipping, including the customer chosen ShippingRate.
shipping_details object Shipping information for this Checkout Session.
shipping_options array The shipping rate options applied to this Session.
status stringnull The status of the Checkout Session, one of `open`, `complete`, or `expired`.
submit_type stringnull Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. `submit_type` can only be specified on Checkout Sessions in `p
subscription object The ID of the subscription for Checkout Sessions in `subscription` mode.
success_url stringnull The URL the customer will be directed to after the payment or subscription creation is successful.
tax_id_collection object
total_details object Tax and discount details for the computed total amount.
ui_mode stringnull The UI mode of the Session. Can be `hosted` (default) or `embedded`.
url stringnull The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use y
View JSON Schema on GitHub

JSON Schema

stripe-checkout-session-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stripe/main/json-schema/stripe-checkout-session-schema.json",
  "title": "Session",
  "description": "A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stripe-checkout-api-openapi.yml#/components/schemas/checkout.session",
  "properties": {
    "after_expiration": {
      "anyOf": [
        {
          "$ref": "#/$defs/payment_pages_checkout_session_after_expiration"
        }
      ],
      "description": "When set, provides configuration for actions to take if this Checkout Session expires."
    },
    "allow_promotion_codes": {
      "description": "Enables user redeemable promotion codes.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "amount_subtotal": {
      "description": "Total of all items before discounts or taxes are applied.",
      "type": [
        "integer",
        "null"
      ]
    },
    "amount_total": {
      "description": "Total of all items after discounts and taxes are applied.",
      "type": [
        "integer",
        "null"
      ]
    },
    "automatic_tax": {
      "$ref": "#/$defs/payment_pages_checkout_session_automatic_tax"
    },
    "billing_address_collection": {
      "description": "Describes whether Checkout should collect the customer's billing address.",
      "enum": [
        "auto",
        "required"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "cancel_url": {
      "description": "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.",
      "maxLength": 5000,
      "type": [
        "string",
        "null"
      ]
    },
    "client_reference_id": {
      "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.",
      "maxLength": 5000,
      "type": [
        "string",
        "null"
      ]
    },
    "client_secret": {
      "description": "Client secret to be used when initializing Stripe.js embedded checkout.",
      "maxLength": 5000,
      "type": [
        "string",
        "null"
      ]
    },
    "consent": {
      "anyOf": [
        {
          "$ref": "#/$defs/payment_pages_checkout_session_consent"
        }
      ],
      "description": "Results of `consent_collection` for this session."
    },
    "consent_collection": {
      "anyOf": [
        {
          "$ref": "#/$defs/payment_pages_checkout_session_consent_collection"
        }
      ],
      "description": "When set, provides configuration for the Checkout Session to gather active consent from customers."
    },
    "created": {
      "description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
      "format": "unix-time",
      "type": "integer"
    },
    "currency": {
      "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).",
      "type": [
        "string",
        "null"
      ]
    },
    "currency_conversion": {
      "anyOf": [
        {
          "$ref": "#/$defs/payment_pages_checkout_session_currency_conversion"
        }
      ],
      "description": "Currency conversion details for automatic currency conversion sessions"
    },
    "custom_fields": {
      "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.",
      "items": {
        "$ref": "#/$defs/payment_pages_checkout_session_custom_fields"
      },
      "type": "array"
    },
    "custom_text": {
      "$ref": "#/$defs/payment_pages_checkout_session_custom_text"
    },
    "customer": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "$ref": "#/$defs/customer"
        },
        {
          "$ref": "#/$defs/deleted_customer"
        }
      ],
      "description": "The ID of the customer for this Session.\nFor Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.",
      "x-expansionResources": {
        "oneOf": [
          {
            "$ref": "#/$defs/customer"
          },
          {
            "$ref": "#/$defs/deleted_customer"
          }
        ]
      }
    },
    "customer_creation": {
      "description": "Configure whether a Checkout Session creates a Customer when the Checkout Session completes.",
      "enum": [
        "always",
        "if_required"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "customer_details": {
      "anyOf": [
        {
          "$ref": "#/$defs/payment_pages_checkout_session_customer_details"
        }
      ],
      "description": "The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode."
    },
    "customer_email": {
      "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.",
      "maxLength": 5000,
      "type": [
        "string",
        "null"
      ]
    },
    "expires_at": {
      "description": "The timestamp at which the Checkout Session will expire.",
      "format": "unix-time",
      "type": "integer"
    },
    "id": {
      "description": "Unique identifier for the object.",
      "maxLength": 5000,
      "type": "string"
    },
    "invoice": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "$ref": "#/$defs/invoice"
        }
      ],
      "description": "ID of the invoice created by the Checkout Session, if it exists.",
      "x-expansionResources": {
        "oneOf": [
          {
            "$ref": "#/$defs/invoice"
          }
        ]
      }
    },
    "invoice_creation": {
      "anyOf": [
        {
          "$ref": "#/$defs/payment_pages_checkout_session_invoice_creation"
        }
      ],
      "description": "Details on the state of invoice creation for the Checkout Session."
    },
    "line_items": {
      "description": "The line items purchased by the customer.",
      "properties": {
        "data": {
          "description": "Details about each object.",
          "items": {
            "$ref": "#/$defs/item"
          },
          "type": "array"
        },
        "has_more": {
          "description": "True if this list has another page of items after this one that can be fetched.",
          "type": "boolean"
        },
        "object": {
          "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
          "enum": [
            "list"
          ],
          "type": "string"
        },
        "url": {
          "description": "The URL where this list can be accessed.",
          "maxLength": 5000,
          "type": "string"
        }
      },
      "required": [
        "data",
        "has_more",
        "object",
        "url"
      ],
      "title": "PaymentPagesCheckoutSessionListLineItems",
      "type": "object",
      "x-expandableFields": [
        "data"
      ]
    },
    "livemode": {
      "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
      "type": "boolean"
    },
    "locale": {
      "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.",
      "enum": [
        "auto",
        "bg",
        "cs",
        "da",
        "de",
        "el",
        "en",
        "en-GB",
        "es",
        "es-419",
        "et",
        "fi",
        "fil",
        "fr",
        "fr-CA",
        "hr",
        "hu",
        "id",
        "it",
        "ja",
        "ko",
        "lt",
        "lv",
        "ms",
        "mt",
        "nb",
        "nl",
        "pl",
        "pt",
        "pt-BR",
        "ro",
        "ru",
        "sk",
        "sl",
        "sv",
        "th",
        "tr",
        "vi",
        "zh",
        "zh-HK",
        "zh-TW"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-stripeBypassValidation": true
    },
    "metadata": {
      "additionalProperties": {
        "maxLength": 500,
        "type": "string"
      },
      "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
      "type": [
        "object",
        "null"
      ]
    },
    "mode": {
      "description": "The mode of the Checkout Session.",
      "enum": [
        "payment",
        "setup",
        "subscription"
      ],
      "type": "string"
    },
    "object": {
      "description": "String representing the object's type. Objects of the same type share the same value.",
      "enum": [
        "checkout.session"
      ],
      "type": "string"
    },
    "payment_intent": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "$ref": "#/$defs/payment_intent"
        }
      ],
      "description": "The ID of the PaymentIntent for Checkout Sessions in `payment` mode.",
      "x-expansionResources": {
        "oneOf": [
          {
            "$ref": "#/$defs/payment_intent"
          }
        ]
      }
    },
    "payment_link": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "$ref": "#/$defs/payment_link"
        }
      ],
      "description": "The ID of the Payment Link that created this Session.",
      "x-expansionResources": {
        "oneOf": [
          {
            "$ref": "#/$defs/payment_link"
          }
        ]
      }
    },
    "payment_method_collection": {
      "description": "Configure whether a Checkout Session should collect a payment method.",
      "enum": [
        "always",
        "if_required"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "payment_method_configuration_details": {
      "anyOf": [
        {
          "$ref": "#/$defs/payment_method_config_biz_payment_method_configuration_details"
        }
      ],
      "description": "Information about the payment method configuration used for this Checkout session if using dynamic payment methods."
    },
    "payment_method_options": {
      "anyOf": [
        {
          "$ref": "#/$defs/checkout_session_payment_method_options"
        }
      ],
      "description": "Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession."
    },
    "payment_method_types": {
      "description": "A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.",
      "items": {
        "maxLength": 5000,
        "type": "string"
      },
      "type": "array"
    },
    "payment_status": {
      "description": "The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order.",
      "enum": [
        "no_payment_required",
        "paid",
        "unpaid"
      ],
      "type": "string"
    },
    "phone_number_collection": {
      "$ref": "#/$defs/payment_pages_checkout_session_phone_number_collection"
    },
    "recovered_from": {
      "description": "The ID of the original expired Checkout Session that triggered the recovery flow.",
      "maxLength": 5000,
      "type": [
        "string",
        "null"
      ]
    },
    "redirect_on_completion": {
      "description": "Applies to Checkout Sessions with `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method.",
      "enum": [
        "always",
        "if_required",
        "never"
      ],
      "type": "string"
    },
    "return_url": {
      "description": "Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.",
      "maxLength": 5000,
      "type": "string"
    },
    "setup_intent": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "$ref": "#/$defs/setup_intent"
        }
      ],
      "description": "The ID of the SetupIntent for Checkout Sessions in `setup` mode.",
      "x-expansionResources": {
        "oneOf": [
          {
            "$ref": "#/$defs/setup_intent"
          }
        ]
      }
    },
    "shipping_address_collection": {
      "anyOf": [
        {
          "$ref": "#/$defs/payment_pages_checkout_session_shipping_address_collection"
        }
      ],
      "description": "When set, provides configuration for Checkout to collect a shipping address from a customer."
    },
    "shipping_cost": {
      "anyOf": [
        {
          "$ref": "#/$defs/payment_pages_checkout_session_shipping_cost"
        }
      ],
      "description": "The details of the customer cost of shipping, including the customer chosen ShippingRate."
    },
    "shipping_details": {
      "anyOf": [
        {
          "$ref": "#/$defs/shipping"
        }
      ],
      "description": "Shipping information for this Checkout Session."
    },
    "shipping_options": {
      "description": "The shipping rate options applied to this Session.",
      "items": {
        "$ref": "#/$defs/payment_pages_checkout_session_shipping_option"
      },
      "type": "array"
    },
    "status": {
      "description": "The status of the Checkout Session, one of `open`, `complete`, or `expired`.",
      "enum": [
        "complete",
        "expired",
        "open"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "submit_type": {
      "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode. Possible values are `auto`, `pay`, `book`, `donate`. If blank or `auto`, `pay` is used.",
      "enum": [
        "auto",
        "book",
        "donate",
        "pay"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "subscription": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "$ref": "#/$defs/subscription"
        }
      ],
      "description": "The ID of the subscription for Checkout Sessions in `subscription` mode.",
      "x-expansionResources": {
        "oneOf": [
          {
            "$ref": "#/$defs/subscription"
          }
        ]
      }
    },
    "success_url": {
      "description": "The URL the customer will be directed to after the payment or\nsubscription creation is successful.",
      "maxLength": 5000,
      "type": [
        "string",
        "null"
      ]
    },
    "tax_id_collection": {
      "$ref": "#/$defs/payment_pages_checkout_session_tax_id_collection"
    },
    "total_details": {
      "anyOf": [
        {
          "$ref": "#/$defs/payment_pages_checkout_session_total_details"
        }
      ],
      "description": "Tax and discount details for the computed total amount."
    },
    "ui_mode": {
      "description": "The UI mode of the Session. Can be `hosted` (default) or `embedded`.",
      "enum": [
        "embedded",
        "hosted"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-stripeBypassValidation": true
    },
    "url": {
      "description": "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.",
      "maxLength": 5000,
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "automatic_tax",
    "created",
    "custom_fields",
    "custom_text",
    "expires_at",
    "id",
    "livemode",
    "mode",
    "object",
    "payment_method_types",
    "payment_status",
    "shipping_options"
  ],
  "type": "object",
  "x-expandableFields": [
    "after_expiration",
    "automatic_tax",
    "consent",
    "consent_collection",
    "currency_conversion",
    "custom_fields",
    "custom_text",
    "customer",
    "customer_details",
    "invoice",
    "invoice_creation",
    "line_items",
    "payment_intent",
    "payment_link",
    "payment_method_configuration_details",
    "payment_method_options",
    "phone_number_collection",
    "setup_intent",
    "shipping_address_collection",
    "shipping_cost",
    "shipping_details",
    "shipping_options",
    "subscription",
    "tax_id_collection",
    "total_details"
  ],
  "x-resourceId": "checkout.session"
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/stripe-checkout-session"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.