# Google Pay

> Turn on Google Pay, accept it on Checkout, and add the Google Pay button to your own website.

Google Pay lets customers pay with a card saved to their Google account. It works in most desktop browsers (Chrome, Microsoft Edge, Brave, Safari and Firefox) and in Chromium browsers on Android. In Android apps, use the [Android SDK](/developer-tools/mobile-sdks/android).

<callout title="Google Pay compliance" type="warning">

By turning on Google Pay, you agree that all transactions you process through Paystack comply with the Google Pay and Wallet API [Acceptable Use Policy](https://payments.developers.google.com/terms/aup) and the [Google Pay API Terms of Service](https://payments.developers.google.com/terms/sellertos). If you show Google Pay branding on your own pages, use only approved assets that follow the [Google Pay web brand guidelines](https://developers.google.com/pay/api/web/guides/brand-guidelines#put-it-all-together).

</callout>

## How Google Pay authorizes a payment

Paystack accepts two Google Pay authorization methods, both on by default:

- `CRYPTOGRAM_3DS`: the card is tokenized on the device and the customer authenticates with their fingerprint or face. Card networks treat this as equivalent to 3DS, so Paystack doesn't run a separate 3DS challenge.
- `PAN_ONLY`: the card is a stored card number with no device authentication behind it. Paystack runs a 3DS step-up on every one of these charges.

Cards issued in South Africa can use both methods. When the Google Pay sheet loads, Paystack prefers `CRYPTOGRAM_3DS` on Android and Chromium, and falls back to `PAN_ONLY` everywhere else. Paystack also sets the supported card networks for you: Visa and Mastercard.

Before you go live, review Google's [integration checklist](https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist). For Google's full technical reference, see the [Google Pay web developer documentation](https://developers.google.com/pay/api/web/overview).

## Turn on Google Pay

On the Paystack Dashboard, open the [Developers page](https://dashboard.paystack.com/v2/developers), select the **Google Pay** tab and turn on Google Pay.

<callout title="Card channel required" type="warning">

Keep **Card** turned on alongside **Google Pay**. Google Pay runs on the card channel.

</callout>

If you use Invoices, Payment Pages, Storefronts or a plugin that sends customers to Paystack to pay, Google Pay is available there as soon as you turn it on.

## Accept Google Pay on Checkout

Google Pay needs version 2 of [InlineJS](/developer-tools/inline-js). Call `checkout()` from your payment button. You don't need any extra HTML:

<localized-snippet src="payments/channels/google-pay-checkout">



</localized-snippet>

If the customer's browser supports Google Pay, Checkout shows the Google Pay button in the card section:

![Checkout on mobile, showing the Google Pay button](/za/payments/channels/images/google_pay_checkout.png)

## Add the Google Pay button to your website

The payment request button puts Google Pay on your own page, styled to match it. Apple Pay mounts into the same container, so each customer sees the wallet their device supports.

The payment request button needs `@paystack/inline-js` version `2.26.0` or later. If you load InlineJS from the CDN, you already have it. If you installed it with npm, yarn or pnpm, upgrade first.

### Set up your Google Pay merchant profile

Google checks the website showing the button against a registered merchant profile. Checkout runs on Paystack's profile, but a button on your own website needs yours.

Follow Google's guides to create and publish your integration:

1. [Set up your Google Pay integration](https://developers.google.com/pay/api/web/guides/setup): create a Google Pay & Wallet Console account and configure your integration. Choose a `WEB` integration with the `GATEWAY` type. Add every website that shows the button as a web integration.
2. [Publish your integration](https://developers.google.com/pay/api/web/guides/test-and-deploy/publish-your-integration): move it from `TEST` to `PRODUCTION` so it can process real payments.

### Add your merchant details to the Dashboard

After Google approves your integration, open the [Developers page](https://dashboard.paystack.com/v2/developers), select the **Google Pay** tab and click **Add merchant details**.

![The Google Pay tab on the Paystack Developers page, showing the Add merchant details button](/za/payments/channels/images/google_pay_add_details.png)

Fill in the form with the values from your Google Pay & Wallet Console:

- **Merchant ID**: your production Google Pay merchant identifier, a 15 to 16 character string.
- **Merchant name**: the business name shown in the Google Pay & Wallet Console.

![The Add merchant details form, showing the Merchant ID and Merchant name fields](/za/payments/channels/images/google_pay_add_details_form.png)

Paystack passes these details to Google Pay when it mounts the button, so you don't configure them in your code. They only apply to buttons on your own website, not to payments on Checkout.

### Create a container

Add a `div` for the wallet buttons and, optionally, a button that opens Checkout for other payment channels:

<localized-snippet src="payments/channels/google-pay-container">



</localized-snippet>

Give the `div` a unique `id`. You pass this `id` to `paymentRequest()`.

### Set up the payment request

Pass the container `id`, and the `id` of the button that opens Checkout, to `paymentRequest()`:

<localized-snippet src="payments/channels/google-pay-payment-request">



</localized-snippet>

For every styling option, see [paymentRequest(options)](/developer-tools/inline-js#paymentrequestoptions) in the InlineJS reference.

<callout title="Authorization method on your own website" type="warning">

The payment request button only offers `CRYPTOGRAM_3DS`. `PAN_ONLY` isn't available on your own website.

</callout>

The button only appears when all of these are true:

- Your page is served over HTTPS.
- `channels` includes `google_pay` and `card`. If you pass `google_pay` without `card`, the transaction doesn't initialize.
- The customer's card is saved as an Android device token. In practice, this means an Android device with a card in Google Wallet.

## Recurring charges

After Paystack authorizes a Google Pay charge, you can charge the authorization again for subscriptions and recurring payments, the same way you charge a saved card. See [Charge an authorization](/payments/recurring/charge-authorization).

## Refunds

Google Pay refunds work the same way as card refunds, including partial refunds. See [Refunds](https://paystack.com/docs/payments/refunds/).

## Troubleshooting

If Google Pay isn't working, check that:

- Your site serves every page over HTTPS.
- Google Pay is turned on in the **Google Pay** tab of the [Developers page](https://dashboard.paystack.com/v2/developers).
- If you show the button on your own website, your merchant details are saved in the same tab.

If those check out, match the error you see:

<table>
<thead>
  <tr>
    <th>
      Error
    </th>
    
    <th>
      Resolution
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Merchant's Category not supported for Google Pay
    </td>
    
    <td>
      Paystack only allows some business categories to use Google Pay. Email <a href="mailto:support@paystack.com">
        support@paystack.com
      </a>
      
       to find out more.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        DEVELOPER_ERROR
      </code>
      
       or <code>
        MERCHANT_ACCOUNT_ERROR
      </code>
      
       from Google Pay
    </td>
    
    <td>
      Google rejected the merchant profile behind the button. Check that your integration is published in the Google Pay & Wallet Console, and that the website showing the button is added and approved there as a web integration.
    </td>
  </tr>
  
  <tr>
    <td>
      An error occurred while processing request
    </td>
    
    <td>
      Paystack couldn't decrypt the token, or the transaction hit an internal error. Retry the charge. If it keeps failing, contact Paystack Support with the transaction reference.
    </td>
  </tr>
</tbody>
</table>
