Skip to main content
RapidDev - Software Development Agency
stripe-guide

How to enable Google Pay in Stripe

Enable Google Pay in Stripe by activating it in the Dashboard, adding the Payment Request Button Element to your frontend, and confirming payments with a PaymentIntent. Google Pay appears automatically on Chrome when the customer has a saved payment method in their Google account — no separate Google API setup required.

What you'll learn

  • How to activate Google Pay in the Stripe Dashboard
  • How to display the Google Pay button using the Payment Request Button Element
  • How to confirm a payment when the customer uses Google Pay
  • How to test Google Pay with Stripe test mode
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner6 min read15 minutesStripe.js v3, Chrome 61+, Android Chrome, Node.js 18+ backendMarch 2026RapidDev Engineering Team
TL;DR

Enable Google Pay in Stripe by activating it in the Dashboard, adding the Payment Request Button Element to your frontend, and confirming payments with a PaymentIntent. Google Pay appears automatically on Chrome when the customer has a saved payment method in their Google account — no separate Google API setup required.

Accepting Google Pay Payments with Stripe

Google Pay lets customers pay quickly using cards saved in their Google account. With Stripe, enabling Google Pay requires no separate Google API integration — you activate it in the Stripe Dashboard and use the same Payment Request Button Element that also supports Apple Pay. Stripe detects the customer's browser and shows the appropriate wallet option automatically.

Prerequisites

  • A Stripe account with payment processing enabled
  • Your domain served over HTTPS
  • Stripe.js loaded on your frontend with your publishable key (pk_test_...)
  • A backend endpoint that creates a PaymentIntent

Step-by-step guide

1

Activate Google Pay in the Stripe Dashboard

Go to Stripe Dashboard → Settings → Payment methods. Find Google Pay in the Wallets section and make sure it is enabled. In most accounts Google Pay is enabled by default.

Expected result: Google Pay shows as 'Enabled' under Payment methods in your Stripe Dashboard.

2

Create a PaymentIntent on the server

Create a PaymentIntent with automatic_payment_methods enabled. This lets Stripe determine which payment methods to offer, including Google Pay.

typescript
1// server.js
2const express = require('express');
3const Stripe = require('stripe');
4const stripe = Stripe(process.env.STRIPE_SECRET_KEY);
5const app = express();
6app.use(express.json());
7
8app.post('/api/create-payment-intent', async (req, res) => {
9 const intent = await stripe.paymentIntents.create({
10 amount: req.body.amount, // in cents
11 currency: 'usd',
12 automatic_payment_methods: { enabled: true }
13 });
14 res.json({ client_secret: intent.client_secret });
15});
16
17app.listen(3001);

Expected result: The endpoint returns a client_secret for the frontend to use.

3

Add the Payment Request Button to your page

Create a PaymentRequest object and mount the Payment Request Button Element. On Chrome with a Google account that has saved cards, the Google Pay button will appear automatically.

typescript
1const stripe = Stripe('pk_test_your_publishable_key');
2
3const paymentRequest = stripe.paymentRequest({
4 country: 'US',
5 currency: 'usd',
6 total: { label: 'Order total', amount: 2000 },
7 requestPayerName: true,
8 requestPayerEmail: true
9});
10
11const elements = stripe.elements();
12const prButton = elements.create('paymentRequestButton', {
13 paymentRequest
14});
15
16paymentRequest.canMakePayment().then(result => {
17 if (result) {
18 prButton.mount('#google-pay-button');
19 } else {
20 document.getElementById('google-pay-button').style.display = 'none';
21 }
22});

Expected result: The Google Pay button renders on Chrome when the user has a payment method saved in Google Pay.

4

Handle the payment confirmation

Listen for the paymentmethod event, create a PaymentIntent on the server, and confirm it with the payment method from Google Pay.

typescript
1paymentRequest.on('paymentmethod', async (event) => {
2 const res = await fetch('/api/create-payment-intent', {
3 method: 'POST',
4 headers: { 'Content-Type': 'application/json' },
5 body: JSON.stringify({ amount: 2000 })
6 });
7 const { client_secret } = await res.json();
8
9 const { error, paymentIntent } = await stripe.confirmCardPayment(
10 client_secret,
11 { payment_method: event.paymentMethod.id },
12 { handleActions: false }
13 );
14
15 if (error) {
16 event.complete('fail');
17 } else if (paymentIntent.status === 'requires_action') {
18 const { error: actionError } = await stripe.confirmCardPayment(client_secret);
19 event.complete(actionError ? 'fail' : 'success');
20 } else {
21 event.complete('success');
22 }
23});

Expected result: The Google Pay sheet closes after successful payment. The PaymentIntent shows as succeeded in the Stripe Dashboard.

5

Test Google Pay

In test mode, open your page in Chrome with a Google account that has a saved payment method. Stripe will simulate the payment without real charges. You can also add the test card 4242424242424242 to Google Pay for testing.

