#eric-nomad_unexpected

1 messages ยท Page 1 of 1 (latest)

elfin topazBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1225150285018566727

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

rain emberBOT
mild willow
#

When you say "app" is this a mobile app? Also do you have a payent intent ID that I can take a look at?

viral rock
#

Yes it is a mobile app written in Flutter. The PI is pi_3P1YQqC8CMOYOnxy0GxKyg7z

#

The PI shows the message "The cardholder began 3D Secure authentication but has not completed it." which is the same message I'm seeing in some real transactions that I am not handling properly in my code.

mild willow
#

Is there a reason you're using a setup intent and following that up immediately with a Payment Intent? You shouldn't need the Setup Intent at all if you're planning to charge immediately

viral rock
#

I am storing the setup_intent and using it for future transactions

mild willow
#

With Payment Intents you should be able to save the Payment Method for future usage as well

viral rock
#

This has been working successfully for some time, in general. But I think we have not had cards requiring 3DS Secure Auth before, maybe.

#

In any case, what I don't understand is why if I am pressing Complete for this test transaction does it show as Incomplete?

mild willow
#

What's happening is that you're correctly saving the card and provinding 3DS authentication for the setup intent, but the 4000002760003184 is a test card that simulates needing authentication on EVERY single transaction, even if you've used a setup intent to correctly save it

#

The test card is meant to emulate scenarios where the card issuer/bank chooses to require authentication every time

#

So even though your Setup Intent was successful, the Payment Intent that you create after the fact is failing because it also needs authentication to be completed

viral rock
#

I see. I wonder why the app isn't showing me the Test Page a second time in that case - I guess because it's offline

mild willow
#

Yup - it's because you're confirming server-side. You'd need to confirm client-side or handle the next action client-side to complete authentication

rain emberBOT
viral rock
#

We've had a lot of problems with Stripe support in Flutter. My developer is currently using the flutter_stripe plug-in, which I guess is not an official Stripe product.

neat mason
#

๐Ÿ‘‹ stepping in as karbi needs to step away

#

That's correct -- we don't maintain or support the Flutter plugin. That is done by a third party. We recommend using our iOS/Android/React Native SDKs which we do directly support.

viral rock
#

But can we use those in a Flutter project?

neat mason
#

I don't believe so, no, but I'm not super familiar with Flutter in general.

viral rock
#

OK. So in terms of @mild willow's recommendation above, it sounds like after the Payment Intent is created, I should use the client-side library's "Confirm payment intent" function to confirm the PI, which will cause the 3DS Secure process to come up again?

neat mason
#

Yep that's the easiest way

#

Basically you need to use this snippet: await Stripe.instance.confirmPayment( clientSecret['clientSecret'], PaymentMethodParams.card( paymentMethodData: PaymentMethodData( billingDetails: billingDetails, ), options: PaymentMethodOptions( setupFutureUsage: _saveCard == true ? PaymentIntentsFutureUsage.OffSession : null, ), ), );

viral rock
#

I think the app currently is only creating the PM client-side, and then passes this server-side to create the setup intent. Is is the creation of the PM that is triggering the 3DS page?

neat mason
#

3DS is triggered on SetupIntent or PaymentIntent confirmation

#

not PaymentMethod creation

#

So looking at your example above (pi_3P1YQqC8CMOYOnxy0GxKyg7z), I can see that the PaymentMethod was successfully created/attached via a SetupIntent and 3DS was completed. However, then when you attempted to Charge it by confirming the PaymentIntent using that card, 3DS was triggered again and needs to be completed.

#

You would use the await Stripe.instance.confirmPayment... code client-side in your Flutter app to handle 3DS for that PaymentIntent and complete the Charge

viral rock
#

I see. OK thank you, I'll review your feedback with my Flutter developer.