#iffa_unexpected
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/1417444214966452245
π Have more to share? Add more details, code, screenshots, videos, etc. below.
π happy to help
it seems you're using the PlatformPayButton instead
would you mind sharing the PaymentIntent ID that failed with requires_action?
Was just about to link that this is more closer to what we're doing: https://docs.stripe.com/google-pay?platform=react-native#react-native-create-payment-method
here's my most recent test mode attempt with google pay and a payment method that was described as "3DS OTP": pi_3S7v58HZBAnLXGDV1rMHxdsL
That same payment method on the web using stripe-react-whatisitcalled works as expected (express payment element)
you should create the PaymetnIntent and confirm on the frontend instead of confirming on the backend
would you mind sharing the PI ID that is working on the web?
pi_3S7vXDHZBAnLXGDV1FSdd4rK
ok I see
so in the web version of your code you're using the confirmationToken which has all the information about the PaymentMethod and it's a different flow then the one you're using in your RN implementation
Yeah we have two different flows because the RN SDK doesn't provide a similar flow to web at all. the RN platform payment button "validate payment method on server" flow is also seemingly different from the RN payment sheet one
how would we do this then, we have a business requirement to validate the payment method before creating a payment (using card IINs)
I do think that you should create the PaymentMethod first, create the PaymentIntent, then send the secret and confirm on the RN app
that's the best option to avoid 3DS
so create with confirm: false, return the secret, then call confirmPlatformPayPayment?
you don't need to pass confirm: false you just omit it
and yes then call confrimPlatformPayPayment
i can test it but i'm worried that'll lead into us showing the native platform payment sheet twice
since i believe it will have closed in-between
no it will only show the 3DS
hmm ok, i will test this quickly
this is a test without 3ds using the flow you suggested, and i am indeed seeing the payment sheet appearing twice, prompting to pay.
And i found this open issue about it: https://github.com/stripe/stripe-react-native/issues/1814
would you mind sharing your code please?
can you use the confirmPayment instead of confirmPlatformPayPayment? https://stripe.dev/stripe-react-native/api-reference/functions/confirmPayment.html
Hey! Taking over for my colleague.
Or you can call this https://stripe.dev/stripe-react-native/api-reference/functions/handleNextAction.html from your RN app after creating the PaymentIntent from your backend with confirm: true
How would I do that? Since the payment intent creation fails when calling with confirm: true
Can you share the PaymentIntent Id ?
Because this one is created successfully
it's in this msg
This worked for a standard Gpay payment without 3DS, but if i use a card that requires 3DS, it fails:
LOG Payment method created using createPlatformPayPaymentMethod, calling API pm_1S7wfDHZBAnLXGDV5bjLTXgX
LOG Received payment intent client secret, calling confirmPayment {"paymentIntentStatus": "requires_confirmation"}
LOG Received confirmPayment result {"error": {"code": "Failed", "declineCode": "authentication_required", "localizedMessage": "Your card was declined. This transaction requires authentication.", "message": "Your card was declined. This transaction requires authentication.", "stripeErrorCode": "authentication_required", "type": "card_error"}}
For the PaymentIntent pi_3S7v58HZBAnLXGDV1rMHxdsL, the bank issuer declined the payment (no 3DS action required), so the customer need to provide another payment method or re-collect it from scratch
That's a difference case from the PaymentIntent pi_3S7vXDHZBAnLXGDV1FSdd4rK (which requested a 3DS)
Well I don't know what is happening behind the scenes but here's what I do know:
- I try to pay using Google Pay and with "3DS OTP" card selected
This works on the web (3DS is initiated) but fails in React Native (authentication_required) when calling confirmPayment with the PI client secret (or with confirm=true in the backend)
Well I don't know what is happening behind the scenes but here's what I do know:
You need to adapt your integration to handle both use cases
After you create the PaymentIntent:
- If the request succeeded and the PaymentIntent is in requires action status => you call the handleNextAction or confirmPayment on the frontend
- If the request fails with a (bank issue) decline, you ask the customer to use another saved card or re-collect a new PaymentMethod
Why is the same GPay card getting requires action status from the web but requires confirmation from RN? that's what i'm not understanding atm
hi! I'm taking over this thread.
it's up to the bank to decide what to do with the payment, that's not something you can control. so as mentioned above, you need to handle both scenarios.
different cards/users/country/device will have different behaviors.
I understand that, and am now wondering about the difference in functionality between web & mobile/RN for the exact same test card in GPay.
Since it seems I cannot initiate the 3DS flow for testing at all on mobile, but I can just fine on web
(And I need to test 3DS with GPay on mobile because we've had feedback in production from some of our customers that they cannot pay using GPay)
pi_3S7vXDHZBAnLXGDV1FSdd4rK this PI is for a GPay test card with 3DS, and initiated 3DS on the web
pi_3S7v58HZBAnLXGDV1rMHxdsLthis PI is for the exact same GPay test card, but on mobile, and does not initiate 3DS (just fails, no matter what wrangling I perform and where)
And here's a payment intent using GPay in production that initiated 3DS (via our mobile app): pi_3S7fAWHZBAnLXGDV1AowfnyR but for whatever reason either due to an implementation issue in our app, or a bug somewhere, no 3DS confirmation ever starts. <- I cannot reproduce this in test mode because I cannot get the payment into such a state.
thanks for the clarification. I recommend creating a support case, so that our team can look into this more deeply.
Hello @limber smelt, we have sent you a direct message, please check it at https://discord.com/channels/@me/1417477643917594645
- πThe message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
Opened support case, thanks for the help anyways
Thanks, we'll get back to you shortly by email.