Before you begin
This guide assumes that you know how toAccept payments with Google Pay
Prepare the client session
Google Pay requires the following data to process a payment successfully. Pass the following data in the client session, or in the payment request (for manual payment creation).order.countryCode 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).Prepare the SDK for payments
- Web
- Android
- React Native
Show Universal Checkout
Google Pay is automatically presented to the customer when callingPrimer.showUniversalCheckout.Typescript
Customization
Check the Customization Guide to learn how to customize payment method buttons.Additionally, you can style the Google Pay button by passing the following options:Typescript
By default, Google Pay does not capture the user’s billing address.You can ask to capture the billing address by setting the option
captureBillingAddress. The billing address is added to the client session before the payment is made.Typescript
Limitations
- Google Pay can be presented inside an Android WebView, but only when the host Android app enables WebView support for Google Pay. This is done in the app itself, following Google’s Using Android WebView guide, and requires Google Play Services 25.18.30 or later. No change is required in Primer’s SDK — Primer’s Google Pay integration works in a WebView once the app is configured. If the host app hasn’t enabled WebView support — or the page is opened in a third-party in-app browser that doesn’t (e.g. the Facebook, Instagram, or TikTok browser) — Google Pay won’t present its payment sheet and the button won’t be available there.
Troubleshooting
The Google Pay button does not appear
Primer drop-in checkout runs a few checks to validate that the user can pay with Google Pay.The Google Pay button does not appear if one of these conditions is met:- Google Pay JS library fails to be downloaded. This usually comes from a network issue on the user side.
- Google Pay believes the browser is not supported. Under the hood, the SDK uses Google Pay’s function
isReadyToPayto validate this. - The country code or the currency code are missing from the client session.