2

I have a Stripe custom payment flow on a website. This is based on the quickstart code, with the JavaScript SDK, HTML, and Python. This creates a PaymentElement, and mounts it.

This all works (in test mode, anyway) for card payments. However, whatever I do, I can't get the payment form to display a Google Pay option. I've enabled Google Pay and Link in the dashboard (also in test mode). I'm testing on my Android mobile, and I've installed Google Wallet. I've attached a card and my bank has texted me that the card has been registered for Android Pay. I can also confirm at pay.google.com that I have a payment method.

When I try to make a payment on the mobile, the Stripe dashboard shows this payment intent:

  "automatic_payment_methods": {
    "enabled": true
  },
  "capture_method": "automatic",
  "payment_method_types": [
    "card",
    "link"
  ],

but the payment form just shows a card number entry field, with no Google Pay or Link selection. Any ideas what's going wrong? One problem is that the Stripe docs for Google and Apple Pay almost exclusively reference PaymentRequest and the payment request button, but these aren't used in the current Stripe example code, which is just based on a PaymentElement.

More info: the page at https://stripe.com/docs/payments/payment-element does, I think, do a live demo of a payment form, with a note that "This demo only displays Google Pay or Apple Pay if you have an active card with either wallet". This doesn't show Google Pay on my mobile, or on Chrome on a desktop, even with all the Chrome payment settings turned on, and a saved payment method which the Pay logo.

QF0
  • 329
  • 2
  • 14

1 Answers1

1

If you don't see Google Pay at the top of this page, then I would recommend double checking a few things on your end:

  • Make sure you are using Google Chrome on a device that supports Google Pay
  • Make sure you have a card saved in your Google Wallet
  • Make sure the Google Chrome setting allow sites to check if you have payment methods saved is turned on.
  • Make sure you are not using an incognito window
  • Also note that Google Pay is not available in all countries, for example in India

Once you do see Google Pay on the link first link I shared, you should also see it in your own Payment Element, assuming you are using httpS.

soma
  • 1,332
  • 1
  • 2
  • 8
  • Well... that's pretty irritating. I had already checked all those things. The mobile and desktop Chrome only showed the Link option at the top of your test page, and not Google Pay, and Firefox showed nothing. Android Chrome didn't have an option for `allow sites to check...`, but Windows and Linux Chrome did. I played with the mobile a bit more and eventually Chrome's payment methods showed my card. After that, your test page on Android showed GPay instead of Link, and 5 minutes later my own site showed Google Pay. Windows/Linux Chrome still not showing the test page correctly though. – QF0 Apr 24 '23 at 14:04