#usm-seong_code

1 messages Β· Page 1 of 1 (latest)

trail trellisBOT
#

πŸ‘‹ 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/1275555785803563091

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

stable schoonerBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

remote dove
#

Hello
PaymentIntent moves to requires_action status when there are additional actions required from the end customer authorizing the payment like completing the 3DS auth etc

nimble turret
#
      const { error: __stripeError } = await stripe.handleNextAction({
        clientSecret: stripeResponse.client_secret,
      });

      if (__stripeError) {
        handleStripeError(__stripeError);
        return;
      }
    }
#

what does this do then?

trail trellisBOT
nimble turret
#

is that something that FE can control whether or not display the 3DS challenge page?

remote dove
#

https://docs.stripe.com/js/payment_intents/handle_next_action

Use stripe.handleNextAction in the finalizing payments on the server flow to finish confirmation of a PaymentIntent with the requires_action status. It will throw an error if the PaymentIntent has a different status.

Depending on the payment method and required action, the customer may be temporarily redirected from your site and brought back to the return_url parameter provided when the PaymentIntent is confirmed.

nimble turret
#

hmm

#

so is it something I have to use...?

#

or not really?

#

sorry i'm not fully understood

#

on use cases of it

#

also I don't have return_url on my react native app.
this is the piece of code

import {
  confirmPlatformPayPayment,
  PlatformPay,
  confirmPlatformPaySetupIntent,
  useStripe,
  confirmPayment,
} from '@stripe/stripe-react-native';

            if (!selectedCard?.isPlatformPay) {
              const { error: PIError, paymentIntent: paymentIntentResult } = await confirmPayment(
                clientSecret,
                {
                  paymentMethodType: 'Card',
                  paymentMethodData: {
                    paymentMethodId: selectedCard.token,
                  },
                },
              );
              intentResult = paymentIntentResult;
              error = PIError;
              billingAddress = selectedCard.billingAddress;
            } else if (isPaymentIntentFlow) {
              const { error: PIError, paymentIntent: paymentIntentResult } =
                await confirmPlatformPayPayment(clientSecret, payload);
              intentResult = paymentIntentResult;
              error = PIError;
            } else {
              const { error: SIError, setupIntent: setupIntentResult } =
                await confirmPlatformPaySetupIntent(clientSecret, payload);
              intentResult = setupIntentResult;
              error = SIError;
            }

where should I define return_url? also where do I add stripe.handleNextAction for requires_action status at?

hexed ocean
#

πŸ‘‹ Stepping in for my teammate, give me a few minutes to catch up

nimble turret
#

thank you

hexed ocean
nimble turret
#

I see. so what happens is we have 2 projects.

  1. web site (React) - it has those requires_action with stripe.handleNextAction
  2. React Native app - it doesn't have requires_action with stripe.handleNextAction
#

and when I try the same flow using same credit card with Google Pay, I keep getting 3DS challenge page from #2

#

however from #1 I don't see it at all

#

from user perspectives

#

do you think this piece of code is the culprit?

#

if so, do I have to use requires_action with stripe.handleNextAction for the React Native app as well?

hexed ocean
#

I don't quite follow. What do you mean exactly by "when I try the same flow using same credit card with Google Pay"?

nimble turret
#

I mean when I checkout using G Pay

hexed ocean
#

In test mode?

nimble turret
#

from #1, I am not redirected to 3DS challenge page at all
However from #2, I'm always redirected to 3DS page for like 2-3 seconds

#

yeah

hexed ocean
#

Do you have the two example PaymentIntent IDs?

nimble turret
#

yeah give me a min plz

#
#

would this help?

hexed ocean
nimble turret
#

hmm weird. I have to step out so could you please not archive this chat?

#

I'd like this chat alive so I can ask further questions as I try other things

hexed ocean
nimble turret
#

gotcha. thank you

#

Oh wait but

#

It's the same payment method so they'll both require it if one does, but on Web site(react) we don't show the 3ds challenge screen or whatever it's called

#

How can this is possible if the two require 3ds?

#

So is it about the code snippet i shared above?

#

Cuz my web site has that logic for requires_action

hexed ocean
#

Can you try testing with the same test mode card instead of GooglePay to make sure you see the same behavior?

nimble turret
#

Sure

hexed ocean
#

and share the PaymentIntent IDs if you can

nimble turret
#

Afraid i cant test that now. But both used Google pay

#

Arent those enough? πŸ‘€

#

Hoping the use case with google pay would be enough to debug

hexed ocean
#

It'd be best to test with the 3DS-specific test cards

nimble turret
#

Ok i can share that tmr but could you explain what’s going to be different if i manually handle requires_action status?

#

How is that going to be different in terms of user experience

hexed ocean
#

It shouldn't be different ultimately but what might be triggering the difference here is ReactNative vs. React/webapp.

nimble turret
#

Hmm could you elaborate on it? Like what would happen on React Native vs Web with manual handling of requires_status?

hexed ocean
#

I think I might still be a little confused about the behavior you see, to be honest. As far as I can tell on my end, both of those PIs required additional authentication. The only other difference I see is the web integration used confirmation tokens but that shouldn't affect the 3DS flow

nimble turret
#

Yes but only RN displays 3ds challenge page

#

πŸ€”

hexed ocean
#

Let's take a few steps back. If you can test with 4000002760003184 and show screenshots of what you see, that would help

nimble turret
#

Ok

hexed ocean
#

@nimble turret are you still testing this or do you want to resume at a later time?

nimble turret
#

I'd like to resume at a later time