Integration checklist

Use the following checklist to ensure you've completed all the required steps in your web integration.

About the test environment

A Google Pay API test configuration doesn't return live and chargeable payment information, it allows you to test elements of your purchase workflow. The following are testable elements:

  • Confirmation pages
  • Receipts
  • Billing address (optional)
  • Billing phone number (optional)
  • Shipping address (optional)
  • Email address (optional)

To use a test environment with an example payment data response, initialize a new PaymentsClient with a JavaScript object that contains an environment property set to TEST.

The following is a code sample:
var paymentsClient =
    new google.payments.api.PaymentsClient({environment: 'TEST'});

Test with your browser's developer console

Test your website on the latest version of a supported browser. To do so, open your browser's developer tools to view console messages related to your website. The messages include errors or warnings from the Google Pay API JavaScript client library. The Google Pay API supports Google Chrome, Mozilla Firefox, Apple Safari, Microsoft Edge, Opera, and UCWeb UC Browser.

Additional errors might display in the Google payment selection dialog window after you call loadPaymentData(). When you click Continue or OK after you view the error message, it might return additional details in the rejected Promise handled by your site.

Test on a compatible device

While the Google Pay API is available in many markets, tokenized cards are only available in a subset of countries. If the tokenized cards are set as an allowed payment method, test them on an Android device with Chrome for Android version 59 or greater and Google Play services version 16.0.0 or greater. If your payment method is supported in your country and by your issuing bank, test with a card stored in the Google Pay app.

To view Chrome for Android console errors and warnings, test with remote debugging from Chrome for Desktop. For more information about possible errors, view the logs from your Android device. You might be able to view error logs with the Logcat tool window in Android Studio, with the adb logcat command-line tool, or inside an Android bug report. To view error messages related to the Google Pay API, search for WalletMerchantError.

The following is a code sample:

adb logcat -s WalletMerchantError

Test your integration

Before you submit your integration to Google for validation with a PaymentsClient configured for a TEST environment, ensure that you've fulfilled the exit criteria for each of the following functional and branding checks.

1. Basics

Ensure that your existing risk checks and controls for card or PAN transactions are also applied to Google Pay transactions. Google Pay validation and fraud checks aren't intended to replace your risk management processes.
If you selectively trigger 3D Secure (step-up authentication) for normal card transactions based on risk criteria, be sure to use the same risk criteria to trigger 3D Secure for Google Pay PAN PAN_ONLY transactions.
Ensure that you have read, and are ready to accept, our Terms of Service. Registration with the Google Pay API requires that your email address must be associated with a Google account, and preferably a business email associated with your business domain, such as "admin@myownpersonaldomain.com." Select Use my current email address instead in the Google account creation flow to associate your email with a Google account.
Use the data received from the Google Pay API only to process transactions. All other use cases require a separate, express consent from the user.
Confirm the card networks and card authentication methods that are accepted by your payment processor in your country.
If you complete a DIRECT tokenizationSpecification type integration, you must annually rotate your public encryption key and provide PCI Attestation to Google using the Google Pay & Wallet Console. PCI Attestation can be submitted by a third-party or Qualified Security Assessor certified by the PCI Security Standards Council, and approved by an Approved Vendor or Qualified Assessor.

2. Brand tests

Use our approved assets and adhere to all elements of our Brand guidelines.
Ensure that the Google Pay payment button only appears after your site confirms the user's ability to pay through the isReadyToPay() function.
Confirm that the displayed Google Pay payment button dimensions match similar buttons and elements on the page.
Choose an appropriate button based on the background color of the area where it appears.

3. Functional tests

Verify that loadPaymentData() is called synchronously when you click the Google Pay payment button, and that it maintains the browser's user activation behavior that allows the Google Pay API to display a payment sheet. Validate that the Google Pay payment sheet isn't blocked by pop-up blockers.

When you request the CARD payment method type with PAN_ONLY card authentication, complete the following steps to perform the cards on file test:

  1. If applicable, remove all cards on file from pay.google.com.
  2. Return to your integration.
  3. Click Google Pay.
  4. Validate that you see the option to add a card.
  5. Add a card from a supported network, as defined in parameters.allowedCardNetworks.
  6. Validate that you see the added card with a network logo in the selector.

The following test is only applicable for Chrome on Android.

When you request the CARD payment method type with CRYPTOGRAM_3DS card authentication, complete the following steps to perform the Android device token test:

  1. Check that your card issuer is supported, and add an eligible card in the Google Pay Android application.
  2. Return to your integration.
  3. Click the Google Pay payment button.
  4. Validate that you see the added card, with card art, in the chooser.

If you confirm that your processor supports 3D-Secure card authentication, you can proceed, even if an Android device token isn't available to you as an Android user or cardholder.

If you require a shipping address, test the processing of the shipping address in varied states of completion, such as the following:

  • Variances on a full name to be parsed into structured fields, such as "John," "John Doe," and "Jane Doe Smith."
  • Accurately parse all address lines returned by the Google Pay API, which may exceed the total number of address lines typically collected in your standard checkout flow.
  • Verify that the returned country component of the address matches your site's supported shipping destinations. If you specified shipping restrictions, test them: enter an unsupported shipping address that isn't allowed in our payment sheet and see if the restrictions work.

If you've implemented support for Authorize Payments, verify the following:

  • When a payment authentication fails, it returns an ERROR transactionState and PaymentDataError with the PAYMENT_AUTHORIZATION intent.

If you've implemented support for Dynamic Price Updates, complete the following steps:

  1. Add a card and address details in the payment sheet.
  2. Update the shipping options, order list, and total price.
  3. Important: Ensure that the total price matches the transaction amount. Otherwise, it can impact the Electronic Commerce Indicator (ECI) value and the liable party.
  4. Add and select a shipping address.
  5. Update the shipping options, order list, and total price.
  6. Select a shipping option.
  7. Update the order list and total price.
  8. Validate your results:
    • If the shipping address doesn't have available shipping options, validate that you get PaymentDataError with the SHIPPING_ADDRESS intent.
    • If the selected shipping option is invalid, validate that you get PaymentDataError with the SHIPPING_OPTION intent.
    • If the payment authentication fails, validate that you get ERROR transactionState and PaymentDataError with the PAYMENT_AUTHORIZATION intent.
If you require a telephone number, request it from the billing address. Then, test if you can parse and store the telephone number to the data standards of your website with different formats such as "+8005550100," "18005550100," and "(800) 555-0100."
Ensure that Google Pay is displayed on parity with other third-party payment methods.
For users who previously selected Google Pay at checkout and indicated Google Pay as their preference for payment within your website, Google Pay must be defaulted as the payment method for their subsequent purchase.
A final price must be displayed to the user before the transaction is processed. If the amount to be charged has varied based on data received from the Google Pay API, you're expected to show a confirmation page with a final price.