Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseManaged Payments
Use Payment Links
Build a checkout page
Build an advanced integration
Build an in-app integration
Payment Methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
    Overview
    How Checkout works
Web Elements
In-app Elements
Payment scenarios
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Other Stripe products
Financial Connections
Crypto
Climate
HomePaymentsCheckout

How Checkout works

Learn how to use Checkout to collect payments on your website.

Copy page

Checkout is a low-code payment integration that creates a customisable form for collecting payments.

Checkout’s built-in features allow you to reduce your development time. It supports 40+ payment methods, including Link, which allows your customers to save their payment method for faster checkout. You can accept payments by embedding Checkout directly into your website, redirecting customers to a Stripe-hosted payment page, or creating a customised checkout page with Stripe Elements. Checkout supports payments for both one-off purchases and subscriptions.

You can also customise Checkout and access additional functionality with Checkout Sessions and the Stripe Dashboard. For a complete list of features, see its built-in and customisable features.

Checkout lifecycle

  1. When a customer is ready to complete their purchase, your application creates a new Checkout Session.
  2. You embed Checkout on your website to show a payment form.
  3. Customers enter their payment details and complete the transaction.
  4. After the transaction, the checkout.session.completed webhook event triggers the order fulfilment process.

Low-code integration

Checkout requires minimal coding and is the best choice for most integrations because of its pre-built functionalities and customisation options. You can integrate Checkout by creating a Checkout Session and collecting customer payment details. Collect payment by embedding a payment form in your website.

Compare Checkout to other Stripe payment options to determine the best one for you. Checkout displays a payment form to collect customer payment information, validates cards, handles errors, and so on.

Support for digital wallets and LinkBuilt-in
Responsive mobile designBuilt-in
SCA-readyBuilt-in
CAPTCHAsBuilt-in
PCI complianceBuilt-in
Card validationBuilt-in
Error messagingBuilt-in
Adjustable quantitiesBuilt-in
Automatic tax collectionBuilt-in
International language supportBuilt-in
Adaptive PricingBuilt-in
Collect taxesCustomisable
Custom branding with colours, buttons, and fontCustomisable
Optional itemsCustomisable
Global payment methodsCustomisable
Subscription upsellsCustomisable
Custom domains (Stripe-hosted page only)Customisable
Email receiptsCustomisable
Apply discountsCustomisable
Custom success pageCustomisable
Recover abandoned cartsCustomisable
Autofill payment details with LinkCustomisable
Collect Tax IDsCustomisable
Collect shipping informationCustomisable
Collect phone numbersCustomisable
Set the subscription billing cycle dateCustomisable

Custom branding

You can set fonts, colours, icons, and field styles for your embedded form using the Branding settings in the Dashboard. For more information, see Customise your integration.

Checkout Session

The Checkout Session is a programmatic representation of what your customers see on the payment form. After creating a Checkout Session, mount Checkout on your payment page to complete the purchase. When customers complete their purchase, you can fulfil their orders by configuring an event destination to process Checkout Session events. This code snippet from the quickstart guide is an example of how to create a Checkout Session in your application.

Command Line
cURL
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d mode=payment \ -d ui_mode=embedded \ --data-urlencode return_url="https://example.com/return"

One-time and recurring payments

Allow customers to make one-off payments or subscribe to a product or service by setting the mode parameter in a Checkout Session.

ModePurchase type
PaymentOne-time purchases
Subscription
  • Recurring purchases
  • Mixed cart: Recurring purchases with one-time purchases

Mixed cart

Create a mixed cart in Checkout that lets your customers purchase Subscription items and one-off purchase items at the same time. To create a mixed cart, set the mode parameter to subscription and include the Price IDs, or price_data, for each line_item in the line_items array. Price IDs come from Price objects created using the Stripe Dashboard or API and allow you to store information about your product catalogue in Stripe.

You can also use price_data to reference information from an external database where you’re hosting price and product details without storing product catalogue information on Stripe. For more information, see Build a subscriptions integration.

Command Line
cURL
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "line_items[0][price]"={{RECURRING_PRICE_ID}} \ -d "line_items[0][quantity]"=1 \ -d "line_items[1][price]"={{ONE_TIME_PRICE_ID}} \ -d "line_items[1][quantity]"=1 \ -d mode=subscription \ -d ui_mode=embedded \ --data-urlencode return_url="https://example.com/return"

Payment methods

You can view, enable, and disable different payment methods in the Stripe Dashboard at any time. Stripe enables certain payment methods for you by default. We might also enable additional payment methods after notifying you. View our complete list of payment methods.

Save payment details and default payment methods

You can save payment details for future use by sending an API parameter when you create a Session. Options to save payment details include:

  • Single payment: If your Checkout Session uses payment mode, set the payment_intent_data.setup_future_usage parameter.
  • Subscription payment: If your Checkout Session uses subscription mode, Stripe saves the payment method by default.
  • Multiple saved payment methods: If a customer has multiple payment methods saved, you can store a default payment method to the Customer object’s default_payment_method field. However, these payment methods don’t appear for return purchases in Checkout.

Guest customers

The Customer object represents a customer of your business, and it helps tracking subscriptions and payments that belong to the same customer. Checkout Sessions that don’t create Customers are associated with guest customers instead.

Complete a transaction

To automate business flows after a transaction has occurred, register an event destination and build a webhook endpoint handler. Consider the following events and automations to enable:

  • Process the checkout.session.completed event to fulfil orders when a customer completes their purchase
  • Process the checkout.session.expired event to return items to your inventory or send users a cart abandonment email when they don’t make a purchase and their cart expires

See also

  • Checkout quickstart
  • Fulfil your orders
  • Collect taxes in Checkout
  • Manage limited inventory with Checkout
  • Automatically convert to local currencies with Adaptive Pricing
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc
Related Guides
No-code options to accept payments on Stripe
Prebuilt checkout page
Learn about payment methods
Products Used
Checkout