Troubleshooting

The Android troubleshooting guide covers issues related to the following error types:

Unrecognized app

The user may see the following message when they choose a payment card from the payment details dialog:

Unrecognized app. Please make sure you trust this app before proceeding.

This error indicates that the app is using ENVIRONMENT_TEST and isn't receiving real payment credentials but will receive personal information including billing address, billing address phone number, shipping address, and email address if requested.

Request failed

The most common error message is ERROR_CODE_DEVELOPER_ERROR. This error message also appears in the UI as a dialog with the following text:

Request Failed
An unexpected error has occurred. Please try again later.

To learn more about this error, follow these steps:

  1. Make sure ADB is installed on your computer. For more information, see Android Debug Bridge (adb).
  2. Make sure USB debugging is enabled on your device. For more information, see Debug Your App.
  3. Connect your phone to the computer using a USB cable.
  4. Run the following command in a terminal or command prompt on your computer:

    adb -d logcat -s WalletMerchantError

The response indicates the underlying reason for the error. For example, you may see:

02-26 17:41:28.133 14593 14593 W WalletMerchantError: Error in loadPaymentData: This merchant profile does not have access to this feature.

The action you need to take to resolve the issue depends on the error message.

Registration and access

You have not registered to use this API.
You have not completed the process to register your app for the Google Pay API. Review our Integration checklist to register and to request a review of your app's use of the Google Pay API.
This merchant profile does not have access to this feature.
Google hasn't configured your application to use the Google Pay API. Review our Integration checklist to request a review of your app's use of the Google Pay API and become whitelisted.
Signing key fingerprints {11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:11:22:33:44:55} do not match our records for this app.
The Google Pay API can only be used in production mode if the APK is signed with the correct signing key. For more information, see Sign Your App.
To use this API, you must add the following tag to your manifest:
To enable the Google Pay API, you must modify your AndroidManifest.xml. For more information, see Modify your manifest.
This merchant has been disabled. Please contact us for more information.
Contact us to learn more about the required steps to re-enable the Google Pay API for your account.
This API requires Google Play Services library version 8.4+
Make sure Google Play services is up-to-date on the device running the app.
No keys found for this merchant profile
You must register your public encryption key with Google through the Google Pay Developer Profile to complete a DIRECT tokenizationSpecification type integration. Review our Integration checklist to request a review of your app's use of the Google Pay API and to submit your public encryption key.

Gateway validity

Unknown gateway 'yourgateway'
The gateway property value you specified in tokenizationSpecification is not currently supported by the Google Pay API. Contact your gateway for more information on their gateway identifier and associated fields such as gatewayMerchantId.
Gateway 'example' cannot be used in production mode.
The example gateway property value is only used for testing purposes and can't be used with a WalletOptions environment parameter value set to WalletConstants.ENVIRONMENT_PRODUCTION. Contact your gateway for more information about the gateway parameters you need to use with the Google Pay API.

Direct merchants

Signature verification
You might encounter a signature verification error if the merchantId is wrong. This can happen in the TEST environment when you use the Tink library. To avoid this issue, set YOUR_MERCHANT_ID to 01234567890123456789 in:
.recipientId("merchant:YOUR_MERCHANT_ID")
Cannot decrypt token
If you use the Tink library to decrypt a token, take note of the following:
  • Ensure that the Google Pay API response environment corresponds with the Tink environment. For more details, see the following example:
    • If the Google Pay API response was returned by ENVIRONMENT_TEST, then Tink points to the test environment for decryption.
  • Do not modify the response from Google Pay API before it's passed to Tink. Ensure that you pass the entire token returned from the Google Pay API response. For more details, see the following note:
  • Verify that you have the proper private key associated with the public key that you registered with Google.
Generate public and private key pair on Windows
If you're on Windows, and you want to follow the steps mentioned in Use OpenSSL to generate a private and public key pair, make sure you install Cygwin on your machine. This is needed to run the Linux commands.