Forum Academy Marketplace Showcase Pricing Features

Stripe.js and 3Ds Authorisation

Hi all, @copilot

We’re using Stripe.js specifically the Payment Intent Create and then Payment Intent Capture and for most payments, it works great. However, there are a few instances where the payment is not authorised and requires 3DS to authenticate.

How do we solve that? We’re using Stripe Connect as well for this implementation. It seems to get to this state in Stripe, but we’re never prompted to authenticate (either in mobile banking app or any popups).

Much appreciated any advice

1 Like

It seems to be that on the first payment it asks for 3D secure. In Spain for example, all the banks have implemented that.

I don’t know if you can bypass that.

Thanks Ryan - how do we handle that with the Stripe.js plugin? I’d have thought if it’s such a common event there would be a handler built in for it?

Hey @help

Don’t know to handle those ones yet. I was thinking maybe if the user does not finish the 3D secure, send him a notification.

If I figure something out I’ll let you know.

I was able to figure it out. We were using Server Side Stripe API calls. Instead we needed to use the Stripe Elements system to run the payment client side, and then set up the trigger to handle the Stripe response so it triggers the Stripe 3D Secure popup.

We can then handle if the user authenticates (and then collect payment) or if they don’t (and throw an error).

All working now!

1 Like

Wow! Thanks for pointing that out.

1 Like

no probs

Hey @help,

You got it right! Stripe needs the cardholder to authorize the payment for 3D Secure which can happen both on-session (e.g. they’re present) or off-session (e.g. subscription payment). In both cases, Stripe offers Stripe Elements and webhooks to handle authorization respectively. As long as you have your PaymentIntent’s Client Secret, Stripe.js can trigger the popup for your customer to securely authorize their payment. :slight_smile:

2 Likes

Thanks - I bought the course and that helped me figure out the difference between server side Stripe actions and the Elements setup

2 Likes