#usm-seong_code
1 messages Β· Page 1 of 1 (latest)
π 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.
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.
- usm_googlepay-3ds, 4 hours ago, 15 messages
- usm-seong_unexpected, 5 hours ago, 12 messages
- usm-seong_code, 6 hours ago, 13 messages
- usm-seong_code, 23 hours ago, 22 messages
- usm-seong_react-native-payment-sheet, 5 days ago, 46 messages
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
const { error: __stripeError } = await stripe.handleNextAction({
clientSecret: stripeResponse.client_secret,
});
if (__stripeError) {
handleStripeError(__stripeError);
return;
}
}
what does this do then?
is that something that FE can control whether or not display the 3DS challenge page?
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.
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?
π Stepping in for my teammate, give me a few minutes to catch up
thank you
So typically, Stripe handles next actions for you but some developers opt to handle this themselves: https://docs.stripe.com/payments/payment-intents/verifying-status#next-actions
Here's how you can define a return_url when using confirmPayment: https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-return_url
It would be as part of options, so at the same level as payment_method_data
I see. so what happens is we have 2 projects.
- web site (React) - it has those requires_action with stripe.handleNextAction
- 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?
I don't quite follow. What do you mean exactly by "when I try the same flow using same credit card with Google Pay"?
I mean when I checkout using G Pay
In test mode?
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
Do you have the two example PaymentIntent IDs?
yeah give me a min plz
https://dashboard.stripe.com/test/payments/pi_3Ppx6qFbFOzNrsPE0zjVBCod
https://dashboard.stripe.com/test/payments/pi_3PpwvmFbFOzNrsPE0gaotWgG
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
would this help?
Hm, I recommend testing with one of our 3DS test cards instead: https://docs.stripe.com/testing#regulatory-cards
From what I can see about those two PIs, they both required 3DS
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
We don't keep threads open if they're inactive. When you return, feel free to open a new thread in #help . If it's related to 3DS, you can include a link to this thread in your message: https://discord.com/channels/841573134531821608/1275555785803563091
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
Can you try testing with the same test mode card instead of GooglePay to make sure you see the same behavior?
Sure
and share the PaymentIntent IDs if you can
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
It'd be best to test with the 3DS-specific test cards
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
It shouldn't be different ultimately but what might be triggering the difference here is ReactNative vs. React/webapp.
Hmm could you elaborate on it? Like what would happen on React Native vs Web with manual handling of requires_status?
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
Let's take a few steps back. If you can test with 4000002760003184 and show screenshots of what you see, that would help
Ok
@nimble turret are you still testing this or do you want to resume at a later time?
I'd like to resume at a later time