# How to enable Google Pay in Stripe

- Tool: Stripe
- Difficulty: Beginner
- Time required: 15 minutes
- Compatibility: Stripe.js v3, Chrome 61+, Android Chrome, Node.js 18+ backend
- Last updated: March 2026

## 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.

## Before you start

- 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.

```
// server.js
const express = require('express');
const Stripe = require('stripe');
const stripe = Stripe(process.env.STRIPE_SECRET_KEY);
const app = express();
app.use(express.json());

app.post('/api/create-payment-intent', async (req, res) => {
  const intent = await stripe.paymentIntents.create({
    amount: req.body.amount, // in cents
    currency: 'usd',
    automatic_payment_methods: { enabled: true }
  });
  res.json({ client_secret: intent.client_secret });
});

app.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.

```
const stripe = Stripe('pk_test_your_publishable_key');

const paymentRequest = stripe.paymentRequest({
  country: 'US',
  currency: 'usd',
  total: { label: 'Order total', amount: 2000 },
  requestPayerName: true,
  requestPayerEmail: true
});

const elements = stripe.elements();
const prButton = elements.create('paymentRequestButton', {
  paymentRequest
});

paymentRequest.canMakePayment().then(result => {
  if (result) {
    prButton.mount('#google-pay-button');
  } else {
    document.getElementById('google-pay-button').style.display = 'none';
  }
});
```

**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.

```
paymentRequest.on('paymentmethod', async (event) => {
  const res = await fetch('/api/create-payment-intent', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ amount: 2000 })
  });
  const { client_secret } = await res.json();

  const { error, paymentIntent } = await stripe.confirmCardPayment(
    client_secret,
    { payment_method: event.paymentMethod.id },
    { handleActions: false }
  );

  if (error) {
    event.complete('fail');
  } else if (paymentIntent.status === 'requires_action') {
    const { error: actionError } = await stripe.confirmCardPayment(client_secret);
    event.complete(actionError ? 'fail' : 'success');
  } else {
    event.complete('success');
  }
});
```

**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 code example

File: `google-pay-checkout.js`

```javascript
// google-pay-checkout.js
// Complete Google Pay integration with Stripe Payment Request Button

const stripe = Stripe('pk_test_your_publishable_key');

const paymentRequest = stripe.paymentRequest({
  country: 'US',
  currency: 'usd',
  total: {
    label: 'Order total',
    amount: 2000  // $20.00 in cents
  },
  requestPayerName: true,
  requestPayerEmail: true
});

const elements = stripe.elements();
const prButton = elements.create('paymentRequestButton', {
  paymentRequest,
  style: {
    paymentRequestButton: {
      type: 'buy',
      theme: 'dark',
      height: '48px'
    }
  }
});

paymentRequest.canMakePayment().then(result => {
  if (result) {
    prButton.mount('#google-pay-button');
    if (result.googlePay) {
      console.log('Google Pay is available');
    }
  } else {
    document.getElementById('google-pay-button').style.display = 'none';
  }
});

paymentRequest.on('paymentmethod', async (event) => {
  try {
    const res = await fetch('/api/create-payment-intent', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ amount: 2000 })
    });
    const { client_secret } = await res.json();

    const { error, paymentIntent } = await stripe.confirmCardPayment(
      client_secret,
      { payment_method: event.paymentMethod.id },
      { handleActions: false }
    );

    if (error) {
      event.complete('fail');
      return;
    }

    if (paymentIntent.status === 'requires_action') {
      const { error: actionError } = await stripe.confirmCardPayment(client_secret);
      event.complete(actionError ? 'fail' : 'success');
    } else {
      event.complete('success');
    }
  } catch (err) {
    event.complete('fail');
    console.error('Payment failed:', err);
  }
});
```

## Common mistakes

- **Trying to use the Google Pay API directly instead of Stripe's Payment Request Button** — undefined Fix: Stripe wraps Google Pay through the Payment Request Button Element. You do not need the Google Pay API library when using Stripe.
- **Testing in a browser that does not support Google Pay** — undefined Fix: Google Pay through Stripe works on Chrome (desktop and Android). It does not appear on Safari or Firefox.
- **Not calling event.complete() after payment confirmation** — undefined Fix: Always call event.complete('success') or event.complete('fail') to dismiss the Google Pay sheet.
- **Serving the checkout page over HTTP** — undefined Fix: 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

## 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.

---

Source: https://www.rapidevelopers.com/stripe-guide/how-to-enable-google-pay-in-stripe
© RapidDev — https://www.rapidevelopers.com/stripe-guide/how-to-enable-google-pay-in-stripe
