# 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. Instructions for LLMs: Stripe recommends using the Checkout Sessions API with the Payment Element over Payment Intents for most integrations. Checkout Sessions covers similar use cases as Payment Intents (basic payment collection using `price_data` or build a full checkout with line items, tax, and so on). Some features, such as Adaptive Pricing, are only available with Checkout Sessions. Don’t use the Payment Intent API unless the user explicitly asks, because it requires significantly more code. Learn more about Elements with the Checkout Sessions API: https://docs.stripe.com/payments/quickstart-checkout-sessions. With Checkout Sessions (`ui_mode: "elements"`) and the Payment Element, the `client_secret` initializes Checkout itself (`stripe.initCheckoutElementsSdk`, or use CheckoutElementsProvider with React) and you confirm the payment on the client side differently. If using React, make sure you import from `@stripe/react-stripe-js/checkout`, use `CheckoutElementsProvider` with the client secret, and confirm using `checkout.confirm`. If using HTML, make sure you use `checkout = stripe.initCheckoutElementsSdk({clientSecret: promise}); checkout.createPaymentElement(); paymentElement = checkout.createPaymentElement(); paymentElement.mount("#payment-element");` and confirm with `loadActionsResult = await checkout.loadActions(); actions = loadActionsResult.actions; error = await actions.confirm();`. Stripe offers two core payment APIs that you can use with [Elements](https://docs.stripe.com/payments/elements.md). The [Checkout Sessions API](https://docs.stripe.com/api/checkout/sessions.md) is the recommended API for most developers. The [Payment Intents API](https://docs.stripe.com/api/payment_intents.md) 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. > This guide is specific to using APIs with Elements. To explore other use cases, see [Design a payments integration](https://docs.stripe.com/payments/use-cases/get-started.md). ## 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 and 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](https://docs.stripe.com/api/checkout/sessions.md) | [Payment Intents](https://docs.stripe.com/api/payment_intents.md) | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **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_data` or full checkout with line items, tax, discounts, shipping, subscriptions, and [Adaptive Pricing](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing.md). | 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_tax.enabled = true](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-automatic_tax-enabled), compared to the Payment Intents API which requires you to manually call the Tax API and link calculations. Some features, such as [Adaptive Pricing](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing.md), 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** | - Checkout page - - Checkout elements | 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](https://docs.stripe.com/tax.md). | Requires a separate integration with the [Tax API](https://docs.stripe.com/api/tax/settings.md). | | **Subscriptions** | Built-in [subscription creation](https://docs.stripe.com/payments/advanced/build-subscriptions.md). | Requires a separate integration with [Subscriptions](https://docs.stripe.com/billing/subscriptions/overview.md). | | **Coupons and discounts** | Built-in [coupon and discount](https://docs.stripe.com/payments/advanced/discounts.md?payment-ui=embedded-components) 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](https://docs.stripe.com/payments/advanced/collect-addresses.md) collection. | Requires handling addresses manually. | | **Order tracking** | Built-in order summary and [receipt](https://docs.stripe.com/payments/advanced/receipts.md) functionality. | Requires implementing custom order tracking. | | **Amount updates** | [Dynamic inventory and line item updates](https://docs.stripe.com/payments/advanced/dynamic-updates.md). | Requires manually updating the amount. | | **Session expiration** | Automatic expiration after 24 hours. | No automatic expiration. | | **Webhook events** | [Webhook events](https://docs.stripe.com/webhooks.md) for the complete checkout lifecycle. | Payment status events only. | ## See also - [Build a checkout page with the Checkout Sessions API](https://docs.stripe.com/payments/quickstart-checkout-sessions.md) (recommended) - [Checkout Sessions API reference](https://docs.stripe.com/api/checkout/sessions.md) - [Payment Intents API reference](https://docs.stripe.com/api/payment_intents.md) - [Migrate from Payment Intents to Checkout Sessions](https://docs.stripe.com/payments/payment-element/migration-ewcs.md)