#th3fallen
1 messages · Page 1 of 1 (latest)
How can I help?
morning
okay, so we currently have a flow like this... https://p181.p1.n0.cdn.getcloudapp.com/items/7KuWvbyv/80f751ee-3ee6-4dac-aa2e-8022aee6ee58.jpg?v=ebbc37ac75ffb5bdcc997baff3a362fd
billling and payment are both driven by your elements... (this is the editable state) https://p181.p1.n0.cdn.getcloudapp.com/items/5zuO7dyB/f849efac-0060-4e03-8e77-85ee78d4b5e4.jpg?v=2a4fe1eabc4fb907140c507fcab9b402
the issue im running into is a user goes to check out and changes their payment info (card number in this instance), then clicks purchase.
if the payment fails they obviously will try to edit their card info again.
but once they hit continue on the payment block it's doing a stripe.confirmSetup() so when they come back to edit a second time their setup intent has already been completed and cant be confirmed again.
But! since im using the react stripe elements thing the setupIntent key is not mutable so i cant just fetch a new one and rerender the component for some reason or another. so my question is what is the typical flow for this case?
But! since im using the react stripe elements thing the setupIntent key is not mutable so i cant just fetch a new one and rerender the component for some reason or another. so my question is what is the typical flow for this case?
That's correct, once the SetupIntent has been confirmed with the details, there's no way to update it with new PaymentMethod details.
We did introduce a new flow couple weeks ago where you can use Elements independent of Intents
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=setup
This allows you to render elements and create PaymentMethods without creating an Intent first
oooooooooooh
and that would let me theoretically create multiple setup intents for the case of failed payments huh?
i'll give that a shot. it sounds like exactly what i was hoping to be able to do
Yeah try it out, It should help avoid the situation you're running into