Skip to main content
Google Pay enables customers to pay using payment methods saved to their Google account, including credit/debit cards and other supported payment methods.

Client session requirements

Google Pay requires currencyCode and order.countryCode in the client session.
order.countryCode is the merchant’s country (ISO 3166-1 alpha-2) — where the transaction is processed, not the buyer’s country. This maps to Google Pay’s TransactionInfo.countryCode: “The ISO 3166-1 alpha-2 country code where the transaction is processed.” Use the country of your acquiring entity (for example, if your acquirer is in the EEA, this is required for SCA compliance).

Quick reference


Button styling

Customize the Google Pay button appearance.

Button type

Set buttonType to control the label displayed on the Google Pay button.

Examples

Google Pay supports: en, ar, bg, ca, cs, da, de, el, es, et, fi, fr, hr, id, it, ja, ko, ms, nl, no, pl, pt, ru, sk, sl, sr, sv, th, tr, uk, zh

Express checkout

Google Pay can capture customer information directly from the payment sheet.

Billing address

The billing address is extracted from the payment data and updated in the client session.

Shipping address

Providing shippingAddressParameters (even empty {}) implicitly enables shipping address capture for backward compatibility.

Shipping method selection

Enable customers to select shipping methods directly in the Google Pay sheet:
When enabled:
  • Shipping options from your SHIPPING checkout module appear in the payment sheet
  • Customer selects a shipping method before completing payment
  • Selected method is sent to your backend via selectShippingMethod()
  • Display items update to show shipping costs
requireShippingMethod: true automatically enables shipping address capture — you don’t need to also set captureShippingAddress. Configure your SHIPPING checkout module on the backend to provide available shipping options.

Email capture


Advanced options

Existing payment method required

Only show Google Pay if the user has a saved payment method:
Enables one-tap checkout for returning users.
This option only affects button visibility in PRODUCTION. In TEST mode, the button always appears.

Supported card networks

Networks are filtered based on your Primer configuration. If orderedAllowedCardNetworks is set in your client session, only those networks are available.

Display items

When using express checkout with shipping, the payment sheet displays:
  • Line items — Products from order.lineItems
  • Fees — Non-zero fees from order.fees
  • Shipping — Non-zero shipping costs (when requireShippingMethod is enabled)
If merchantAmount is set, a simplified “Subtotal” view is shown instead.

Testing

TEST environment

Google Pay returns mock payment credentials. The button always appears regardless of existingPaymentMethodRequired.

PRODUCTION environment

  1. Register your website with the Google Pay Business Console
  2. Use a real Google account with saved payment methods
  3. Test existingPaymentMethodRequired: true for one-tap checkout

Troubleshooting

Possible causes:
  • Google Pay not configured in Primer Dashboard
  • Browser doesn’t support Google Pay
  • existingPaymentMethodRequired: true but user has no saved payments (production only)
  • Running inside an Android WebView whose host app hasn’t enabled WebView support for Google Pay. Google Pay works inside an Android WebView, but only when the host Android app is configured per Google’s Using Android WebView guide (requires Google Play Services 25.18.30+). In third-party in-app browsers (e.g. Facebook, Instagram, TikTok) that haven’t enabled this, the button won’t appear. No Primer SDK change is needed — this is configured in the host app.
Debug steps:
  1. Check browser console for errors
  2. Test in Chrome (best Google Pay support)
  3. Set existingPaymentMethodRequired: false
  4. Verify Google Pay is in your enabledPaymentMethods (if specified)
Checklist:
  • requireShippingMethod: true in SDK options
  • captureShippingAddress: true or shippingAddressParameters set
  • SHIPPING checkout module configured on backend
  • Shipping options available for the selected address
Checklist:
  • captureBillingAddress: true for billing
  • captureShippingAddress: true or shippingAddressParameters for shipping
  • User has address saved in Google account

Complete example


See also

SDK options reference

All configuration options

Google Pay web documentation

Official Google documentation

Google Pay button options

Button customization reference