#Kamesh
1 messages · Page 1 of 1 (latest)
Hi there! Checking in on this, though it'll take me a few more minutes
Hello! Apple Pay and Google Pay are, by definition, on-session because the customer is present. You should never show the Apple Pay/Google Pay sheet and then do an off-session transaction with the result.
For 3D Secure specifically, it is possible for Google Pay (and technically Apple Pay) to require 3D Secure. If you read the comments in the code snippet here it explains how the payment sheet is closed first, then you check to see if there's a next action required and, if so, handle that after the payment sheet separately: https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#html-js-complete-payment
The next action would be where 3D Secure happens.
thanks.
so is it possible for us to capture the card details and allow the UI to call our backend to confirm the payment rather than the payment request button sdk confirming straight to Stripe?
Yes, you can listen for the paymentmethod event from the paymentRequest to get the Payment Method, then send that to your server, attempt to confirm the Setup or Payment Intent, then pass the results back to the client to handle whatever's next: https://stripe.com/docs/js/payment_request/events/on_paymentmethod
So if you pass the Payment Method to your server, confirm, then a next action is required you can pass the Intent's client secret back to the client and use stripe.handleCardAction to handle the action (like 3D Secure): https://stripe.com/docs/js/payment_intents/handle_card_action
thanks
No problem! Is there anything else I can do to help?