Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseUse Managed Payments
Use Payment Links
Use a prebuilt checkout page
Build a custom integration with Elements
    Overview
    Compare Checkout Sessions and PaymentIntents
    Quickstart guides
    Design an advanced integration
    Customize look and feel
    Manage payment methods
    Collect additional information
    Build a subscriptions integration
    Dynamic updates
    Add discounts
    Collect taxes on your payments
    Let customers pay in their local currency
    Save and retrieve customer payment methods
    Send receipts and paid invoices
    Manually approve payments on your server
    Authorize and capture a payment separately
    Elements with Checkout Sessions API beta changelog
Build an in-app integration
Payment methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app Payments
Payment scenarios
Handle multiple currencies
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Beyond payments
Incorporate your company
Crypto
Financial Connections
Climate
Understand fraud
Radar fraud protection
Manage disputes
Verify identities
HomePaymentsBuild a custom integration with Elements

Compare the Checkout Sessions and Payment Intents APIs

Learn about the differences between the Checkout Sessions and Payment Intents APIs and when to use them with Stripe Elements.

Stripe offers two core payment APIs that you can use with Elements to enable different levels of customization and control over your payment flows. The Checkout Sessions API supports common checkout workflows with built-in features that eliminate the need for custom code and is recommended for most developers. The Payment Intents API allows you to use custom code for more granular control over the checkout process, but requires more integration code and maintenance.

Note

This guide is specific to using APIs with Elements. To explore other use cases, see Design a payments integration.

Choose the right API

It’s important to understand which API is right for your business so that you can access the features you want and decide how much code you want to manage long-term. Checkout Sessions will continue to support new built-in features that won’t be available with PaymentIntents. If you use PaymentIntents, you can manually build a similar feature in your code. Some features, such as Adaptive Pricing, require a large effort to build manually with PaymentIntents.

Checkout SessionsPayment Intents
Recommended forBusinesses who want less integration code, less code maintenance over time, and access to built-in features that manage the checkout state for you, such as—discounts, line items, sales tax, and Adaptive Pricing.Businesses who have their own tax engine, subscription engine, and promotion code engine, and need the flexibility to build and manage their own checkout session without built-in features.
IntegrationUse code to add a checkout page and integrate additional products. For example, enable Stripe Tax by setting automatic_tax.enabled = true, compared to the Payment Intents API which requires you to manually call the Tax API and link calculations.The Payment Intents API gives you complete control to build any checkout or payment experience. You calculate the final amount with taxes, discounts, subscriptions, and currency conversion yourself.
User interface
  • Elements
  • Stripe-hosted
  • Embedded form
Elements
ComplexityBuilt to scale with your business from simple to complex use cases.Best for large businesses with advanced and complex use cases that require bespoke solutions.

Feature comparison

FeatureCheckout Sessions APIPayment Intents API
DesignUse for complete checkout flows with line items, taxes, and shipping.Use for complex use cases that require granular payment control with custom business logic.
Tax calculationBuilt-in tax calculation with Stripe Tax.Requires a separate integration with the Tax API.
SubscriptionsBuilt-in subscription creation.Requires a separate integration with Subscriptions.
Coupons and discountsBuilt-in coupon and discount handling.Requires calculating discounts manually.
Shipping costsBuilt-in shipping cost calculation.Requires calculating shipping costs manually.
UI flexibilityHosted checkout page, embedded forms, and custom UI.Custom UI only.
Address collectionBuilt-in customer, billing, and shipping address collection.Requires handling addresses manually.
Order trackingBuilt-in order summary and receipt functionality.Requires implementing custom order tracking.
Amount updatesDynamic inventory and line item updates.Requires manually updating the amount.
Session expirationAutomatic expiration after 24 hours.No automatic expiration.
Webhook eventsWebhook events for the complete checkout lifecycle.Payment status events only.

See also

  • Checkout Sessions API
  • Payment Intents API
  • Build a checkout page with the Checkout Sessions API
  • Build a checkout page with the Payment Intents API
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Join our early access program.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc