Skip to content
Advertisement

Trigger Stripe SCA redirection for authentication

I have this stripe file StripePayment.php

JavaScript

and i am charging the card like this

JavaScript

This code is able to charge cards but can’t charge cards where 3D/SCA is required i.e European cards.

My question, is there a way i can request stripe to redirect the user to the card issuing bank for authentication so that the user can authorize the transaction?

My stripe form code looks like this

JavaScript

According to the docs on how to manually require the user to be redirected to the bank url for further authentication https://stripe.com/docs/payments/3d-secure#manual-three-ds

JavaScript

does the stripe sdk automatically know the bank url to redirect to or who feeds that info?

Advertisement

Answer

The bank-hosted authentication URL is handled by redirecting through that redirect_to_url.url, or alternatively is managed automatically when using Stripe’s Payment Intent API with confirmCardPayment in Stripe.js v3 (migration guide). If you use confirmCardPayment, you yourself don’t need to manage the redirect at all. This is the recommendation approach to supporting 3D Secure.

You can support 3DS using the Sources API, but this is deprecated and no longer recommended.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement