How Payment Intents and Setup Intents work
Learn about the lifecycle of Payment and Setup Intents.
You use the Payment Intents API to immediately charge a customer and collect payment, and the Setup Intents API to collect and save payment method details for future use without creating a charge. Payment Intents create charges and process transactions to collect funds. Setup Intents set up payment credentials but don’t process payments.
Authentication
Payment Intents use 3D Secure (3DS) to authenticate the customer for the applicable transaction.
Setup Intents use 3DS to authenticate a payment method without charging it, then create a mandate or agreement for future charges.
Lifecycle
Both Payment Intents and Setup Intents go through the same set of states. To understand the mapping between payment statuses in the Dashboard and the PaymentIntent status, see Payment status mapping.
| State | Payment Intent | Setup Intent |
|---|---|---|
| Requires payment method | After you create the PaymentIntent, its status is requires_ until you attach a payment method. Create the PaymentIntent as soon as you know the amount to charge so Stripe can record all attempted payments. | After you create the SetupIntent, it has a status of requires_ until you attach a payment method. |
| Requires confirmation | After your customer provides payment information, the PaymentIntent enters the requires_ status and is ready to confirm. Most integrations skip this state because they submit payment method information when the payment is confirmed. | After your customer provides payment information, the SetupIntent enters the requires_ status and is ready to confirm. Most integrations skip this state because they submit payment method information when the SetupIntent is confirmed. |
Requires actionAPI changesVersions of the API before 2019-02-11 show | If the payment requires additional actions, such as authenticating with 3D Secure, the PaymentIntent has a status of requires_. | If the setup requires additional actions, such as authenticating with 3D Secure, the SetupIntent has a status of requires_. |
| Processing | Occurs after required actions are handled and the payment uses an asynchronous payment method, such as bank debits. These types of payment methods can take up to a few days to process. If you’re separately authorizing and capturing funds, your PaymentIntent can instead move to requires_. In that case, attempting to capture the funds moves it to processing or succeeded depending on the payment method. | Occurs after required actions are handled. Some payment methods (for example, cards) can process quickly while other payment methods can take up to several days to process. |
| Succeeded | A PaymentIntent with a succeeded status means that the corresponding payment flow is complete. The funds are now in your account and you can confidently fulfill the order. If you need to refund the customer, you can use the Refunds API. If the payment attempt fails (for example, due to a decline), the PaymentIntent’s status returns to requires_ so that the payment can be retried. | A SetupIntent with a succeeded status means that the setup is successful. You can now attach this payment method to a Customer object and use the payment method for future payments. If the setup fails, the SetupIntent’s status returns to requires_. |
| Canceled | You can cancel a PaymentIntent before it reaches a processing or succeeded state. Cancellation invalidates the PaymentIntent for future payment attempts, releases any held funds, and can’t be undone. You can also cancel a PaymentIntent in the processing state when the payment method is ACH, ACSS, AU BECS, BACS, NZ BECS, or SEPA. However, cancellation might fail due to a limited and varying cancellation time window. PaymentIntents might also automatically transition to canceled if they’re confirmed too many times. | You can cancel a SetupIntent before it reaches a processing or succeeded state. Cancellation invalidates the SetupIntent for future setup attempts, and can’t be undone. |