Expected result: A test payment appears in your Stripe Dashboard under Payments with the payment method type shown as 'google_pay'.

Complete working example

google-pay-checkout.js
1// google-pay-checkout.js
2// Complete Google Pay integration with Stripe Payment Request Button
3
4const stripe = Stripe('pk_test_your_publishable_key');
5
6const paymentRequest = stripe.paymentRequest({
7 country: 'US',
8 currency: 'usd',
9 total: {
10 label: 'Order total',
11 amount: 2000 // $20.00 in cents
12 },
13 requestPayerName: true,
14 requestPayerEmail: true
15});
16
17const elements = stripe.elements();
18const prButton = elements.create('paymentRequestButton', {
19 paymentRequest,
20 style: {
21 paymentRequestButton: {
22 type: 'buy',
23 theme: 'dark',
24 height: '48px'
25 }
26 }
27});
28
29paymentRequest.canMakePayment().then(result => {
30 if (result) {
31 prButton.mount('#google-pay-button');
32 if (result.googlePay) {
33 console.log('Google Pay is available');
34 }
35 } else {
36 document.getElementById('google-pay-button').style.display = 'none';
37 }
38});
39
40paymentRequest.on('paymentmethod', async (event) => {
41 try {
42 const res = await fetch('/api/create-payment-intent', {
43 method: 'POST',
44 headers: { 'Content-Type': 'application/json' },
45 body: JSON.stringify({ amount: 2000 })
46 });
47 const { client_secret } = await res.json();
48
49 const { error, paymentIntent } = await stripe.confirmCardPayment(
50 client_secret,
51 { payment_method: event.paymentMethod.id },
52 { handleActions: false }
53 );
54
55 if (error) {
56 event.complete('fail');
57 return;
58 }
59
60 if (paymentIntent.status === 'requires_action') {
61 const { error: actionError } = await stripe.confirmCardPayment(client_secret);
62 event.complete(actionError ? 'fail' : 'success');
63 } else {
64 event.complete('success');
65 }
66 } catch (err) {
67 event.complete('fail');
68 console.error('Payment failed:', err);
69 }
70});

Common mistakes when enabling Google Pay in Stripe

Why it's a problem: Trying to use the Google Pay API directly instead of Stripe's Payment Request Button

How to avoid: Stripe wraps Google Pay through the Payment Request Button Element. You do not need the Google Pay API library when using Stripe.

Why it's a problem: Testing in a browser that does not support Google Pay

How to avoid: Google Pay through Stripe works on Chrome (desktop and Android). It does not appear on Safari or Firefox.

Why it's a problem: Not calling event.complete() after payment confirmation

How to avoid: Always call event.complete('success') or event.complete('fail') to dismiss the Google Pay sheet.

Why it's a problem: Serving the checkout page over HTTP

How to avoid: Google Pay requires HTTPS. Use ngrok or a similar tool to test locally over HTTPS.

Best practices

  • Use automatic_payment_methods on the server to let Stripe handle payment method availability
  • Check canMakePayment() before rendering the button to avoid empty containers on unsupported browsers
  • Use the same Payment Request Button for both Google Pay and Apple Pay — Stripe shows the right one automatically
  • Show a card input form as a fallback when wallet payments are not available
  • Test on both Chrome desktop and Chrome for Android to cover all Google Pay surfaces
  • Set requestPayerEmail to true if you need the customer's email for receipts or order confirmation

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I want to accept Google Pay on my website using Stripe. Show me how to enable it in the Dashboard, create a Payment Request Button with Stripe.js, and handle the payment confirmation. Include the Node.js backend code for creating a PaymentIntent.

Stripe Prompt

Add a Google Pay button to my checkout page using Stripe's Payment Request Button Element. Check if Google Pay is available, mount the button, handle the paymentmethod event, and confirm the payment. Include error handling.

Frequently asked questions

Do I need a Google API key to accept Google Pay with Stripe?

No. Stripe handles the Google Pay integration entirely through the Payment Request Button. You do not need any separate Google API credentials.

Is the Google Pay button the same as the Apple Pay button in Stripe?

Yes, they use the same Payment Request Button Element. Stripe detects the customer's browser and shows Apple Pay on Safari or Google Pay on Chrome automatically.

Can customers use Google Pay on desktop Chrome?

Yes. Desktop Chrome supports Google Pay if the user has a payment method saved in their Google account. The Google Pay button will appear when canMakePayment returns true.

What currencies does Google Pay support through Stripe?

Google Pay through Stripe supports all currencies that Stripe supports for card payments. The currency is set in the paymentRequest configuration object.

Why does the Google Pay button not appear on my page?

Check that you are using HTTPS, the browser is Chrome, the user has a card saved in Google Pay, and canMakePayment() returns a result. Also verify Google Pay is enabled in your Stripe Dashboard.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.