The Setup Intent Lifecycle
Learn how a Setup Intent transitions through different statuses during the process of saving a payment method for future use.
Saving a payment method for future use varies by payment method. For example, one customer might be required to authenticate their credit/debit card using 3D Secure. This example is usually asynchronous, and it's hard to manage because it depends on customer interactions outside your application. The Setup Intent API simplifies this complex process by tracking the status of the Setup Intent.
awaiting_payment_method The initial status of a Setup Intent once created is awaiting_payment_method.
Once you are ready to ask your customer to save a payment method, create a Setup Intent from your backend. This Setup Intent plays a crucial role in tracking your customer's payment method save attempts and provides valuable insights into the saving process.
awaiting_next_action When your customer selects a payment method to save and provides the required information, the Setup Intent transitions to awaiting_next_action status. This transition occurs if any authentication, such as 3DS Secure for card payments, is required. The Setup Intent moves to the next status if no further authentication is needed.
processing After your customer completes the authentication, the Setup Intent will proceed to save the payment method. This operation is usually asynchronous and can be completed in seconds.
succeeded The Setup Intent status transitions to succeeded once saving the payment method is complete and no issues are encountered. The succeeded status also means the entire flow is complete.
awaiting_payment_method (red color) If saving a payment method encounters an error, the Setup Intent transitions back to awaiting_payment_method. Your customer can retry using either the same or a different payment method.