# Set up for integration

Before you start integrating the Google Pay SDK with your app, you need to
have the following setup.

## Prerequisites

Make sure you fulfill the following prerequisites before you get started:

1. Your device must have **Android version 21.**
2. Your device must have **Google Play Services version 12.6.00** or higher.
3. You must be onboarded on the **Google Pay for Business** program.
4. Set up Google Pay app.

   1. Provide your Gmail account(s) to your Google representative to get allowlisted, and to get access to the [Google Pay SDK](https://developers.google.com/static/pay/india/api/merchant-sdk/assets/google-pay-client-api-1.0.1.aar).
   2. Install the Google Pay app from Play Store.
   3. Add a UPI form of payment.

      - Businesses must be set up to accept UPI, and must be verified merchants by NPCI/banks.
      - Ensure that you have the required APIs from your bank to check the status of a payment.
      - Note that every transaction should use a unique transaction ID.
      - Ensure that your (merchant's) VPA is allowlisted by the Google Pay
        team.

        > [!NOTE]
        > **Note:** You can skip this step if you are already accepting payments via Google Pay for Business.

## Configure your project

> [!IMPORTANT]
> **Important:** If you don't have Android Studio installed, download and install [Android Studio](https://developer.android.com/studio/index.html).

1. Add the Google maven repository to the top level `build.gradle` file of your
   project.

       allprojects {
          repositories {
              google()
              ...
          }
       }

2. Add the following app dependencies to the `build.gradle` file in the app
   module.

       dependencies {
          implementation 'com.google.android.gms:play-services-tasks:15.0.1'
          ...
       }

## Android 11 requirements

Merchants targeting API level 30+ and running on Android 11 will only be able to
see a few apps. For more details, see [here](https://developer.android.com/training/package-visibility/declaring).

Merchants have to make changes to their manifest files in order to access a set
of other installed apps on the device that they intend to access.
For more details, see [here](https://developer.android.com/training/package-visibility/declaring).

To include Google Pay app, include the package name in `<package>` elements
inside the `<queries>` element.

    <manifest package="com.example.merchantapp">
        <queries>
            <package android:name="com.google.android.apps.nbu.paisa.user" />
        </queries>
    </manifest>