#ryancwalsh
1 messages · Page 1 of 1 (latest)
Hi, could you please summarise the question?
@languid pendant was correct that rebooting my Mac then allowed https://stripe.com/docs/stripe-js/elements/payment-request-button to show a clickable Google Pay button. (Restarting just the Chrome browser wasn't enough.)
However, we still haven't solved the main problem.
My company wants to allow customers to add a payment method(card, Google Pay, Apple Pay, etc) without making a charge immediately.
(And the way that we will make a charge is Invoices.)
So I'm trying to add a PaymentElement. https://stripe.com/docs/payments/payment-element
And use this flow to "Collect payment details before creating an Intent".https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=setup
I used:
const options: StripeElementsOptions = {
mode: "setup",
currency: "usd",
};
But Google Pay didn't appear in my form.
Then I tried:
const options: StripeElementsOptions = {
mode: "setup",
currency: "usd",
paymentMethodTypes: ["card", "google_pay"],
};
But I get:
Uncaught IntegrationError: Invalid value for elements(): paymentMethodTypes.1 should be one of the following strings: alipay, affirm, afterpay_clearpay, au_becs_debit, acss_debit, bacs_debit, bancontact, blik, boleto, card, cashapp, customer_balance, eps, fpx, giropay, grabpay, ideal, klarna, konbini, mobilepay, nz_bank_account, oxxo, p24, pay_by_bank, paypal, sepa_debit, sofort, south_korea_market, swish, three_d_secure, upi, us_bank_account, wechat_pay, paynow, pix, promptpay, revolut_pay, netbanking, id_bank_transfer, link, demo_pay, zip. You specified: google_pay.
Thanks.
👋
So first you can use a SetupIntent with Payment Request Button and that works to just collect details
But otherwise you should be able to use deferred-intent with setup mode and you can either specify card for paymentMethodTypes or you can leave that out and just ensure you have Google Pay turned on in your settings at https://dashboard.stripe.com/test/settings/payment_methods
If Google Pay isn't showing, then there is a problem with your wallet set up
A good way to check on that is to visit https://stripe.com/docs/stripe-js/elements/payment-request-button and make sure you see the Google Pay button at the top in Chrome
https://stripe.com/docs/stripe-js/elements/payment-request-button shows a clickable Google Pay button, so I don't think my Google Pay wallet is a problem.
I don't think I want to use Payment Request Button because I want one unified widget that supports multiple options (card, Google Pay, Apple Pay, Cash App, etc).
The Preview at https://dashboard.stripe.com/test/settings/payment_methods shows the Google Pay button: (screenshot 1)
But my PaymentElement still does not: (screenshot 2)
🤦♂️ I forgot to use ngrok to add HTTPS on localhost. I'm trying that now.
Unfortunately our app is written in a way where authentication won't work for ngrok domains, so I'll need to write a temporary workaround to pull the PaymentElement to a page that doesn't require auth.
But I bet you will be right!