> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.qonversion.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Google Play for Qonversion

> How to create a Google Play service account, grant Qonversion access to the Google Play Developer API, and connect Real-Time Developer Notifications — the prerequisites for processing Android purchases through Qonversion.

Qonversion needs two things from your Google Play account: a **service account** with permission to read your app's billing data, and a Pub/Sub topic for **Real-Time Developer Notifications (RTDN)**. The wizard surfaces both as a single step; this guide walks through generating each piece on the Google side before pasting them in.

The flow spans two consoles — **Google Cloud Console** (sections 1–5) and **Google Play Console** (section 6) — and ends back in **Qonversion Dash** (section 7). Keep both Google tabs open; you'll switch between them.

## 1. Open the Google Cloud Console

1. Sign in to the [Google Cloud Console](https://console.cloud.google.com/welcome).
2. Pick the Google Cloud project that owns your app from the project picker at the top (or create one).
3. From **Quick access** on the welcome page, open **APIs & Services** — this is where you enable the integrations Qonversion needs.

<Frame caption="Project picker (1) and APIs & Services tile (2) on the Google Cloud welcome page">
  <img src="https://mintcdn.com/qonversion/i7S3V3d3qx2E809m/images/docs/1.png?fit=max&auto=format&n=i7S3V3d3qx2E809m&q=85&s=df3a85fc88ad2ec204adbb2a7ba0bc08" width="2272" height="1292" data-path="images/docs/1.png" />
</Frame>

<Note>
  Use a project that's dedicated to this app (or shared across your apps). The service account you create later inherits this project's identity, so keep things tidy.
</Note>

## 2. Enable the required Google APIs

Three Google APIs need to be enabled on the same Cloud project:

* **Google Play Android Developer API** — lets Qonversion validate purchases and read subscription state.
* **Google Play Developer Reporting API** — surfaces RTDN delivery health in the Qonversion settings card.
* **Cloud Pub/Sub API** — required to provision the Real-Time Developer Notifications topic.

### 2.1 Open the API Library

In **APIs & Services**, click **Library** in the left sidebar.

<Frame caption="APIs & Services → Library">
  <img src="https://mintcdn.com/qonversion/i7S3V3d3qx2E809m/images/docs/2.png?fit=max&auto=format&n=i7S3V3d3qx2E809m&q=85&s=5d16903b1ad44bb5c83164504b1e0355" width="2280" height="606" data-path="images/docs/2.png" />
</Frame>

### 2.2 Find each API

Search by name (e.g. `Google Play Android Developer API`) and open the matching result. Repeat for the other two APIs.

<Frame caption="Search the API Library by name and open the result tile">
  <img src="https://mintcdn.com/qonversion/i7S3V3d3qx2E809m/images/docs/3.png?fit=max&auto=format&n=i7S3V3d3qx2E809m&q=85&s=e0050b6da202e9159504a4103e7dd170" width="2278" height="1084" data-path="images/docs/3.png" />
</Frame>

### 2.3 Enable each API

On every Product details page, click **Enable**. You'll repeat this for all three APIs.

<Frame caption="Enable Google Play Android Developer API, Google Play Developer Reporting API, and Cloud Pub/Sub API in turn">
  <img src="https://mintcdn.com/qonversion/bC80tuXGCYEL9CVC/images/docs/4.png?fit=max&auto=format&n=bC80tuXGCYEL9CVC&q=85&s=67ae375a705195bd3d176b8067f802a7" width="1222" height="1613" data-path="images/docs/4.png" />
</Frame>

## 3. Create a service account

The service account is the identity Qonversion uses to call Google APIs on your behalf.

### 3.1 Open IAM & Admin

Return to the Cloud Console home (or use the search bar) and open **IAM & Admin** from **Quick access**.

<Frame caption="Open IAM & Admin from Quick access">
  <img src="https://mintcdn.com/qonversion/bC80tuXGCYEL9CVC/images/docs/5.png?fit=max&auto=format&n=bC80tuXGCYEL9CVC&q=85&s=40f669797197fc16daea87c25c9e6e84" width="2278" height="1296" data-path="images/docs/5.png" />
</Frame>

### 3.2 Start the service account form

In the left sidebar, click **Service Accounts**, then **+ Create service account** at the top.

<Frame caption="Service Accounts → Create service account">
  <img src="https://mintcdn.com/qonversion/bC80tuXGCYEL9CVC/images/docs/6.png?fit=max&auto=format&n=bC80tuXGCYEL9CVC&q=85&s=b4cb2ec05d66869cb6c8fe5df3b153b1" width="1924" height="930" data-path="images/docs/6.png" />
</Frame>

### 3.3 Name the service account

Give it a clear name like `Qonversion`. The Service account ID auto-fills from the name. Click **Create and continue** to move on.

<Frame caption="Name the service account, then Create and continue">
  <img src="https://mintcdn.com/qonversion/bC80tuXGCYEL9CVC/images/docs/7.png?fit=max&auto=format&n=bC80tuXGCYEL9CVC&q=85&s=f9653a44cb91f01fb9e44a9119eadcb8" width="1102" height="1080" data-path="images/docs/7.png" />
</Frame>

### 3.4 Grant the required roles

In the **Permissions** step, add two roles, then click **Done**:

* **Pub/Sub Admin** — required to provision and manage the RTDN topic.
* **Monitoring Viewer** — lets Qonversion surface RTDN delivery health on the settings card.

<Frame caption="Add Pub/Sub Admin (1) and Monitoring Viewer (2), then Done (3). The Principals step is optional — leave it empty.">
  <img src="https://mintcdn.com/qonversion/rvtYrwJQoa3I-k9Z/images/docs/8.png?fit=max&auto=format&n=rvtYrwJQoa3I-k9Z&q=85&s=172c0ffb2958b318a6fb8d37a8c7f31b" width="1092" height="1248" data-path="images/docs/8.png" />
</Frame>

## 4. Generate a JSON key

The JSON key is the credential Qonversion stores to authenticate as your service account.

### 4.1 Open the Keys tab and add a key

Open the service account you just created, switch to the **Keys** tab, click **Add key**, then **Create new key**.

<Frame caption="Service account → Keys → Add key → Create new key">
  <img src="https://mintcdn.com/qonversion/rvtYrwJQoa3I-k9Z/images/docs/9.png?fit=max&auto=format&n=rvtYrwJQoa3I-k9Z&q=85&s=b0b8d13fabb373b888b5f05ef4fcac97" width="1926" height="1262" data-path="images/docs/9.png" />
</Frame>

### 4.2 Choose JSON and create

Pick **JSON** (the recommended format) and click **Create**. The browser downloads the key file — save it somewhere safe.

<Frame caption="Choose JSON and click Create">
  <img src="https://mintcdn.com/qonversion/i7S3V3d3qx2E809m/images/docs/10.png?fit=max&auto=format&n=i7S3V3d3qx2E809m&q=85&s=aa45883d420e94320957a240449c5bf5" width="1152" height="702" data-path="images/docs/10.png" />
</Frame>

<Warning>
  The key file is downloadable only at creation time. If you lose it, delete the existing key from the Keys tab and generate a new one — the previous one stops working as soon as you revoke it.
</Warning>

## 5. Copy the service account's email

You'll need this email in a moment to invite the service account into Google Play Console.

In the **Service Accounts** list, click the email address (or its copy icon) — it looks like `<name>@<project-id>.iam.gserviceaccount.com`.

<Frame caption="Copy the service account email from the Service Accounts list">
  <img src="https://mintcdn.com/qonversion/i7S3V3d3qx2E809m/images/docs/12.png?fit=max&auto=format&n=i7S3V3d3qx2E809m&q=85&s=22523e7b9a4ce718bf6be2f7873aec94" width="2202" height="494" data-path="images/docs/12.png" />
</Frame>

## 6. Grant the service account access in Google Play Console

The service account exists in Google Cloud, but Google Play Console manages permissions separately — you need to invite it there too.

### 6.1 Open Users and permissions

In [Google Play Console](https://play.google.com/console), open **Users and permissions** from the left sidebar and click **Invite new users**.

<Frame caption="Users and permissions → Invite new users">
  <img src="https://mintcdn.com/qonversion/i7S3V3d3qx2E809m/images/docs/11.png?fit=max&auto=format&n=i7S3V3d3qx2E809m&q=85&s=49aadca7a9a7c0617f58aa36d0868f6a" width="2194" height="848" data-path="images/docs/11.png" />
</Frame>

### 6.2 Paste the email and add your app under App permissions

Paste the service account email you copied in section 5 into **Email address**, then open the **App permissions** tab and add the app you're configuring.

<Frame caption="Paste the email (1), open the App permissions tab (2), select your app (3), and Apply (4)">
  <img src="https://mintcdn.com/qonversion/04IIuqZEIFx3nJOj/images/docs/13-1.png?fit=max&auto=format&n=04IIuqZEIFx3nJOj&q=85&s=309a50938315a15123b6da9827141e77" width="1568" height="1536" data-path="images/docs/13-1.png" />
</Frame>

### 6.3 Switch to Account permissions and grant access

Open the **Account permissions** tab, tick these three checkboxes, then click **Invite user**:

1. **View app information and download bulk reports (read-only)**
2. **View financial data, orders, and cancellation survey responses**
3. **Manage orders and subscriptions**

<Frame caption="Account permissions tab (1) → three required permissions (2, 3, 4) → Invite user (5)">
  <img src="https://mintcdn.com/qonversion/04IIuqZEIFx3nJOj/images/docs/14-1.png?fit=max&auto=format&n=04IIuqZEIFx3nJOj&q=85&s=bbf852e212fb85d74a14ba6dee57ee2c" width="1900" height="1856" data-path="images/docs/14-1.png" />
</Frame>

<Note>
  It can take up to 24 hours for Google's API to recognize new service-account permissions. If Qonversion shows "Please provide valid JSON credentials" right after pasting the key, give it a few hours and retry.
</Note>

## 7. Paste everything into Qonversion

Now jump back to **Qonversion Dash → Project Settings → Stores → Google Play Console**.

1. Paste your **Android Package Name**. This is the same value as `applicationId` in your app-level `build.gradle` — and the identifier Google Play Console lists against each app on the **Home** screen of your developer account.

   <Frame caption="Your Android Package Name = applicationId in build.gradle = the identifier shown for your app in Google Play Console">
     <img src="https://mintcdn.com/qonversion/i7S3V3d3qx2E809m/images/docs/15.png?fit=max&auto=format&n=i7S3V3d3qx2E809m&q=85&s=dbf53e1ff8618340e2ec1a951472d535" width="602" height="725" data-path="images/docs/15.png" />
   </Frame>

2. Upload the `.json` key file you downloaded in section 4.

3. Click **Connect to Google** to provision the RTDN Pub/Sub topic. Qonversion shows the topic name in the same row — copy it and paste it in Google Play Console → **Monetization setup → Real-time developer notifications**. See [Google Developer Notifications](google-developer-notifications) for the Play Console step.

4. Click **Save**.

<Frame caption="Google Play Console configuration with credentials and RTDN connected">
  <img src="https://mintcdn.com/qonversion/bcql90kGuC0xhk_H/images/docs/android-store-configured.png?fit=max&auto=format&n=bcql90kGuC0xhk_H&q=85&s=6df020afa54e37daf89da37b0f003e77" width="1090" height="1356" data-path="images/docs/android-store-configured.png" />
</Frame>

## Troubleshooting

### "Please provide valid JSON credentials"

* Wait up to 24 hours after granting Play Console access — propagation is slow.
* Make sure the service account is invited in **both** Google Cloud (as a service account) **and** Google Play Console (as a user with the three required Account permissions plus the app under App permissions).
* Confirm the JSON file's `client_email` matches the service-account email you invited.

### "The current user has insufficient permissions"

If you created your in-app products before granting the service account access, Google Play sometimes caches the old permission set. Open any in-app product on the Google Play Console, edit it lightly (e.g. tweak the description) and save — that nudges the cache.

### RTDN tag stays "Awaiting first notification" after a few minutes

* Trigger a sandbox subscription event (renewal, refund) — Google only sends notifications for actual events.
* Make sure **Pub/Sub Admin** is set on the service account; without it, Google can't publish to the topic.
* Check that **Cloud Pub/Sub API** is enabled in the same Google Cloud project.

### Lost the .json key

The Service Accounts → Keys tab lets you delete the old key and generate a new one. Re-upload the new file in the wizard — Qonversion will overwrite the stored credentials.

***

## What's next?

After this step, your Android configuration is complete. Test end-to-end:

* Make a sandbox purchase from a test device and confirm it appears in Qonversion within seconds.
* Trigger a refund or cancellation in Play Console and confirm the event arrives.
