The Android troubleshooting guide covers issues and questions related to the following topics.

- [App is currently running within a test environment](https://developers.google.com/pay/api/android/support/troubleshooting.md.txt#app-running-within-test-environment)
- [Request failed](https://developers.google.com/pay/api/android/support/troubleshooting.md.txt#request-failed)
- [Registration and access](https://developers.google.com/pay/api/android/support/troubleshooting.md.txt#registration-access)
- [Gateway validity](https://developers.google.com/pay/api/android/support/troubleshooting.md.txt#gateway-validity)
- [Direct merchants](https://developers.google.com/pay/api/android/support/troubleshooting.md.txt#direct-merchants)
- [Android WebView](https://developers.google.com/pay/api/android/support/troubleshooting.md.txt#android-webview)
- [CardInfo](https://developers.google.com/pay/api/android/support/troubleshooting.md.txt#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`](https://developers.google.com/android/reference/com/google/android/gms/wallet/WalletConstants.md.txt#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 `OR_BIBED_06`. This error message also
appears in the UI as a dialog with the following text:
> Request Failed  
> There is an issue with merchant's Google Pay integration. Please contact merchant for help or pay with a different method.

To learn more about this error, follow these steps:

1. Make sure [Android Debug Bridge (adb)](https://developer.android.com/studio/command-line/adb.html) is installed on your computer.
2. Make sure USB debugging is enabled on your device. For more information, see [Debug Your App](https://developer.android.com/studio/debug/dev-options.html).
3. Connect your Android device to the computer or start your simulator.
4. Run the following command in a terminal or command prompt on your computer:

   ```
   adb 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.
```

> [!NOTE]
> **Note:** The error only becomes visible in logcat after you've pressed **OK** to close the alert.

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

## 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.

`OR_BIBED_06` Unknown gateway <var translate="no">'yourgateway'</var>
:   The [`gateway`](https://developers.google.com/pay/api/android/reference/request-objects.md.txt#gateway) property value you
    specified in `tokenizationSpecification` isn't currently supported by the Google Pay API.
    Contact your gateway for more information on their gateway identifier and associated fields,
    such as `gatewayMerchantId`.

`OR_BIBED_06` 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`](https://developers.google.com/pay/api/android/reference/request-objects.md.txt#gateway) parameters
    you need to use with the Google Pay API.

## 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.

`OR_BIBED_07` 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.

`OR_BIBED_07` No keys found for this merchant profile
:   You must register your public encryption key with Google using the
    [Google Pay \& Wallet Console](https://pay.google.com/business/console?utm_source=devsite&utm_medium=devsite&utm_campaign=devsite) to complete a
    [`DIRECT`](https://developers.google.com/pay/api/android/reference/request-objects.md.txt#direct)
    `tokenizationSpecification` `type` integration.

`OR_BIBED_07` 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](https://developers.google.com/pay/api/android/guides/test-and-deploy/request-prod-access) for more information.

`OR_BIBED_10` This merchant is in a region where Google pay is not accepted.
:   The Google Pay service is not available in the region. See the
    [list of supported countries](https://support.google.com/googlepay/answer/12429287#zippy=%2Cpay-online-or-in-apps) for more information

`OR_BIBED_11` This merchant has not completed registration to use Google Pay API.
Please go to console (https://pay.google.com/business/console) to verify.
:   You haven't completed the process to register your app for the Google Pay API. Review
    [Request production
    access](https://developers.google.com/pay/api/android/guides/test-and-deploy/request-prod-access) for more information.

`OR_BIBED_12` This Google Pay API integration is disabled. Please contact us for more information
(https://developers.google.com/pay/api/faq#how-to-get-support).
:   [Contact us](https://developers.google.com/pay/api/android/support/how-to-get-help.md.txt) to learn
    more about the required steps to re-enable the Google Pay API for your account.

`OR_BIBED_13` Signing key fingerprints <var translate="no">{11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:11:22:33:44:55}</var>
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](https://developer.android.com/studio/publish/app-signing).

## 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 the `TEST` environment when you use the [Tink paymentmethodtoken library](https://github.com/tink-crypto/tink-java-apps). To avoid this issue, set <var translate="no">YOUR_MERCHANT_ID</var> to
    in:
:

    ```
    .recipientId("merchant:YOUR_MERCHANT_ID")
    ```

Cannot decrypt token
:   If you use the [Tink paymentmethodtoken library](https://github.com/tink-crypto/tink-java-apps) to
    decrypt a token, take note of the following:

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](https://developers.google.com/pay/api/processors/guides/implementation/payment-data-cryptography#using-openssl), make sure you install [Cygwin](https://www.cygwin.com/) on your machine. This is needed to run the Linux commands.

## Android WebView

`OR_BIBED_15` Google Pay couldn't load properly because this App uses a WebView.
App developers must follow the instructions to enable Google Pay to work within Android WebView.
:   Follow the [instructions](https://developers.google.com/pay/api/android/guides/recipes/using-android-webview.md.txt) to enable the Google Pay API for Android WebView.

    > [!CAUTION]
    > **Caution:** Using `shouldInterceptRequest` to intercept requests and use a 3rd party http client is not supported.


## CardInfo

What is the CardInfo feature?
:   Google Pay indicates to consumers that there's a card behind the Google Pay payment button,
    which renders both the card brand network and the last four digits of the card.

Why doesn't the CardInfo feature render in my implementation?

:   To make the CardInfo feature work, we require the following conditions:

    - You must implement the [`createButton`](https://developers.google.com/pay/api/android/guides/resources/update-to-new-payment-button) API.
    - You must configure the [`ButtonOptions.buttonType`](https://developers.google.com/pay/api/android/reference/request-objects.md.txt#ButtonOptions) to `buy`, `long` or `pay`.
    - The user must have an available payment method, as defined by your [`CardParameters`](https://developers.google.com/pay/api/android/reference/request-objects.md.txt#CardParameters) object.