#tomh0027
1 messages · Page 1 of 1 (latest)
With Payment Element integration, it supports Google Pay automatically alongside with other payment methods: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements&client=react
If you wish to only have Apple Pay and Google Pay button, Payment Request Button can be used: https://stripe.com/docs/stripe-js/elements/payment-request-button?client=react
so if I use PaymentElement, does it automatically show google pay as option?
Yes if the device is eligible for Google Pay (having Google Pay wallet with a card saved)
how can I check if eligible or not?
This is the requirements for Google Pay: https://stripe.com/docs/stripe-js/elements/payment-request-button
With Payment Element, there is no function provided for you to check if Google Pay is eligible on customer's device
so do I have to go to https://pay.google.com/ and setup payment method beforehand?
No, it's not needed for web payment
but why I Google Pay button doesn't show up?
Can you share your development website, so that I can have a check?
url?
Yes
How can I go to the payment page?
I put ExpressCheckoutElement to see if that works, but it's showing Link pay button only
what do you mean subscription id?
In this checkout page, it shows the subscription sign up page. Do you create Subscription first and render Payment Element by setup intent client secret?
Ah I see
Let me double check
Can you share the code of creating Payment Element?
I'm able to see Google Pay in my own integration with deferred intent flow
this is the checkout page
Where do you initialise <Elements>? I don't see it in this code
This page is served through HTTP. Google Pay is only supported in HTTPS
In https://stripe.com/docs/stripe-js/elements/payment-request-button?client=react#react-prerequisites:
Serve your application over HTTPS. This is a requirement both in development and production. One way to get started is to use a service such as ngrok.
This pre-requisite applies to Payment Element, Payment Request Button and Express Checkout Element
I see
I'd recommend serving the website in HTTPS and try it again
Yes, return_url is a required field
is there any possibility to stay on the page?
For non-redirect based payment methods like card, then yes. However, redirect-based payment methods will still be redirected to return_url after completing the payment at the payment method page.
You may set redirect to if_required to handle non-redirect based payment methods directly in your page: https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect
can you tell me if google pay and Link are redirect based payment or not?
got you
thanks for your help