Update a Checkout Session
Updates a Checkout Session object.
Related guide: Dynamically update a Checkout Session
Path parameters
Response
Successful response.
Enables user redeemable promotion codes.
Total of all items before discounts or taxes are applied.
Total of all items after discounts and taxes are applied.
Describes whether Checkout should collect the customer's billing address. Defaults to auto.
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.
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.
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 on your front end.
Time at which the object was created. Measured in seconds since the Unix epoch.
Three-letter ISO currency code, in lowercase. Must be a supported currency.
The ID of the account for this Session.
Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
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.
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.
The timestamp at which the Checkout Session will expire.
Unique identifier for the object.
The integration identifier for this Checkout Session. Multiple Checkout Sessions can have the same integration identifier.
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
The IETF language tag of the locale Checkout is displayed in. If blank or auto, the browser's locale is used.
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.
The mode of the Checkout Session.
String representing the object's type. Objects of the same type share the same value.
Where the user is coming from. This informs the optimizations that are applied to the session.
Configure whether a Checkout Session should collect a payment method. Defaults to always.
A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
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.
The ID of the original expired Checkout Session that triggered the recovery flow.
This parameter applies to ui_mode: embedded_page. Learn more about the redirect behavior of embedded sessions. Defaults to always.
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.
The status of the Checkout Session, one of open, complete, or expired.
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.
The URL the customer will be directed to after the payment or subscription creation is successful.
The UI mode of the Session. Defaults to hosted_page.
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, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value is only present when the session is active.