#zzking
1 messages ยท Page 1 of 1 (latest)
Hi ๐ if you're working with cards, then it is instantaneous, the outcome is included in the response that is made to confirm the Setup Intent and the intent doesn't sit in a processing state.
Oh, do you mean if I call confirmCardSetup from Stripe.js, and customer handle 3DS/SCA successfully, then there is no "processing" status at all ? setupIntent would change from "requires_action" to "succeeded" directly ?
and yes I'm working with cards
I don't recall exactly whether it still technically steps through the processing status (though you should be able to see this in the logs for your flow), but yes, confirmCardSetup returns the successful Setup Intent or the error that prevented it from being successful.
So in theory I won't need to depend on the async Stripe event (like suggested in the original reply from your colleague) . Instead, I can just depend on the result of calling https://stripe.com/docs/js/setup_intents/confirm_card_setup to make sure setupIntent is OK ? i.e: if there is no error, then status will be succeeded
What is your overall goal?
If the goal is to trigger downstream processes, then using a webhook endpoint listening for events is a better approach. That approach removes the risk of your downstream processes not triggering if the customer promptly closes their browser or suddenly loses network connectivity that prevents your client-side code from executing.
I see . Yeah that was the goal.
Gotcha, then I would recommend sticking with a webhook-based approach.
thanks !
Any time! I need to step away soon, so I'm going to archive this thread. If there is anything else that my teammates can help with then please let them know in #dev-help. ๐
Hope you have a great weekend!
definitely , thanks Toby