#Nancy-setup-intents
1 messages ยท Page 1 of 1 (latest)
Hi ๐ you'll create a Setup Intent for each Payment Method that you are creating for a Customer.
Do I need to cancel the setup intent if it's not used(?).
Say it it not used, do I cancel it and mark it 'abandoned' -> https://stripe.com/docs/api/setup_intents/cancel
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You don't need to cancel it, but it's a good idea to do so. The cancellation_reason value is mostly for your reference, so you can set it to whichever value best fits the flows that you're building.
So the customer may have many setup intent, but only 1-2 are actually "used" to create a new payment method?
Also one more question, I am using stripe.confirmCardSetup to add the cardElement to the setupIntent. After it's successful, I will then get the paymentMethodId and update it onto the customer. I saw in the documentation https://stripe.com/docs/payments/save-and-reuse for paymentMethod that
you can use stripe.retrieveSetupIntent to get the status < is this necessary(?). Since confirmCardSetup already provides a loading, and error already.
Yes, it is possible for a Customer to generate more Setup Intents than they use.
Retrieving the Setup Intent isn't strictly necessary, but it's worth considering. Relying on your site's logic to handle the next steps after a Setup Intent is confirmed, means your flow may not fully complete if a customer confirms the Setup Intent and then closes their browser before your site finishes executing its logic.
Also what's difference between a cancel vs uncancelled setup Intent (unused).
Canceled is a terminal state for Setup Intents, so once they've been canceled no further actions can be taken on them. A Setup Intent that has yet to be canceled is still updatable and usable.