#Ammar-SI
1 messages · Page 1 of 1 (latest)
Sure, so I have a booking app that allows users to book assets.When a payment fails due the card requiring authentication via 3DS I have to cancel their booking so it is available to other customers. Now when they go to make the same booking again the same thing is likely going to happen. I cannot let them re-confirm the payment intent since the booking may already be taken by now.
What I can do is tell them to re-authenticate their card. I was thinking I would have a button that when they press it. It refreshes the setup intent and prompts 3DS. That way when they make a booking, since they just completed 3DS it is unlikely to come up again.
Thanks for the clarification!
When a payment fails due the card requiring authentication via 3DS
When that happens, are your customers on your website? If so, they should be able to go though the 3DS flow.
I handle the payment intent confirmation server side. They are on session, but I cannot refactor the code to somehow return the payment intent and ask them to reconfirm then go back to making the rest of the booking.
It is a legacy applicaiton.
That would have been the best option indeed!
Ok, give me a few minutes to investigate.
Ok, thats fine. Thank you for investigating for me. I look forward to hearing back from you.
Sorry for the delay! So you basically have two options:
- Create a new SetupIntent to collect new card details
- Or if you want to do 3D Secure on the existing card, you can create a new SetupIntent with the
payment_methodparameter, and then confirm it with https://stripe.com/docs/js/setup_intents/confirm_card_setup#stripe_confirm_card_setup-existing
No worries, so I can use an existing payment method. Create a new setup intent and pass the client secret along with the payment method id to the confirm setup intent method.
Exactly! And don't forget to set the payment_method when creating the new SetupIntent https://stripe.com/docs/api/setup_intents/create#create_setup_intent-payment_method
In my legacy application I have a card_id from stripe for each of my users cards. I am migrating to use setup intents and payment intents instead of sources and charges. What is the best way to do this? I was thinking I could get/create payment methods from a card_id. And they create a setup intent with that payment_method_id? Is this possible? If not what alternatives are there?
Hello?
hello
note that it's all backwards compatible
like if you have a Card card_xxxx or Source src_xxxx, you can pass those to any API that takes a payment_method so it just works
so you don't have to do anything with old saved card objects, you just start using intents