API reference
Test mode. Use your secret key on your server; live processing is currently disabled.
https://api.knoxapi.comSend form-encoded requests with Authorization: Bearer sk_test_....
Complete OpenAPI specification · Integration guide
Operations and schemas are based on the pinned Stripe OpenAPI specification (MIT). Nested object definitions and enums are available in the complete specification.
List all Checkout Sessions
Returns a list of Checkout Sessions.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
created | query | one of multiple schemas | Only return Checkout Sessions that were created during the given date interval. |
customer | query | string | Only return the Checkout Sessions for the Customer specified. |
customer_account | query | string | Only return the Checkout Sessions for the Account specified. |
customer_details | query | object | Only return the Checkout Sessions for the Customer details specified. |
ending_before | query | string | A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. |
expand | query | array of string | Specifies which fields in the response should be expanded. |
limit | query | integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. |
payment_intent | query | string | Only return the Checkout Session for the PaymentIntent specified. |
payment_link | query | string | Only return the Checkout Sessions for the Payment Link specified. |
starting_after | query | string | A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. |
status | query | string | Only return the Checkout Sessions matching the given status. |
subscription | query | string | Only return the Checkout Session for the subscription specified. |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
data required | array of checkout.session | |
has_more required | boolean | True if this list has another page of items after this one that can be fetched. |
object required | string | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. |
url required | string | The URL where this list can be accessed. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Create a Checkout Session
Creates a Checkout Session object.
Request parameters
| Field | Type | Description |
|---|---|---|
adaptive_pricing | object | Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). |
after_expiration | object | Configure actions after a Checkout Session has expired. You can't set this parameter if `ui_mode` is `elements`. |
allow_promotion_codes | boolean | Enables user redeemable promotion codes. |
automatic_tax | object | Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. |
billing_address_collection | string | Specify whether Checkout should collect the customer's billing address. Defaults to `auto`. |
branding_settings | object | The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is `elements`. |
cancel_url | string | 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. This parameter is not allowed if ui_mode is `embedded_page` or `elements`. |
client_reference_id | string | 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. |
consent_collection | object | Configure fields for the Checkout Session to gather active consent from customers. |
currency | string | 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). Required in `setup` mode when `payment_method_types` is not set. |
custom_fields | array of object | Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. |
custom_text | object | Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `custom`. |
customer | string | ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card payment method will be used to prefill the email, name, card details, and billing address on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method) will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. If the Customer already has a valid [email](https://docs.stripe.com/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. You can set [`payment_intent_data.setup_future_usage`](https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. |
customer_account | string | ID of an existing Account, if one exists. Has the same behavior as `customer`. |
customer_creation | string | Configure whether a Checkout Session creates a [Customer](https://docs.stripe.com/api/customers) during Session confirmation. When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout with [customer_details](https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-customer_details). Sessions that don't create Customers instead are grouped by [guest customers](https://docs.stripe.com/payments/checkout/guest-customers) in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. Can only be set in `payment` and `setup` mode. |
customer_email | string | 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 already have an email on file. To access information about the customer once a session is complete, use the `customer` field. |
customer_update | object | Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. |
discounts | array of object | The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. |
excluded_payment_method_types | array of string | A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). |
expand | array of string | Specifies which fields in the response should be expanded. |
expires_at | integer | The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. |
integration_identifier | string | The integration identifier for this Checkout Session. Multiple Checkout Sessions can have the same integration identifier. |
invoice_creation | object | Generate a post-purchase Invoice for one-time payments. |
line_items | array of object | A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://docs.stripe.com/api/prices). The parameter is required for `payment` and `subscription` mode. For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. |
locale | string | The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. |
managed_payments | object | Settings for Managed Payments for this Checkout Session and resulting [PaymentIntents](/api/payment_intents/object), [Invoices](/api/invoices/object), and [Subscriptions](/api/subscriptions/object). |
metadata | object | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
mode | string | The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. |
name_collection | object | Controls name collection settings for the session. You can configure Checkout to collect your customers' business names, individual names, or both. Each name field can be either required or optional. If a [Customer](https://docs.stripe.com/api/customers) is created or provided, the names can be saved to the Customer object as well. |
optional_items | array of object | A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://docs.stripe.com/api/prices). There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items. For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen. For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices. You can't set this parameter if `ui_mode` is `custom`. |
origin_context | string | Where the user is coming from. This informs the optimizations that are applied to the session. You can't set this parameter if `ui_mode` is `elements`. |
payment_intent_data | object | A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. |
payment_method_collection | string | Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. Defaults to `always`. If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://docs.stripe.com/payments/checkout/free-trials). |
payment_method_configuration | string | The ID of the payment method configuration to use with this Checkout session. |
payment_method_data | object | This parameter allows you to set some attributes on the payment method created during a Checkout session. |
payment_method_options | object | Payment-method-specific configuration. |
payment_method_types | array of string | A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). See [Dynamic Payment Methods](https://docs.stripe.com/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. Read more about the supported payment methods and their requirements in our [payment method details guide](/docs/payments/checkout/payment-methods). If multiple payment methods are passed, Checkout will dynamically reorder them to prioritize the most relevant payment methods based on the customer's location and other characteristics. |
permissions | object | This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions. For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. |
phone_number_collection | object | Controls phone number collection settings for the session. We recommend that you review your privacy policy and check with your legal contacts before using this feature. Learn more about [collecting phone numbers with Checkout](https://docs.stripe.com/payments/checkout/phone-numbers). |
redirect_on_completion | string | This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. |
return_url | string | The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. This parameter is required if `ui_mode` is `embedded_page` or `elements` and redirect-based payment methods are enabled on the session. |
saved_payment_method_options | object | Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. |
setup_intent_data | object | A subset of parameters to be passed to SetupIntent creation 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_options | array of object | The shipping rate options to apply to this Session. Up to a maximum of 5. |
submit_type | string | 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 `payment` or `subscription` mode. If blank or `auto`, `pay` is used. You can't set this parameter if `ui_mode` is `elements`. |
subscription_data | object | A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. |
success_url | string | The URL to which Stripe should send customers when payment or setup is complete. This parameter is not allowed if ui_mode is `embedded_page` or `elements`. If you'd like to use information from the successful Checkout Session on your page, read the guide on [customizing your success page](https://docs.stripe.com/payments/checkout/custom-success-page). |
tax_id_collection | object | Controls tax ID collection during checkout. |
ui_mode | string | The UI mode of the Session. Defaults to `hosted_page`. |
wallet_options | object | Wallet-specific configuration. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
adaptive_pricing | one of multiple schemas | Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). |
after_expiration | one of multiple schemas | When set, provides configuration for actions to take if this Checkout Session expires. |
allow_promotion_codes | boolean | Enables user redeemable promotion codes. |
amount_subtotal | integer | Total of all items before discounts or taxes are applied. |
amount_total | integer | Total of all items after discounts and taxes are applied. |
automatic_tax required | payment_pages_checkout_session_automatic_tax | |
billing_address_collection | string | Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. |
branding_settings | payment_pages_checkout_session_branding_settings | |
cancel_url | string | 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 | string | 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 | string | The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded_page` or `ui_mode: elements`. For `ui_mode: embedded_page`, the client secret is to be used when initializing Stripe.js embedded checkout. For `ui_mode: elements`, use the client secret with [initCheckout](https://docs.stripe.com/js/custom_checkout/init) on your front end. |
collected_information | one of multiple schemas | Information about the customer collected within the Checkout Session. |
consent | one of multiple schemas | Results of `consent_collection` for this session. |
consent_collection | one of multiple schemas | When set, provides configuration for the Checkout Session to gather active consent from customers. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency | string | 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 | one of multiple schemas | Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31. |
custom_fields required | array of payment_pages_checkout_session_custom_fields | Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. |
custom_text required | payment_pages_checkout_session_custom_text | |
customer | one of multiple schemas | 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 customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created. |
customer_account | string | The ID of the account for this Session. |
customer_creation | string | Configure whether a Checkout Session creates a Customer when the Checkout Session completes. |
customer_details | one of multiple schemas | The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. |
customer_email | string | 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 already have an email on file. To access information about the customer once the payment flow is complete, use the `customer` attribute. |
discounts | array of payment_pages_checkout_session_discount | List of coupons and promotion codes attached to the Checkout Session. |
excluded_payment_method_types | array of string | A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). |
expires_at required | integer | The timestamp at which the Checkout Session will expire. |
id required | string | Unique identifier for the object. |
integration_identifier | string | The integration identifier for this Checkout Session. Multiple Checkout Sessions can have the same integration identifier. |
invoice | one of multiple schemas | ID of the invoice created by the Checkout Session, if it exists. |
invoice_creation | one of multiple schemas | Details on the state of invoice creation for the Checkout Session. |
line_items | object | The line items purchased by the customer. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
locale | string | The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. |
managed_payments | one of multiple schemas | Settings for Managed Payments for this Checkout Session and resulting [PaymentIntents](/api/payment_intents/object), [Invoices](/api/invoices/object), and [Subscriptions](/api/subscriptions/object). |
metadata | object | Set of [key-value pairs](https://docs.stripe.com/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 required | string | The mode of the Checkout Session. |
name_collection | payment_pages_checkout_session_name_collection | |
object required | string | String representing the object's type. Objects of the same type share the same value. |
optional_items | array of payment_pages_checkout_session_optional_item | The optional items presented to the customer at checkout. |
origin_context | string | Where the user is coming from. This informs the optimizations that are applied to the session. |
payment_intent | one of multiple schemas | The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead. |
payment_link | one of multiple schemas | The ID of the Payment Link that created this Session. |
payment_method_collection | string | Configure whether a Checkout Session should collect a payment method for sessions with mode `payment`. Defaults to `always`. |
payment_method_configuration_details | one of multiple schemas | Information about the payment method configuration used for this Checkout session if using dynamic payment methods. |
payment_method_options | one of multiple schemas | Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. |
payment_method_types required | array of string | A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept. |
payment_status required | 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. |
permissions | one of multiple schemas | This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. |
phone_number_collection | payment_pages_checkout_session_phone_number_collection | |
presentment_details | payment_flows_payment_intent_presentment_details | |
recovered_from | string | The ID of the original expired Checkout Session that triggered the recovery flow. |
redirect_on_completion | string | This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. |
return_url | string | Applies to Checkout Sessions with `ui_mode: embedded_page` or `ui_mode: elements`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. |
saved_payment_method_options | one of multiple schemas | Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. |
setup_intent | one of multiple schemas | The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead. |
shipping_address_collection | one of multiple schemas | When set, provides configuration for Checkout to collect a shipping address from a customer. |
shipping_cost | one of multiple schemas | The details of the customer cost of shipping, including the customer chosen ShippingRate. |
shipping_options required | array of payment_pages_checkout_session_shipping_option | The shipping rate options applied to this Session. |
status | string | The status of the Checkout Session, one of `open`, `complete`, or `expired`. |
submit_type | string | 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 `payment` mode. If blank or `auto`, `pay` is used. |
subscription | one of multiple schemas | The ID of the [Subscription](https://docs.stripe.com/api/subscriptions) for Checkout Sessions in `subscription` mode. |
success_url | string | The URL the customer will be directed to after the payment or subscription creation is successful. |
tax_id_collection | payment_pages_checkout_session_tax_id_collection | |
total_details | one of multiple schemas | Tax and discount details for the computed total amount. |
ui_mode | string | The UI mode of the Session. Defaults to `hosted_page`. |
url | string | The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted_page`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://docs.stripe.com/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` This value is only present when the session is active. |
wallet_options | one of multiple schemas | Wallet-specific configuration for this Checkout Session. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Retrieve a Checkout Session
Retrieves a Checkout Session object.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
expand | query | array of string | Specifies which fields in the response should be expanded. |
session | path | string |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
adaptive_pricing | one of multiple schemas | Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). |
after_expiration | one of multiple schemas | When set, provides configuration for actions to take if this Checkout Session expires. |
allow_promotion_codes | boolean | Enables user redeemable promotion codes. |
amount_subtotal | integer | Total of all items before discounts or taxes are applied. |
amount_total | integer | Total of all items after discounts and taxes are applied. |
automatic_tax required | payment_pages_checkout_session_automatic_tax | |
billing_address_collection | string | Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. |
branding_settings | payment_pages_checkout_session_branding_settings | |
cancel_url | string | 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 | string | 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 | string | The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded_page` or `ui_mode: elements`. For `ui_mode: embedded_page`, the client secret is to be used when initializing Stripe.js embedded checkout. For `ui_mode: elements`, use the client secret with [initCheckout](https://docs.stripe.com/js/custom_checkout/init) on your front end. |
collected_information | one of multiple schemas | Information about the customer collected within the Checkout Session. |
consent | one of multiple schemas | Results of `consent_collection` for this session. |
consent_collection | one of multiple schemas | When set, provides configuration for the Checkout Session to gather active consent from customers. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency | string | 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 | one of multiple schemas | Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31. |
custom_fields required | array of payment_pages_checkout_session_custom_fields | Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. |
custom_text required | payment_pages_checkout_session_custom_text | |
customer | one of multiple schemas | 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 customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created. |
customer_account | string | The ID of the account for this Session. |
customer_creation | string | Configure whether a Checkout Session creates a Customer when the Checkout Session completes. |
customer_details | one of multiple schemas | The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. |
customer_email | string | 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 already have an email on file. To access information about the customer once the payment flow is complete, use the `customer` attribute. |
discounts | array of payment_pages_checkout_session_discount | List of coupons and promotion codes attached to the Checkout Session. |
excluded_payment_method_types | array of string | A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). |
expires_at required | integer | The timestamp at which the Checkout Session will expire. |
id required | string | Unique identifier for the object. |
integration_identifier | string | The integration identifier for this Checkout Session. Multiple Checkout Sessions can have the same integration identifier. |
invoice | one of multiple schemas | ID of the invoice created by the Checkout Session, if it exists. |
invoice_creation | one of multiple schemas | Details on the state of invoice creation for the Checkout Session. |
line_items | object | The line items purchased by the customer. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
locale | string | The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. |
managed_payments | one of multiple schemas | Settings for Managed Payments for this Checkout Session and resulting [PaymentIntents](/api/payment_intents/object), [Invoices](/api/invoices/object), and [Subscriptions](/api/subscriptions/object). |
metadata | object | Set of [key-value pairs](https://docs.stripe.com/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 required | string | The mode of the Checkout Session. |
name_collection | payment_pages_checkout_session_name_collection | |
object required | string | String representing the object's type. Objects of the same type share the same value. |
optional_items | array of payment_pages_checkout_session_optional_item | The optional items presented to the customer at checkout. |
origin_context | string | Where the user is coming from. This informs the optimizations that are applied to the session. |
payment_intent | one of multiple schemas | The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead. |
payment_link | one of multiple schemas | The ID of the Payment Link that created this Session. |
payment_method_collection | string | Configure whether a Checkout Session should collect a payment method for sessions with mode `payment`. Defaults to `always`. |
payment_method_configuration_details | one of multiple schemas | Information about the payment method configuration used for this Checkout session if using dynamic payment methods. |
payment_method_options | one of multiple schemas | Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. |
payment_method_types required | array of string | A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept. |
payment_status required | 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. |
permissions | one of multiple schemas | This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. |
phone_number_collection | payment_pages_checkout_session_phone_number_collection | |
presentment_details | payment_flows_payment_intent_presentment_details | |
recovered_from | string | The ID of the original expired Checkout Session that triggered the recovery flow. |
redirect_on_completion | string | This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. |
return_url | string | Applies to Checkout Sessions with `ui_mode: embedded_page` or `ui_mode: elements`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. |
saved_payment_method_options | one of multiple schemas | Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. |
setup_intent | one of multiple schemas | The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead. |
shipping_address_collection | one of multiple schemas | When set, provides configuration for Checkout to collect a shipping address from a customer. |
shipping_cost | one of multiple schemas | The details of the customer cost of shipping, including the customer chosen ShippingRate. |
shipping_options required | array of payment_pages_checkout_session_shipping_option | The shipping rate options applied to this Session. |
status | string | The status of the Checkout Session, one of `open`, `complete`, or `expired`. |
submit_type | string | 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 `payment` mode. If blank or `auto`, `pay` is used. |
subscription | one of multiple schemas | The ID of the [Subscription](https://docs.stripe.com/api/subscriptions) for Checkout Sessions in `subscription` mode. |
success_url | string | The URL the customer will be directed to after the payment or subscription creation is successful. |
tax_id_collection | payment_pages_checkout_session_tax_id_collection | |
total_details | one of multiple schemas | Tax and discount details for the computed total amount. |
ui_mode | string | The UI mode of the Session. Defaults to `hosted_page`. |
url | string | The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted_page`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://docs.stripe.com/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` This value is only present when the session is active. |
wallet_options | one of multiple schemas | Wallet-specific configuration for this Checkout Session. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Update a Checkout Session
Updates a Checkout Session object. Related guide: Dynamically update a Checkout Session
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
session | path | string |
| Field | Type | Description |
|---|---|---|
collected_information | object | Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions. |
expand | array of string | Specifies which fields in the response should be expanded. |
line_items | array of object | A list of items the customer is purchasing. When updating line items, you must retransmit the entire array of line items. To retain an existing line item, specify its `id`. To update an existing line item, specify its `id` along with the new values of the fields to update. To add a new line item, specify one of `price` or `price_data` and `quantity`. To remove an existing line item, omit the line item's ID from the retransmitted array. To reorder a line item, specify it at the desired position in the retransmitted array. |
metadata | one of multiple schemas | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
shipping_options | one of multiple schemas | The shipping rate options to apply to this Session. Up to a maximum of 5. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
adaptive_pricing | one of multiple schemas | Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). |
after_expiration | one of multiple schemas | When set, provides configuration for actions to take if this Checkout Session expires. |
allow_promotion_codes | boolean | Enables user redeemable promotion codes. |
amount_subtotal | integer | Total of all items before discounts or taxes are applied. |
amount_total | integer | Total of all items after discounts and taxes are applied. |
automatic_tax required | payment_pages_checkout_session_automatic_tax | |
billing_address_collection | string | Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. |
branding_settings | payment_pages_checkout_session_branding_settings | |
cancel_url | string | 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 | string | 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 | string | The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded_page` or `ui_mode: elements`. For `ui_mode: embedded_page`, the client secret is to be used when initializing Stripe.js embedded checkout. For `ui_mode: elements`, use the client secret with [initCheckout](https://docs.stripe.com/js/custom_checkout/init) on your front end. |
collected_information | one of multiple schemas | Information about the customer collected within the Checkout Session. |
consent | one of multiple schemas | Results of `consent_collection` for this session. |
consent_collection | one of multiple schemas | When set, provides configuration for the Checkout Session to gather active consent from customers. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency | string | 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 | one of multiple schemas | Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31. |
custom_fields required | array of payment_pages_checkout_session_custom_fields | Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. |
custom_text required | payment_pages_checkout_session_custom_text | |
customer | one of multiple schemas | 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 customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created. |
customer_account | string | The ID of the account for this Session. |
customer_creation | string | Configure whether a Checkout Session creates a Customer when the Checkout Session completes. |
customer_details | one of multiple schemas | The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. |
customer_email | string | 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 already have an email on file. To access information about the customer once the payment flow is complete, use the `customer` attribute. |
discounts | array of payment_pages_checkout_session_discount | List of coupons and promotion codes attached to the Checkout Session. |
excluded_payment_method_types | array of string | A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). |
expires_at required | integer | The timestamp at which the Checkout Session will expire. |
id required | string | Unique identifier for the object. |
integration_identifier | string | The integration identifier for this Checkout Session. Multiple Checkout Sessions can have the same integration identifier. |
invoice | one of multiple schemas | ID of the invoice created by the Checkout Session, if it exists. |
invoice_creation | one of multiple schemas | Details on the state of invoice creation for the Checkout Session. |
line_items | object | The line items purchased by the customer. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
locale | string | The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. |
managed_payments | one of multiple schemas | Settings for Managed Payments for this Checkout Session and resulting [PaymentIntents](/api/payment_intents/object), [Invoices](/api/invoices/object), and [Subscriptions](/api/subscriptions/object). |
metadata | object | Set of [key-value pairs](https://docs.stripe.com/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 required | string | The mode of the Checkout Session. |
name_collection | payment_pages_checkout_session_name_collection | |
object required | string | String representing the object's type. Objects of the same type share the same value. |
optional_items | array of payment_pages_checkout_session_optional_item | The optional items presented to the customer at checkout. |
origin_context | string | Where the user is coming from. This informs the optimizations that are applied to the session. |
payment_intent | one of multiple schemas | The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead. |
payment_link | one of multiple schemas | The ID of the Payment Link that created this Session. |
payment_method_collection | string | Configure whether a Checkout Session should collect a payment method for sessions with mode `payment`. Defaults to `always`. |
payment_method_configuration_details | one of multiple schemas | Information about the payment method configuration used for this Checkout session if using dynamic payment methods. |
payment_method_options | one of multiple schemas | Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. |
payment_method_types required | array of string | A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept. |
payment_status required | 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. |
permissions | one of multiple schemas | This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. |
phone_number_collection | payment_pages_checkout_session_phone_number_collection | |
presentment_details | payment_flows_payment_intent_presentment_details | |
recovered_from | string | The ID of the original expired Checkout Session that triggered the recovery flow. |
redirect_on_completion | string | This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. |
return_url | string | Applies to Checkout Sessions with `ui_mode: embedded_page` or `ui_mode: elements`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. |
saved_payment_method_options | one of multiple schemas | Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. |
setup_intent | one of multiple schemas | The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead. |
shipping_address_collection | one of multiple schemas | When set, provides configuration for Checkout to collect a shipping address from a customer. |
shipping_cost | one of multiple schemas | The details of the customer cost of shipping, including the customer chosen ShippingRate. |
shipping_options required | array of payment_pages_checkout_session_shipping_option | The shipping rate options applied to this Session. |
status | string | The status of the Checkout Session, one of `open`, `complete`, or `expired`. |
submit_type | string | 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 `payment` mode. If blank or `auto`, `pay` is used. |
subscription | one of multiple schemas | The ID of the [Subscription](https://docs.stripe.com/api/subscriptions) for Checkout Sessions in `subscription` mode. |
success_url | string | The URL the customer will be directed to after the payment or subscription creation is successful. |
tax_id_collection | payment_pages_checkout_session_tax_id_collection | |
total_details | one of multiple schemas | Tax and discount details for the computed total amount. |
ui_mode | string | The UI mode of the Session. Defaults to `hosted_page`. |
url | string | The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted_page`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://docs.stripe.com/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` This value is only present when the session is active. |
wallet_options | one of multiple schemas | Wallet-specific configuration for this Checkout Session. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Expire a Checkout Session
A Checkout Session can be expired when it is in one of these statuses: open After it expires, a customer can’t complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
session | path | string |
| Field | Type | Description |
|---|---|---|
expand | array of string | Specifies which fields in the response should be expanded. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
adaptive_pricing | one of multiple schemas | Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). |
after_expiration | one of multiple schemas | When set, provides configuration for actions to take if this Checkout Session expires. |
allow_promotion_codes | boolean | Enables user redeemable promotion codes. |
amount_subtotal | integer | Total of all items before discounts or taxes are applied. |
amount_total | integer | Total of all items after discounts and taxes are applied. |
automatic_tax required | payment_pages_checkout_session_automatic_tax | |
billing_address_collection | string | Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. |
branding_settings | payment_pages_checkout_session_branding_settings | |
cancel_url | string | 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 | string | 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 | string | The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded_page` or `ui_mode: elements`. For `ui_mode: embedded_page`, the client secret is to be used when initializing Stripe.js embedded checkout. For `ui_mode: elements`, use the client secret with [initCheckout](https://docs.stripe.com/js/custom_checkout/init) on your front end. |
collected_information | one of multiple schemas | Information about the customer collected within the Checkout Session. |
consent | one of multiple schemas | Results of `consent_collection` for this session. |
consent_collection | one of multiple schemas | When set, provides configuration for the Checkout Session to gather active consent from customers. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency | string | 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 | one of multiple schemas | Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31. |
custom_fields required | array of payment_pages_checkout_session_custom_fields | Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. |
custom_text required | payment_pages_checkout_session_custom_text | |
customer | one of multiple schemas | 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 customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created. |
customer_account | string | The ID of the account for this Session. |
customer_creation | string | Configure whether a Checkout Session creates a Customer when the Checkout Session completes. |
customer_details | one of multiple schemas | The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. |
customer_email | string | 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 already have an email on file. To access information about the customer once the payment flow is complete, use the `customer` attribute. |
discounts | array of payment_pages_checkout_session_discount | List of coupons and promotion codes attached to the Checkout Session. |
excluded_payment_method_types | array of string | A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). |
expires_at required | integer | The timestamp at which the Checkout Session will expire. |
id required | string | Unique identifier for the object. |
integration_identifier | string | The integration identifier for this Checkout Session. Multiple Checkout Sessions can have the same integration identifier. |
invoice | one of multiple schemas | ID of the invoice created by the Checkout Session, if it exists. |
invoice_creation | one of multiple schemas | Details on the state of invoice creation for the Checkout Session. |
line_items | object | The line items purchased by the customer. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
locale | string | The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. |
managed_payments | one of multiple schemas | Settings for Managed Payments for this Checkout Session and resulting [PaymentIntents](/api/payment_intents/object), [Invoices](/api/invoices/object), and [Subscriptions](/api/subscriptions/object). |
metadata | object | Set of [key-value pairs](https://docs.stripe.com/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 required | string | The mode of the Checkout Session. |
name_collection | payment_pages_checkout_session_name_collection | |
object required | string | String representing the object's type. Objects of the same type share the same value. |
optional_items | array of payment_pages_checkout_session_optional_item | The optional items presented to the customer at checkout. |
origin_context | string | Where the user is coming from. This informs the optimizations that are applied to the session. |
payment_intent | one of multiple schemas | The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead. |
payment_link | one of multiple schemas | The ID of the Payment Link that created this Session. |
payment_method_collection | string | Configure whether a Checkout Session should collect a payment method for sessions with mode `payment`. Defaults to `always`. |
payment_method_configuration_details | one of multiple schemas | Information about the payment method configuration used for this Checkout session if using dynamic payment methods. |
payment_method_options | one of multiple schemas | Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. |
payment_method_types required | array of string | A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept. |
payment_status required | 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. |
permissions | one of multiple schemas | This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. |
phone_number_collection | payment_pages_checkout_session_phone_number_collection | |
presentment_details | payment_flows_payment_intent_presentment_details | |
recovered_from | string | The ID of the original expired Checkout Session that triggered the recovery flow. |
redirect_on_completion | string | This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. |
return_url | string | Applies to Checkout Sessions with `ui_mode: embedded_page` or `ui_mode: elements`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. |
saved_payment_method_options | one of multiple schemas | Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. |
setup_intent | one of multiple schemas | The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead. |
shipping_address_collection | one of multiple schemas | When set, provides configuration for Checkout to collect a shipping address from a customer. |
shipping_cost | one of multiple schemas | The details of the customer cost of shipping, including the customer chosen ShippingRate. |
shipping_options required | array of payment_pages_checkout_session_shipping_option | The shipping rate options applied to this Session. |
status | string | The status of the Checkout Session, one of `open`, `complete`, or `expired`. |
submit_type | string | 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 `payment` mode. If blank or `auto`, `pay` is used. |
subscription | one of multiple schemas | The ID of the [Subscription](https://docs.stripe.com/api/subscriptions) for Checkout Sessions in `subscription` mode. |
success_url | string | The URL the customer will be directed to after the payment or subscription creation is successful. |
tax_id_collection | payment_pages_checkout_session_tax_id_collection | |
total_details | one of multiple schemas | Tax and discount details for the computed total amount. |
ui_mode | string | The UI mode of the Session. Defaults to `hosted_page`. |
url | string | The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted_page`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://docs.stripe.com/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` This value is only present when the session is active. |
wallet_options | one of multiple schemas | Wallet-specific configuration for this Checkout Session. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Retrieve a Checkout Session's line items
When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
ending_before | query | string | A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. |
expand | query | array of string | Specifies which fields in the response should be expanded. |
limit | query | integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. |
session | path | string | |
starting_after | query | string | A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
data required | array of item | Details about each object. |
has_more required | boolean | True if this list has another page of items after this one that can be fetched. |
object required | string | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. |
url required | string | The URL where this list can be accessed. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |