Skip to content
Create account or Sign in
The Stripe Docs logo
Search/Ask AI
Create accountSign in
  • Get started
  • Payments
  • Revenue
  • Risk
  • Data
  • Money management
  • Stablecoins
  • Embedded finance
  • Developer resources
More
APIs & SDKsHelp
OverviewAccept a payment
Online payments
OverviewFind your use case
Use Payment Links
Build a payments page
    Get started
    How Checkout works
    Checkout studio
    Customize look and feel
    Collect additional information
    Collect taxes
    Collect surcharges
    Let donors cover processing fees
    Dynamically update checkout
    Extend checkout with custom components
    Sell prepaid usage credits with Metronome
    Manage your product catalog
    Subscriptions
    Manage payment methods
    Let customers pay in their local currency
    Add discounts, upsells, and optional items
    Set up future payments
    Save payment details during payment
    Manually approve payments on your server
    After the payment
    Migrate to the Payment Element with Checkout Sessions
    Migrate from legacy Checkout
    Migrate Checkout to use Prices
Build an in-app integration
Use Managed Payments
Recurring payments
Process off-session payments
Migrate legacy integrations
In-person payments
OverviewHow Terminal worksAvailability
Readers
Encryption
Ready-made apps
Custom integration
Payment methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment operations
Analytics
Balances and settlement time
Compliance and security
Currencies
Declines
Disputes
Settlement and Payouts
ReceiptsRefunds and cancellations
Advanced integrations
Elements with Payment Intents
Custom payment flows
Flexible acquiring
Multiprocessor orchestration
Beyond payments
Incorporate your company
Agentic commerce
Financial Connections
Climate
United States
English (United States)
  1. Home/
  2. Payments/
  3. Build a payments page

How Checkout works

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

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

Checkout’s built-in features allow you to reduce your development time. It supports more than 100 payment methods, including Link, which lets your customers 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 customized checkout page with Stripe Elements. Checkout supports payments for both one-time purchases and subscriptions.

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

Checkout lifecycle

  1. When customers are ready to complete their purchase, your application creates a new Checkout Session.
  2. The Checkout Session provides a URL that redirects customers to a Stripe-hosted payment page.
  3. Customers enter their payment details on the payment page and complete the transaction.
  4. After the transaction, a webhook fulfills the order using the checkout.session.completed event.

Low-code integration

Checkout requires minimal coding and is the best choice for most integrations because of its prebuilt features and customization options. You can integrate Checkout by creating a Checkout Session and collecting customer payment details. Collect payments by redirecting customers to a Stripe-hosted payment page.

Compare Checkout’s payment UI 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.

Features

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
Managed PaymentsCustomizable
Collect taxesCustomizable
Custom branding with colors, buttons, and fontCustomizable
Optional itemsCustomizable
Global payment methodsCustomizable
Subscription upsellsCustomizable
Custom domains (Full hosted page only)Customizable
Email receiptsCustomizable
Apply discountsCustomizable
Custom success pageCustomizable
Recover abandoned cartsCustomizable
Autofill payment details with LinkCustomizable
Collect Tax IDsCustomizable
Collect shipping informationCustomizable
Collect phone numbersCustomizable
Set the subscription billing cycle dateCustomizable

Custom branding

You can set fonts, colors, icons, and field styles for your Stripe-hosted Checkout page using the Branding settings in the Dashboard. For more information, see Customize your integration.

Custom domains

If you use Stripe’s custom domain feature, you can serve Stripe-hosted Checkout pages on a subdomain of your custom domain. Custom domains are a paid feature. For information, see Pricing and fees.

Checkout Session

The Checkout Session is a programmatic representation of what your customers see on the checkout page. After creating a Checkout Session, redirect your customers to its URL to complete the purchase. When customers complete their purchase, you can fulfill 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
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "sk_test_...:" \ -d "line_items[0][price]={{PRICE_ID}}" \ -d "line_items[0][quantity]=1" \ -d mode=payment \ --data-urlencode "success_url=https://example.com/success" \ -d integration_identifier=hosted_web_0001

One-time and recurring payments

Allow customers to make one-time 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-time 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 catalog 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 catalog information on Stripe. For more information, see Build a subscriptions integration.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "sk_test_...:" \ -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 \ --data-urlencode "success_url=https://example.com/success" \ -d integration_identifier=hosted_web_0001

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 Checkout 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 make one of them the customer’s default payment method by specifying its ID as the configuration.customer.billing.default_payment_method (Account object) or the invoice_settings.default_payment_method (Customer object). However, these payment methods don’t appear for return purchases in Checkout.

Use the Accounts v2 API to represent customers

The Accounts v2 API is generally available for Connect users, and in public preview for other Stripe users. If you’re part of the Accounts v2 preview, you need to specify a preview version in your code.

To join the Accounts v2 preview, go to Account previews and features in your Dashboard and enable Reusable payment methods for Global Payouts.

For most use cases, we recommend modeling your customers as customer-configured Account objects instead of using Customer objects.

Guest customers

You can represent a customer of your business either as a customer-configured Account object or a Customer object. These objects store information about each customer and associate them with their subscriptions and payments. Checkout Sessions that don’t use existing customers or create new ones are associated with guest customers instead.

Use the Accounts v2 API to represent customers

The Accounts v2 API is generally available for Connect users, and in public preview for other Stripe users. If you’re part of the Accounts v2 preview, you need to specify a preview version in your code.

To join the Accounts v2 preview, go to Account previews and features in your Dashboard and enable Reusable payment methods for Global Payouts.

For most use cases, we recommend modeling your customers as customer-configured Account objects instead of using Customer objects.

Expiration

By default, a Checkout Session expires after 24 hours.

You can set a custom expiration time for a Checkout Session by setting the expires_at parameter. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation.

You can also expire a Checkout Session.

Complete a transaction

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

  • Process the checkout.session.completed event to fulfill 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.

Manage risk

To prevent fraud, Stripe uses AI models that evaluate available signals to distinguish fraudulent from legitimate payments. By enabling Radar in Checkout, Stripe uses data from its network to detect and block fraudulent transactions across integrations.

Checkout combines session data, device and browser context, and payment lifecycle information to give Radar context and improve accuracy. Checkout also provides targeted interventions that add extra security for higher risk transactions and reduce friction for trusted customers.

Checkout for agents

Stripe Checkout pages have a structure and labeled controls to help customers complete checkout, and to help automated agents understand and navigate checkout pages. They also accommodate customers who might have accessibility needs, such as those who use screen readers.

To support agentic checkout flows, Stripe also provides programmatic guidance when an agent needs to read a Stripe Checkout page. This guidance can provide important details such as currency, limits, and next steps to help agents complete the purchase with less friction and fewer errors.

See also

  • Checkout quickstart
  • Fulfill 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.
  • Chat with Stripe developers on Discord.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc