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. The Checkout Sessions API is the recommended API for most developers. The Payment Intents API is a lower-level API that you can use to build your own checkout or payments, but it requires significantly more code and ongoing maintenance. We recommend the Payment Element with Checkout Sessions for most integrations because it covers similar payment flows as Payment Intents.
Note
This guide is specific to using APIs with Elements. To explore other use cases, see Design a payments integration.
Choose the right API
We recommend the Checkout Sessions API for most integrations. Checkout Sessions allows you to build both a basic payment collection integration or complex checkout flows. If you use PaymentIntents, you must manually build equivalent features in your code, including discount logic, tax calculation, and currency conversion. Some features, such as Adaptive Pricing, require significant effort to replicate with PaymentIntents. Choose PaymentIntents only if you want to own every part of your checkout, and rebuild these capabilities yourself.
| Checkout Sessions | Payment Intents | |
|---|---|---|
| Recommended for | Any businesses that wants to accept payments with less code and less maintenance. Checkout Sessions covers similar use cases as Payment Intents (basic payment collection using price_ or full checkout with line items, tax, discounts, shipping, subscriptions, and Adaptive Pricing. | Businesses that want to own their checkout state and build their own discount, tax, subscription, and currency conversion logic. This requires significantly more code and ongoing maintenance. |
| Integration | Use code to add a checkout page and integrate additional products. For example, enable Stripe Tax by setting automatic_, compared to the Payment Intents API which requires you to manually call the Tax API and link calculations. Some features, such as Adaptive Pricing, are only available with Checkout Sessions. | The Payment Intents API is a lower-level API that allows you to build everything yourself, including tax calculation, discounts, subscriptions, and currency conversion. When you use this API, you calculate the final amount and manage the entire checkout lifecycle in your own code. |
| User interface |
| Elements |
| Complexity | Scales with your business from simple payment collection to complex checkout flows. It covers similar use cases as Payment Intents. | Requires building and maintaining checkout features included with Checkout Sessions. Be deliberate about choosing this path. |
Feature comparison
| Feature | Checkout Sessions API | Payment Intents API |
|---|---|---|
| Design | Use for complete checkout flows, including one-time payments or complex flows with line items, taxes, shipping, and subscriptions. | A lower level API for building your own payment flow from scratch. You must implement all checkout logic yourself. |
| Tax calculation | Built-in tax calculation with Stripe Tax. | Requires a separate integration with the Tax API. |
| Subscriptions | Built-in subscription creation. | Requires a separate integration with Subscriptions. |
| Coupons and discounts | Built-in coupon and discount handling. | Requires calculating discounts manually. |
| Shipping costs | Built-in shipping cost calculation. | Requires calculating shipping costs manually. |
| UI flexibility | Hosted checkout page, embedded forms, and custom UI. | Custom UI only. |
| Address collection | Built-in customer, billing, and shipping address collection. | Requires handling addresses manually. |
| Order tracking | Built-in order summary and receipt functionality. | Requires implementing custom order tracking. |
| Amount updates | Dynamic inventory and line item updates. | Requires manually updating the amount. |
| Session expiration | Automatic expiration after 24 hours. | No automatic expiration. |
| Webhook events | Webhook events for the complete checkout lifecycle. | Payment status events only. |