Testing your application
In this section, you will learn how to test your app to ensure it is ready for production.
About the test environment
Our test environment does not return live chargeable tokens in the
PaymentsData response, but the test environment allows us to test
your pre-purchase workflow. You will see an
Unrecognized App error
on the payment chooser until your app has production access.
The value of the
environment parameter from
WalletOptions indicates whether the server is running in a production or test environment. The
environment value can be one of the following:
For testing and development, use
Review our branding requirements
To ensure your compliance with our guidelines and standards, please make sure your application complies with our Brand guidelines.
Deploying your application
In this section, you will learn how to prepare your app for production and start accepting real payments.
Get access to the production environment
When you're ready to deploy your Google Pay API integration, sign-up to get access and test with production credentials.
Sign your app with release keys
When your app is pointed to the Google Pay API production environment,
the Google Pay API returns
if the signing key fingerprint used to sign the Android app does not match the release
key fingerprint registered with Google Play. This typically occurs after an app
in development switches from the test environment to the production environment.
To resolve this, make sure that the fingerprint provided to Google matches the fingerprint of the key used to sign the Android app. Once an Android app is signed, you can verify the fingerprint of the key used for signing it by using the following commands:
// First extract the META-INF/CERT.RSA from the APK jar -xvf
META-INF/CERT.RSA inflated: META-INF/CERT.RSA keytool -printcert -file META-INF/CERT.RSA Certificate fingerprints: MD5: 77:41:C5:C1:DD:3F:6C:09:88:FA:33:3D:83:5F:D3:9E SHA1: EC:4A:EE:DC:F4:02:EA:87:0A:C5:09:C0:58:06:91:E7:EA:41:09:9D Signature algorithm name: SHA1withRSA
Match the SHA1 with the fingerprint provided to Google Play.
Configure your app for production
Use the following steps to configure your application for production:
- Make sure that your API is signed with the release key, not the debug key you used in the test environment. The debug key won't work in the production environment.
- Set the
WalletOptionsenvironment parameter to