#RMoura_JS-recurring

1 messages · Page 1 of 1 (latest)

turbid remnant
#

you can definitely get a link to handle 3D Secure v2 if you want

#

In the case of 3d secure, it was easy since the response includes a redirect link
I assume you wrote code that looked inside next_action[use_stripe_sdk]? that was wrong

#

works the same for 3DSv2 and v1

jolly scarab
#

Ok! makes sense!

turbid remnant
#

now having said that, yes, you should not email that link directly to the customer(because it might expire). You should direct them to your site and then your site can confirm the PaymentIntent and handle 3DS that way

#

Can I provide stripe.js the paymentIntent id that failed with a requires actions error, and stripe.js will do what needs to be done (such as redirecting the user to the 3ds auth)?

yes!

#

If the payment failed due to an authentication_required decline code, use the declined PaymentIntent’s client secret and payment method with confirmCardPayment to allow the customer to authenticate the payment.

jolly scarab
#

Thank you so much 🙂

#

I think I understand!

#

Just to confirm: when the payment status is requires_confirmation?/ requires_action? can I do this confirmpayment with stripe.js? (When should I do this confirmpayment?)

turbid remnant
#

calling confirmCardPayment does a few things — it attempts to confirm the PaymentIntent (which is charging the customer), if that attempt fails due to 3DS being needed, the PaymentIntent moves to requires_action and confirmCardPayment internally, all in this one call, will present the 3D Secure interface; and then return back to you the final status(hopefully paid) when it's all done

#

so you can pass it a PaymentIntent in either of those statuses and it should do the right thing and work

jolly scarab
#

Perfect!

#

🙂

jolly scarab
#

So now im using the confirm payment (server side) and im getting the next_action. Here can I redirect the user to next_action.redirect_to_url.url?

#

Am i corret?

turbid remnant
#

yep, if the customer is present at the time you're doing this, you can redirect them from your site to that URL if that's the goal

jolly scarab
#

the customer is not present when I do the payment intent, but on failure ill email him a link to a route that does this redirect

#

I think it's the best option