Going Live

Once you have completed testing in the Test environment, you are ready to go live. Contact support to set up a merchant account in the Production environment to process Android transactions. Basically, once you get your merchant account in Production and have received your Production API credentials, you have to perform the same integration that you did in the Test environment.

Google Pay Test Environment

The Test environment does not return live, chargeable tokens in the response.

The value of the environment parameter indicates whether the server is running in a Production or Test environment; it can be either WalletConstants.ENVIRONMENT_PRODUCTION or WalletConstants.ENVIRONMENT_TEST. For testing and development, use the Test environment. Once you get your merchant account in Production, and have received your Production API credentials, you will have to follow the steps below to release in the Production environment.

Get Access to the Production Environment

If you are confident of your app’s integration with Google Pay, sign up for Google Pay:

  1. Check the Google Play Console to confirm your user and account type. You must be logged in as the account owner for your app’s developer account.
  2. Change from the Test environment to the Production environment, as described above.
  3. Create an entry in the Google Play Console.
  4. Create a signed APK using Android Studio.
  5. Upload the APK in the Google Play Console (it is not necessary to publish, you can just upload it).
  6. Go to payments.developer.google.com/signup and sign the Terms of Service – your application should be listed there – and click on Enable.

The next step is to build a Production APK and test live transactions.

Remember to Sign Your App with Release Keys

If the signing key fingerprint used to sign the Android app does not match the release key fingerprint registered with Google Play, your app may return ERROR_CODE_MERCHANT_ACCOUNT_ERROR (405).

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 <PATH_TO_APK> 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

  1. Once you have completed your integration, review your app against the prerequisites.
  2. Set the WalletOptions environment parameter to WalletConstants.ENVIRONMENT_PRODUCTION.
  3. Make sure that your APK is signed with the release key, and not the debug key you used in the Test environment. The debug key won't work in the Production environment.
Did you find this page useful?