Finalize Stripe payment on server with 3D secure/sca (card authentication)

472

To answer your headline question: You cannot. If you could, the whole security feature would be pointless. You need client side authentication.

PSD2/3D Secure/2-factor-authentication or any other mechanism relies on the bank to tell the client what to do to authenticate. They might reroute you to a different site, owned by the bank, they might ask you for a PIN or one-time-code, or anything else they deem suitable. They will interact with the user, that is the only point of all this.

The method that will handle it is called confirmPaymentIntent (might vary a little depending on which package you use). It will need to be called client side with a payment intent for the payment. It will then show a testing screen for the test card numbers stripe provides.

Share:
472
mirco.pinton
Author by

mirco.pinton

Updated on December 27, 2022

Comments

  • mirco.pinton
    mirco.pinton over 1 year

    I'm trying to implement Stripe payment in my Flutter mobile app, but I need to finalize the payment on server side.

    Does anyone know how I can do this with also 3D secure/sca? I am able to show 3D secure/sca page only finalising payments on client side. Checking online documentation, I have found this: https://stripe.com/docs/payments/accept-a-payment-synchronously, but stripe packages (I have tried with stripe sdk and stripe_flutter) don't provide stripe.handlecar action.

  • James 666
    James 666 over 3 years
    But how do we display this PSD2/3D Secure/2-factor-authentication on the client side? Stripe seems to manage it with a url that displays this: i.stack.imgur.com/UzJSw.png But how can we display this in Flutter? This is the issue
  • nvoigt
    nvoigt over 3 years
    Did you call the method? What happened? In my web frontend (not flutter) it was one JS method call that then did all the UI itself.
  • James 666
    James 666 over 3 years
    Honestly I have no idea what the method is - there's no documentation for flutter and stripe so idk. Saw the JS documentation and that makes sense
  • Simone Pozzobon
    Simone Pozzobon over 3 years
    Guys, according to stripe documentation the 3D secure can be handled by the client without confirming the payment itself. See step 5 from this link (which explain how to finalize payment on server side): stripe.com/docs/payments/…. The real question is: does stripe SDK fro flutter contain the interface to handle next actions as the iOS one is doing?