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
.
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
|
|
The following test is only applicable for Chrome on Android. When you request the
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:
|
|
If you've implemented support for Authorize Payments, verify the following:
|
|
If you've implemented support for Dynamic Price Updates, complete the following steps:
Important: Ensure that the total price matches the transaction
amount. Otherwise, it can impact the Electronic Commerce Indicator (ECI) value and the liable party.
|
|
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. |