#Karan S-confirmcardpayment
1 messages · Page 1 of 1 (latest)
So as this is our custom flow,
When frontend dev opens modal, do we need to show anything like or just confirm button ? and on confirm will call ConifrmCardPayment
Is there a payment method attached to the PI at this point?
Yes like this can happen at first subscription flow or at recurring payment,
So we will have a payment method attached to subscription
And I guess we need to give option to add new payment method as well ?
Or select any from his existing payment methods
Correct ?
You could do yes! Otherwise if the PI already has a payment_method set then you can simply confirm it with the client_secret: https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-attached
If I use stripe link that send customer if action is required, what can be the flow ?
Sorry but I'm getting confused a bit
You asked if you can confirm a PI using just the client_secret, which you can
My concern was handling event
invoice.payment_action_required
So in that context I was saying all this
so this is regarding 3ds
Sure, so you'd action the event by bringing the user back on-session to confirm the PI and handle 3DS/auth
Which is what confirmCardPayment will do
How you do that depends on your application, but sending an email to the customer with a URL including the PI client_secret will work
Then you can just re-confirm the PI with the method I shared above
I'm not sure where the confusion lies
I was thinking that should we need to show a modal to confirm payment or just on URL hit confirm the PI and show status to user.
Also stripe do all this for us like sending email I guess by setting up in settings as well so what can be easy and better way.
I was thinking that should we need to show a modal to confirm payment or just on URL hit confirm the PI and show status to user.
That's entirely up to you and your integration. But the likelihood is that the user will see a modal to complete 3DS/auth requested by the bank.
As a customer, I would find it quite jarring if I opened a URL and was presented with the 3DS modal immediately without a button click.
Also stripe do all this for us like sending email I guess by setting up in settings as well so what can be easy and better way.
We have some recovery functionality you can leverage, yes: https://stripe.com/docs/billing/revenue-recovery/customer-emails#prevent-failed-payments-emails
Stripe hosted seems better.
As to show modal on webhook event url hit, I need to show some details as well which require extra API calls to stripe to fetch card details to show in modal. and payment details also
😅
Sounds good!
Thanks.