The Android troubleshooting guide covers issues and questions related to the following topics.
- App is currently running within a test environment
- Request failed
- Registration and access
- Gateway validity
- Direct merchants
- CardInfo
App is currently running within a test environment
The user might see the following message when they choose a payment card from the payment details dialog:
App is currently running within a test environment. Transactions will not result in an actual charge
This error indicates that the app uses
ENVIRONMENT_TEST
and doesn't receive real payment credentials, but receives personal information that includes
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:
- Make sure Android Debug Bridge (adb) is installed on your computer..
- Make sure USB debugging is enabled on your device. For more information, see Debug Your App.
- Connect your phone to the computer with a USB cable.
Run the following command in a terminal or command prompt on your computer:
adb -d logcat -s WalletMerchantError
The response indicates the reason for the error. For example, you might 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 might encounter the following errors related to registration and access at some point in your integration. The following list provides some helpful troubleshooting advice should these errors arise.
- You haven't registered to use this API.
- You haven't completed the process to register your app for the Google Pay API. Review Request production access for more information.
- This merchant profile doesn't have access to this feature.
- You haven't completed the process to register your app for the Google Pay API. Review Request production access for more information.
- Signing key fingerprints {11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:11:22:33:44:55} don't 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 that runs the app.
- No keys found for this merchant profile
- You must register your public encryption key with Google via the
Google Pay and Wallet Console to complete a
DIRECT
tokenizationSpecification
type
integration.
Gateway validity
You might encounter the following errors related to gateway validity at some point in your integration. The following list provides some helpful troubleshooting advice should these errors arise.
- Unknown gateway 'yourgateway'
- The
gateway
property value you specified intokenizationSpecification
isn't currently supported by the Google Pay API. Contact your gateway for more information on their gateway identifier and associated fields, such asgatewayMerchantId
. - 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 toWalletConstants.ENVIRONMENT_PRODUCTION
. Contact your gateway for more information about thegateway
parameters you need to use with the Google Pay API.
Direct merchants
You might encounter the following errors related to direct merchant at some point in your integration. The following list provides some helpful troubleshooting advice should these errors arise.
- Signature verification
- You might encounter a signature verification error if the
merchantId
is wrong. This can happen in theTEST
environment when you use the Tink library. To avoid this issue, set YOUR_MERCHANT_ID toin:
.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
example, if the Google Pay API response was returned by
ENVIRONMENT_TEST
, then Tink points to the test environment for decryption. - Don't 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.
CardInfo
- Is the CardInfo feature available for Google Pay API for Android?
- The CardInfo feature is only available with Google Pay API for Web.