---
title: Testing Google Pay™ Wallet - via Mobile SDK
slug: testing-google-paytm-wallet-via-mobile-sdk
docTags: 
createdAt: 2024-06-11T08:34:06.396Z
---

## Prerequisites

- Before you can process Google Pay™ payments and preAuths with Judopay, you will need to[ Create a Google Pay Payments Profile](https://support.google.com/googleplay/android-developer/answer/7161426?hl=en-GB) to get your **Merchant IDs**.
- To test Google Pay™ payments and preAuths in sandbox, contact [Support](mailto\:developersupport@judopay.com) to configure your wallet payments credentials.

***

## Google Pay™ Wallet Scenarios (Positive Flow)

:::hint{type="info"}
Depending on you&#x72;**&#x20;use case and app configurations**, some of the following scenarios may not be relevant to you.
:::

Follow our suggested guidelines to simulate positive / happy path scenarios, to test your integration is working correctly. This will give you confidence for when your integration goes live.

### Important to Consider for Google Pay™ (DPAN)

The Google Pay™ mobile wallet payment flow provides consumers with an extra layer of security, encrypting and decrypting the card details sent in the payload by replacing the consumer's card details with a device token.&#x20;

This payment method is SCA compliant by default.
For a successful end-to-end wallet payment testing journey, it is recommended to:

- Perform wallet test scenarios in a **production&#x20;**&#x65;nvironment
- Use **live&#x20;**&#x63;ards to process test payments and preAuths.

We do not recommend making Merchant Initiated Transactions using card tokens that were generated by Google Pay™ DPAN. You may experience a lower transaction success ratio.

:::hint{type="warning"}
**\***&#x54;hese images are from our dummy app, your interface may look different.
:::

***



::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
**Suggested Test Scenario**

Process a Google Pay™ wallet:

- payment
- preAuth

***

<font color="#6a4ee1">**TIP**</font>:
The app is using the payment / preAuth flow, which has been set up in the payment configuration object.

We suggest checking the following options have been configured correctly:

- Merchant Name
- Billing address phone no
- Shipping address
- Shipping address phone no
- Email address

For more information on configuring your app, see [Enable Google Pay™ on your Mobile App](docId\:it3YrNIhEgskEtQTsxGi3).
:::

:::VerticalSplitItem
**Expected Outcome**

You will be directed to a successful transaction completed page.

**\***

::Image[]{src="https://api.archbee.com/api/optimize/QGXTyW3MgdNcMjdEa0v8r/FSMWw26x-OzowB8Y3uAGw_payment-success.png" size="58" width="1460" height="3132" position="flex-start" alt="google pay success" showCaption="false"}
:::
::::

***

**The below is a typical end user flow when making a Google Pay™ wallet payment:**

![google pay mobile flow](https://api.archbee.com/api/optimize/QGXTyW3MgdNcMjdEa0v8r/BBsqZym3zNKMuGpyhei08_gpay-no-billing-info.png)

***

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
**Suggested Test Scenario**

Process a wallet:

- payment
- preAuth&#x20;

request to test the Google Pay™ payment method is correctly configured and supported.

***

<font color="#6a4ee1">**TIP**</font>:
Your Judopay account **and&#x20;**&#x79;our app have been configured to support the **Google Pay™&#x20;**&#x70;ayment method.
:::

:::VerticalSplitItem
**Expected Outcome**

The Buy with G Pay button will be displayed:

**\***

::Image[]{src="https://api.archbee.com/api/optimize/QGXTyW3MgdNcMjdEa0v8r/gT-nDN0Sm49TUw-4kpOar_buy-gpay.png" size="62" width="1460" height="3139" position="flex-start" alt="google pay button displayed" showCaption="false"}
:::
::::



***

### Test Card Data

To simulate a successful request, us&#x65;**&#x20;live cards** to process test payments and preAuths in a production environment.

:::hint{type="warning"}
The card **will not** be charged when processing test payments in a production environment.
:::

***

### Calling the Mobile SDK Functions

For more information on integrating your Android app, including calling the Mobile SDK functions see [Integrating with Judopay](docId\:it3YrNIhEgskEtQTsxGi3).

***

## Google Pay™ Wallet Scenarios (Negative Flow)

Declines can occur for various reasons, it can be impossible to simulate all the negative flows. Depending on your use case and app configurations, some of the following scenarios may not be relevant to you.

Follow our suggested guidelines to simulate negative scenarios, to test your app’s error handling.&#x20;
This will give you confidence for when your integration goes live.

### Important to Consider

- How your app handles negative flows
- Your customer's experience should a negative flow occur:
  - Logic to communicate error messages
  - Customise how your app responds
- How to maintain application consistency

:::hint{type="warning"}
**\***&#x54;hese images are from our dummy app, your interface may look different.
:::

***



::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
**Suggested Negative Test Scenario**

To handle a decline scenario, attempt to perform a Google Pay™ wallet:

- payment
- preAuth&#x20;

request where the user cancels the payment.
:::

:::VerticalSplitItem
**Expected Error**

Depending on how your app has been configured to respond, you may redirect the user to:

- their cart
- an error page displaying an error message

**\***&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/QGXTyW3MgdNcMjdEa0v8r/p9zD-vhptjondTq5BVvUF_gp-usercancels.png" size="86" width="3465" height="3190" position="flex-start" alt="google pay user cancels" showCaption="false"}
:::
::::

