Deploy your application

This section describes how to configure your app to production and start accepting real payment credentials.

Sign your app with release keys

When your app is pointed to the Google Pay API production environment, the Google Pay API returns ERROR_CODE_MERCHANT_ACCOUNT_ERROR (405) if the signing key fingerprint used to sign the Android app does not match the release key fingerprint registered with Google Play. This error typically occurs after an app in development switches from the test environment to the production environment.

To resolve this error, 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

keytool -printcert -file META-INF/CERT.RSA

Certificate fingerprints:
   Signature algorithm name: SHA1withRSA

Match the SHA1 fingerprint provided to Google Play.

Configure your app for production

Use the following steps to configure your application for production:

  1. Make sure that your APK is signed with the release key, not with the debug key you used in the test environment. The debug key will not work in the production environment.
  2. Set the WalletOptions environment parameter to WalletConstants.ENVIRONMENT_PRODUCTION.

Enable your app in the Google Pay Developer Profile

To grant your app production access, navigate to your Google Pay Developer Profile. Click Enable applications and then click Enable next to your app name.

Launching your app on the Play Store

After a final review from Google in production and with launch approval, you can launch your app to the Google Play Store through your Google Play Developer Console.