Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Embedded Checkout


Checkout Checkout is a low-code payment integration that creates a customizable payment form so you can quickly collect payments on desktop and mobile devices. ## Create an embedded Checkout instance stripe.createEmbeddedCheckoutPage(options: object) This method creates an embedded Checkout instance. - options Embedded Checkout create options. - fetchClientSecret A callback function `fetchClientSecret() => Promise

that resolves with the [client secret](https://docs.stripe.com/api/checkout/sessions/object.md#checkout_session_object-client_secret) for the [Checkout Session](the relevant part of the product). -clientSecret (deprecated)_This param has been deprecated in favor of thefetchClientSecretparam, which offers a faster loading experience._ The [client secret](https://docs.stripe.com/api/checkout/sessions/object.md#checkout_session_object-client_secret) for the [Checkout Session](the relevant part of the product). -onCompleteAn optional callback functiononComplete() => voidthat is called on completion for Checkout Sessions withredirect_on_completion: if_required. ### Example ```title Create embedded Checkout instance ``` ## Mount embedded Checkout checkout.mount(domElement: string | DOM element)Thecheckout.mountmethod attaches Checkout to the DOM.checkout.mountaccepts either a CSS Selector (e.g.,'#checkout') or a DOM element. You need to create a container DOM element to mount Checkout. - domElementThe CSS selector or DOM element where Checkout will be mounted. ### Example ```title Mount embedded Checkout ``` ## Unmount embedded Checkoutcheckout.unmount()Unmounts Checkout from the DOM. Callcheckout.mountto reattach it to the DOM. ### Example ```title Unmount embedded Checkout ``` ## Destroy embedded Checkoutcheckout.destroy()Removes Checkout from the DOM and destroys it. Once destroyed, an embedded Checkout instance cannot be reattached to the DOM. Callcheckout.createEmbeddedCheckoutPage` to create a new embedded Checkout instance after unmounting the previous instance from the DOM. ### Example title Destroy embedded Checkout

Last verified 2026-09-24

Is this helpful?