# Google Play

{% stepper %}
{% step %}

#### [Settings in Google Cloud Platform Console](#settings-in-google-cloud-platform-console-1)

[Enable Google Play Android Developer API](#google-play-android-developer-api)&#x20;

[Set up Service account](#service-account) &#x20;

[Set up Pub/Sub service](#pub-sub-service)&#x20;
{% endstep %}

{% step %}

#### [Settings on devtodev side](#step-2.-settings-on-devtodev-side)

{% endstep %}

{% step %}

#### [Settings in Google Play Console](#step-3.-google-paly-console)

[Add service account and grant permissions](#service-account-and-user-permissions)&#x20;

[Set up Real-time developer notifications](#monetisation-setup)&#x20;
{% endstep %}
{% endstepper %}

## Settings in Google Cloud Platform Console

{% hint style="info" %}
If you have already activated the [Google Play Android Developer API](#google-play-android-developer-api) and set up a [service account](#service-account) to work with devtodev, you can skip this section and proceed to [Pub/Sub service setup](#pub-sub-service)**.**
{% endhint %}

### Google Play Android Developer API <a href="#google-play-android-developer-api" id="google-play-android-developer-api"></a>

1. Go to [Google Cloud Console](https://console.cloud.google.com/) under your Google account.\
   Select the project (1) for which you want to configure **Google Play Developer API**. Then go to the **APIs and services** section (2).

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FBIZZYTfzo5xyJsR8rnGL%2Fimage.png?alt=media&#x26;token=1f9d5029-ca80-41df-b8c0-9b5bc10688c6" alt=""><figcaption></figcaption></figure>

2. Go to the **Library** section.

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FYq3STJ0lwogyzxn005U6%2Fimage.png?alt=media&#x26;token=88e1a53d-db75-4498-9ae6-c007113882c7" alt=""><figcaption></figcaption></figure>

3. Find the **Google Play Developer API** section.

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2F1zZhHx92lWRhJbGUyva1%2Fimage.png?alt=media&#x26;token=f56a09b6-7f78-4d80-996e-7e25883c0f70" alt=""><figcaption></figcaption></figure>

4. Press `ENABLE` to enable the **Google Play Androd Developer API**.

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2Fg9i2YY6LQMrgoNYTVkdy%2Fimage.png?alt=media&#x26;token=fb68d6cb-62e8-47b5-b8f2-b72ab907f16b" alt=""><figcaption></figcaption></figure>

### **Service account** <a href="#service-account" id="service-account"></a>

Go to the [**Service accounts**](https://console.cloud.google.com/apis/credentials/serviceaccountkey) section. &#x20;

1. Select the **project** to link the service account and where you will collect subscription data later. Create a new project if it is not in the list.&#x20;

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FPD8qscYxs75fHlks9l9Z%2Fimage.png?alt=media&#x26;token=e20932db-18dc-4932-810f-aa79e64628e5" alt=""><figcaption></figcaption></figure>
2. In the list of available service keys, click `CREATE SERVICE ACCOUNT`.&#x20;

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FcDEIznrEMQvPD61g0CRJ%2Fimage.png?alt=media&#x26;token=c99da195-22b8-4811-9c92-93f9e1adc731" alt=""><figcaption></figcaption></figure>
3. Fill in the **Service account name** field. The **Service Account ID** field will be filled in automatically (use the screenshot below as an example) and click `CREATE AND CONTINUE`.&#x20;

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FSvi1PY4q1ZrheGN8DFR6%2Fimage.png?alt=media&#x26;token=6af36501-22ad-4ab2-a8bf-bf9b10477b96" alt=""><figcaption><p>s</p></figcaption></figure>
4. Skip the optional steps 2-3 and click `DONE` at the end of the form.&#x20;

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FesaUuhA3MFtfHLslh4kI%2Fimage.png?alt=media&#x26;token=1bec8092-79dd-47e2-a21d-e8c1cd5b4db9" alt=""><figcaption></figcaption></figure>
5. After creating a service account, you will be returned to the available Service accounts list. \
   \
   Select the created account and open the **KEYS** tab (1), click `ADD KEY` (2), and then select the **JSON** key type option (3) in the pop-up window. \
   Click `CREATE` to confirm your choice. \
   \
   The generated **private key file** will be downloaded automatically. You will need to upload this key to devtodev later in the following steps (see [Settings on devtodev side](#step-2.-settings-on-devtodev-side)).&#x20;

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FuCr2ya00z41Poh4KXiUY%2Fimage.png?alt=media&#x26;token=4ce92bae-4750-494c-ab30-f8633228ded7" alt=""><figcaption></figcaption></figure>
6. Go to the **IAM** section (1) in the **Permissions** tab and click `GRANT ACCESS` (2) to add roles to the service account. \
   In the **New principals** section (3), enter the service account address and grant it the **Pub/Sub Subscriber** role (4). \
   If you do not have this role, you need to activate the **Pub/Sub service** in the Cloud Console ([activate Pub/Sub API](https://console.cloud.google.com/apis/api/pubsub.googleapis.com)). \
   Save the changes (5).

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FuRoVAzLIocJhh0PpFabx%2Fimage.png?alt=media&#x26;token=43ad2d68-cc17-410c-b3d4-cfa8586947cf" alt=""><figcaption></figcaption></figure>

### **Pub/Sub service** <a href="#pub-sub-service" id="pub-sub-service"></a>

Go to the [list of topics](https://console.cloud.google.com/cloudpubsub/topic/list) in the **Pub/Sub** service.

1. Select the project where you would like to collect subscription data. Click `CREATE TOPIC`.&#x20;

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FvD6cF0CmE0leMC1IzaFQ%2Fimage.png?alt=media&#x26;token=292af50c-7a77-41e9-ad0c-523cb0bdeca5" alt=""><figcaption></figcaption></figure>
2. To create a topic: fill in the **Topic ID** (use the screenshot below as an example), disable **Add a default subscription** option (1) and click `CREATE` (2).&#x20;

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FbAvHFyik8l5C0A3lkWWS%2Fimage.png?alt=media&#x26;token=61dced9c-9f6c-49b3-bdaa-5c7d0fb1e480" alt=""><figcaption></figcaption></figure>
3. Select a topic, click on three dots and select **View permissions**.

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FNABN0avZm5i6hBoESg0H%2Fimage.png?alt=media&#x26;token=97ca9c0a-2776-4b4d-b06b-5c6bbcb66e41" alt=""><figcaption></figcaption></figure>
4. Click `ADD PRINCIPAL` to add the service account. &#x20;

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2F2bpDwgvH5zO9R9OTXlF0%2Fimage.png?alt=media&#x26;token=d90f7f38-3d57-4d33-a6f8-442ca03e9891" alt=""><figcaption></figcaption></figure>
5. Add the `google-play-developer-notifications@system.gserviceaccount.com` service account and grant it the role of **Pub/Sub Publisher**. Save the changes.

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FD6MuGWDEVnsSRQcsUJFH%2Fimage.png?alt=media&#x26;token=d73108e5-3973-478a-9176-38b79cc20d71" alt=""><figcaption></figcaption></figure>
6. Open the list of subscriptions and click `CREATE SUBSCRIPTION`.

   &#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2F2WlyAfqQo2VpTCxczdDl%2Fimage.png?alt=media&#x26;token=e3f9cb2d-176b-4bc1-b1da-9da3f55ddcdc" alt=""><figcaption></figcaption></figure>
7. In the appeared form:&#x20;
   * Specify the **Subscription ID** (1).&#x20;
   * Fill in the Topic name in **Select a Cloud Pub/Sub topic** field (2).&#x20;
   * In the **Delivery type** select **Push** (3)**.**&#x20;
   * Copy **Endpoint URL** from devtodev (see steps 8-9) and insert it in the **Endpoint URL** field (4).  \
     \
     All other parameters remain unchanged. Save the changes.

     &#x20;

     <div data-full-width="false"><figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FVwWuRJRomTZAyKStAVSl%2Fimage.png?alt=media&#x26;token=21973385-24eb-474a-9567-9b0476d93914" alt=""><figcaption></figcaption></figure></div>
8. To get **Endpoint URL,** go to [devtodev](https://analytics.devtodev.com/), select the same app and open app settings (`Settings → Payments integration → IA refunds tracking`).<br>

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FYHgQIsu7Vq5IzOz5k2ha%2FScreenshot%202025-07-28%20at%2017.58.43.png?alt=media&#x26;token=a0309f13-dee1-463f-a36f-4b230fcb30af" alt=""><figcaption></figcaption></figure>
9. Copy the **Endpoint URL** and paste it in the corresponding field in Google Cloud (step 7).&#x20;

## **Settings on devtodev side** <a href="#step-2.-settings-on-devtodev-side" id="step-2.-settings-on-devtodev-side"></a>

1. Go to `Settings → Payments integration → IA refunds tracking` and click `edit` (3).<br>

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FX3zbXisTOJ19lJXbK3UP%2FScreenshot%202025-07-28%20at%2017.48.24.png?alt=media&#x26;token=50e7aad9-b354-4506-9d0b-4b079d2bb0ac" alt=""><figcaption></figcaption></figure>
2. Fill in the integration form with the data obtained earlier:

   * Android App ID
   * Upload the **Private key file** obtained in [**Service Account**](#service-account) step.

   Click `Save`.<br>

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2F02sEd6TjXptvjjQbhyJo%2FScreenshot%202025-07-28%20at%2017.49.09.png?alt=media&#x26;token=b4d9a27d-b439-4758-b180-d68ec7ca55a6" alt=""><figcaption></figcaption></figure>
3. When the integration is complete, the status will change to **Active.**

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FYwa8OaydMY3zN4RqTM9B%2FScreenshot%202025-07-28%20at%2017.52.33.png?alt=media&#x26;token=9f3b6eec-6c7d-408a-82f3-5433abd2f6ad" alt=""><figcaption></figcaption></figure>

## Settings in **Google Play Console** <a href="#step-3.-google-paly-console" id="step-3.-google-paly-console"></a>

### Service account and User permissions <a href="#service-account-and-user-permissions" id="service-account-and-user-permissions"></a>

To set up user permission, you need to log into your Google Play Console account and invite your [previously created service account](#service-account).

1. Sign into the [Google Play Developer Console](https://play.google.com/apps/publish/signup/).

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FrfWZCSQ4zq1VnCL0zwya%2Fimage.png?alt=media&#x26;token=2a6a3580-5191-49aa-8e22-da372c089a75" alt="" width="375"><figcaption></figcaption></figure>
2. In the **Users and permissions** section, you can add users and manage their permissions.
   * Go to **Users and permissions.**
   * Click `Invite new users`.<br>

     &#x20;

     <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2Fo9mLFJ0q1oO9MKKH95an%2Fimage.png?alt=media&#x26;token=9c7d0897-81bd-4cd5-914d-3a757dbce191" alt=""><figcaption></figcaption></figure>
3. Add [Service Account](#service-account) as a new user:&#x20;

   * Add your service account email in the **Email address** field (1).&#x20;
   * In the **Permissions section** (2) select **the apps** (3) accessible to the service account. Click `Apply` (5). \
     Grant permissions to individual apps, or use account permissions to grant access to all apps in your developer account.&#x20;
   * Grant the necessary rights to perform actions (see next step **Account permissions**).&#x20;

   <figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FEE4laRRa2gmnSd6hiCI4%2Fimage.png?alt=media&#x26;token=638fcc71-434e-472a-adf0-83ad2b53a839" alt=""><figcaption></figcaption></figure>
4. Open **Account permissions** tab. Grant the following permissions:

   * View app information (1)
   * View app quality information (2)
   * View financial data (3)

   Click `Apply` to confirm.&#x20;

{% hint style="info" %}
**Please note that the specified permissions may not apply immediately!**
{% endhint %}

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FHaqXlHZHFUq26UnVKDTe%2Fimage.png?alt=media&#x26;token=306fbb1a-81d6-435b-94b0-953681b27589" alt=""><figcaption></figcaption></figure>

5. Click `Invite user` to finish the user setup.&#x20;

### Monetisation setup

After [creating a subscription](#pub-sub-service) in the **Pub/Sub** **service**, you'll need to register the created topic as a target for **Real-time developer notifications** (RTDN).&#x20;

1. Go to the app’s **Monetise with Play** → **Monetisation setup** section.&#x20;
2. Enter the full name of the topic in the **Topic name** field.&#x20;
3. Tick the **Enable real-time notifications** checkbox.
4. Send a **test notification** using the link below (4). If everything is configured correctly, the test notification will change the integration status of the **Subscriptions** in devtodev to Active (Settings → Payments integration → Subscriptions → Market connection).&#x20;
5. Click `Save changes` to finish the setup.<br>

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FeOBnpenS0ZJOtQqiyuaF%2Fimage.png?alt=media&#x26;token=8891326c-82d1-478f-8e07-1d8a9d2ab44d" alt=""><figcaption></figcaption></figure>
