How Checkout works
Add a Stripe-hosted payment page that accepts one-time payments and Subscriptions using Checkout’s low-code integration. Checkout’s prebuilt features allow you to reduce your development time. Use the Checkout Session API and the Stripe Dashboard to access additional functionality and customize Checkout for your business. For a complete list of features, see the built-in and customizable features.
Before you begin, learn about these features:
Checkout lifecycle
The basic lifecycle for a customer’s Checkout experience looks like this:
- When customers are ready to complete their purchase, your application creates a new Checkout Session.
- The Checkout Session provides a URL that redirects customers to a Stripe-hosted payment page.
- Customers enter their payment details on the payment page and complete the transaction.
- 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 functionalities and customization options. You can integrate Checkout by creating a Checkout Session and redirecting customers to a Stripe-hosted page for collecting payment details.
Compare Checkout to other Stripe payment options to determine which option meets your requirements.
Built-in and customizable features
Stripe Checkout has the following built-in and customizable features:
Built-in features
- Google Pay, Apple Pay, and Link
- Responsive mobile design
- SCA-ready
- CAPTCHAs
- PCI compliance
- Card validation
- Error messaging
- Adjustable quantities
- Automatic tax collection
- International language support
- Present local currencies
Customizable features
- Collect taxes
- Custom branding with colors, buttons, and font
- Cross-sells
- Global payment methods
- Subscription upsells
- Custom domains
- Email receipts
- Apply discounts
- Custom success page
- Recover abandoned carts
- Autofill payment details with Link
- Collect Tax IDs
- Collect shipping information
- Collect phone numbers
- Set the subscription billing cycle date
Checkout page
When a customer is ready to make a purchase, your application uses the Checkout Sesson’s URL to redirect them to the Checkout page. The Checkout page displays a payment form to your customers, runs card validation, handles errors, and more.
Custom branding
You can set fonts, colors, logos, icons, and field styles for your Checkout page using your Stripe Dashboard’s Branding settings. On the Branding page, click Make Changes to customize Checkout’s appearance. For more information, see Customize your integration.
Custom domains
Choose a custom subdomain for your website in the Stripe Dashboard. For more information, see Use your custom domain.
Checkout Session
The Checkout Session is a programmatic representation of what your customers see on the Stripe-hosted payment page. After creating a Checkout Session, redirect your customers to the Session’s URL to complete the purchase. When customers complete their purchase, you can fulfill their orders by configuring webhooks on Checkout Session events. This code snippet from the quickstart guide is an example of how to create a Checkout Session in your application.
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.
Mode | Purchase type |
---|---|
Payment | One-time purchases |
Subscription |
|
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.
Payment methods
You can view, enable, and disable different payment methods in the Stripe Dashboard. For a complete list of payment methods, see Learn about payment methods.
Save payment details and default payment methods
Store 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.
Complete a transaction
Fulfill orders when a customer completes their purchase by running webhooks after the checkout.session.completed event sends a notification. Webhooks are HTTP calls that run when an event occurs. For example, if a customer doesn’t make a purchase and their cart expires, you can set a webhook on the checkout.session.expired event and return items to your inventory or you can send them a cart abandonment email.