Payment Intents API

    Learn about Stripe’s new foundational payments API.

    The Payment Intents API is a new way to build dynamic payment flows. It tracks the lifecycle of a customer checkout flow and triggers additional authentication steps when required by regulatory mandates, custom Radar fraud rules, or redirect-based payment methods. By using our Web, iOS, and Android client libraries, you can rely on Stripe to automatically launch authentication flows or provide the appropriate redirect URL.

    The Payment Intents API also serves as the foundation of other products such as Terminal. In the future, we expect this API to power all payment collection on Stripe.

    See how it works

    A PaymentIntent object tracks the state of the payment through the status attribute. When the payment is successful, the status of the PaymentIntent changes to succeeded and you can confidently fulfill the order.

    The Payment Intents API centers around two actions:

    • Create. Creating a PaymentIntent at the beginning of a checkout flow lets you track all the attempts to pay for an order.
    • Confirm. Confirming a PaymentIntent will attempt to take the payment through the entire payment process. You can confirm a PaymentIntent either on your server with confirm or on the client with Stripe.js and the mobile SDKs.

    See how it works for a one-time payment like an e-commerce order or donation:

    PaymentIntent status

    curl https://api.stripe.com/v1/payment_intents \
    -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
    -d amount=1222 \
    -d currency=usd

    Returns a PaymentIntent with status requires_payment_method

    Accepting one-time payments

    A one-time payment typically collects payment details to be immediately charged and then fulfills the order with actions like sending a receipt, shipping an order, or marking something in a database as paid. Depending on how you fulfill your payment, you can have Stripe automatically confirm the payment for you on the client or you can manually confirm the PaymentIntent on your server after the payment has been authenticated. Use the table to understand the trade-offs between automatic and manual confirmation.

    Automatic confirmation

    Confirm the payment on the client and use webhooks for post-payment logic
    Flow diagram for Payment Intents API with automatic confirmation
    • Easiest way to start on the Payment Intents API
    • Asynchronous fulfillment with webhooks after payment succeeds
    • Stripe handles the UI for authentication flows like 3D Secure 2
    • Integrate once and easily handle all payment methods with small UI changes
    • Fewer round trips to your server — Stripe.js takes care of authentication

    Manual confirmation

    Confirm the payment on your server and immediately execute any additional logic
    Flow diagram for Payment Intents API with manual confirmation
    • Easiest way to directly migrate from the Charges API
    • Synchronous fulfillment on your server after payment succeeds
    • Stripe handles the UI for authentication flows like 3D Secure 2
    • Requires larger integration changes to handle non-card payment methods
    • Requires additional round trips to your server when authentication is needed

    Off-session payment flows

    The Payment Intents API works for payment flows that collect payment details and charge later when the customer is not available to complete additional authentication. This is also known as off-session payments.

    Migrating existing Stripe integrations

    We encourage anyone who is preparing for SCA to move to the Payment Intents API to take advantage of exemption logic and a simpler integration before September. Any integrations using the Charges API will not be SCA-ready.

    Plugins and platforms

    For plugin and platform users preparing for SCA, we plan to update our Works with Stripe gallery to feature partners that have upgraded to the Payment Intents API.

    Questions?

    We're always happy to help with code or other questions you might have. Search our documentation, contact support, or connect with our sales team. You can also chat live with other developers in #stripe on freenode.

    Was this page helpful? Yes No

    Send

    Thank you for helping improve Stripe's documentation. If you need help or have any questions, please consider contacting support.

    On this page