Checkout Session
Checkout session for processing payments
- idType: stringrequired
Unique identifier for the checkout session
- livemodeType: booleanrequired
Has the value
trueif the object exists in live mode or the valuefalseif the object exists in test mode. - modeType: stringenumrequired
The mode of the Checkout Session.
values- payment
Standard one-time payment.
- setup
Set up a payment method for future use.
- subscription
Coming soon. Not available yet.
- paymentType: stringenum
_status requiredThe payment status of the Checkout Session, one of
paid,unpaid, orno_payment_required.values- no
_payment _required - processing
- paid
- unpaid
- statusType: stringenumrequired
The status of the Checkout Session.
values- complete
- expired
- open
- urlType: stringFormat: urirequired
URL where the customer can complete the payment.
- afterType: object
_completion After completion behavior for the Checkout Session.
- hostedType: object
After completion behavior for the Checkout Session.
- redirectType: object
After completion behavior for the Checkout Session.
- typeType: stringenum
After completion behavior for the Checkout Session.
values- redirect
- hosted
_confirmation
- amountType: integerFormat: int64
_total Total of all items after discounts and taxes are applied.
- billingType: stringenum
_address _collection Specify whether Checkout should collect the customer's billing address. Defaults to
auto.values- auto
Checkout will only collect the billing address when necessary.
- required
Checkout will always collect the customer's billing address.
- cancelType: string | null
_url URL customers can return to if they cancel payment.
- clientType: string | null
_customer _id An identifier of the customer in the merchant's system.
- clientType: string | null
_reference _id A free-form reference from the merchant's system.
- currencyType: object
Three-letter ISO currency code
- isoType: stringrequired
Three-letter ISO currency code
- scaleType: integerrequired
Number of decimal places for this currency
- customernullable
Customer associated with the Checkout Session, if one exists.
- Type: string · Customer IDmax length:100
Customer associated with the Checkout Session, if one exists.
- customerType: string | nullenum
_creation Customer creation behavior used during Session confirmation.
values- always
- if
_required
- customerType: string | null
_email Email address associated with the Checkout Session.
- descriptionType: string | null
A free-form reference that describes the checkout.
- expiresType: string | nullFormat: date-time
_at Expiry time for the checkout.
- lineType: array object[] · LineItem[]
_items Details about the products sold or services provided.
- quantityType: integerFormat: int64min:1max:10000000000required
Quantity of the item
- metadata
Set of key-value pairs 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.Set of key-value pairs 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.- propertyType: string
Name
- price
_data Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
- activeType: boolean
Whether the price can be used for new purchases.
- billingType: stringenum
_scheme Describes how to compute the price per period. Either
per_unitortiered.per_unitindicates that the fixed amount (specified inunit_amountorunit_amount_decimal) will be charged per unit inquantity(for prices withusage_type=licensed), or per unit of total usage (for prices withusage_type=metered).tieredindicates that the unit pricing will be computed using a tiering strategy as defined using thetiersandtiers_modeattributes.values- per
_unit - tiered
- createdType: integerFormat: date-time nullable
Time at which the object was created. Measured in seconds since the Unix epoch.
- currencyType: stringFormat: currency
Three-letter ISO currency code, in lowercase. Must be a supported currency.
- idType: stringmax length:5000
Unique identifier for the object.
- livemodeType: boolean
Has the value
trueif the object exists in live mode or the valuefalseif the object exists in test mode. - lookupType: string | null
_key max length:5000A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
- product
The ID of the product this price is associated with.
- product
_data - recurringType: object · Recurring nullable
The recurring components of a price such as
intervalandusage_type. - typeType: stringenum
One of
one_timeorrecurringdepending on whether the price is for a one-time purchase or a recurring (subscription) purchase.values- one
_time - recurring
- unitType: integer | null
_amount The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if
billing_scheme=per_unit. - unitType: string | nullFormat: decimal
_amount _decimal The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if
billing_scheme=per_unit.
- localeType: string | null
The IETF language tag of the locale Checkout is displayed in.
- metadata
Set of key-value pairs 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.Set of key-value pairs 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.- propertyType: string
Name
- nextType: object · PaymentIntentNextAction
_action - typeType: stringmax length:100required
Type of the next action to perform. Refer to the other child attributes under
next_actionfor available values. Examples include:redirect_to_urlorthree_d_secure. - redirectType: object · PaymentIntentNextActionRedirectToUrl
_to _url - three
_d _secure Provider-agnostic Three-D Secure next action. The
flowfield indicates whether no UI is needed (frictionless), a hidden device fingerprint (3DS Method) must run, or a visible challenge must be presented. All URLs are on your domain.- Type: object · PaymentIntentNextActionThreeDSecureFrictionless
Provider-agnostic Three-D Secure next action. The
flowfield indicates whether no UI is needed (frictionless), a hidden device fingerprint (3DS Method) must run, or a visible challenge must be presented. All URLs are on your domain.- flowDiscriminatorType: stringenumrequired
Which 3DS flow to execute.
values- frictionless
- method
- challenge
- idempotencyType: string
_key requiredOptional key to correlate retries/refreshes on the same 3DS attempt.
- statusType: stringFormat: uri
_url requiredPoll this URL (your API) until the PaymentIntent leaves requires_action/processing.
- hintType: object
- messageType: object
- returnType: string | nullFormat: uri
_url Merchant's return URL (echoed back). Your 3DS return page should 302 here.
- paymentnullable
_intent The PaymentIntent for Checkout Sessions in
paymentmode. It may be returned as an ID unless expanded.- Type: string · IntentIdmax length:100
The PaymentIntent for Checkout Sessions in
paymentmode. It may be returned as an ID unless expanded.
- paymentnullable
_link The Payment Link that created this Session, if applicable.
- Type: string · PaymentLinkIdmax length:100
The Payment Link that created this Session, if applicable.
- paymentType: array string[]
_method _types Payment method types this Checkout Session can accept.
- returnType: string | null
_url URL customers return to after redirect-based authentication.
- savedType: object · SavedPaymentMethodOptions
_payment _method _options - paymentType: stringenum
_method _save Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to
disabled.values- disabled
- enabled
- setupnullable
_intent The SetupIntent for Checkout Sessions in
setupmode.- Type: string · IntentIdmax length:100
The SetupIntent for Checkout Sessions in
setupmode.
- submitType: string | nullenum
_type Submit button text behavior used for Checkout Sessions in
paymentmode.values- auto
- book
- donate
- pay
- subscribe
- successType: string | null
_url URL customers are sent to when payment or setup is complete.
- uiType: stringenum
_mode The UI mode of the Session.
values- custom
- embedded
- hosted
- walletType: object
_options - appleType: object
_pay - googleType: object
_pay

