# Google Play Product Setup

To set up products for Android devices, start by logging into [Google Play Console](https://play.google.com/console). Google Play Console is Google's central hub for managing app releases, testing, in-app purchases, and more.

This guide assumes basic knowledge of Google Play Console, as well as having an app set up and ready for adding in-app purchases. For more information, visit [Google's documentation and guides for Google Play Console](https://support.google.com/googleplay/android-developer/?hl=en#topic=3450769).

**Create an In-App Product or Subscription**

> **📘**
>
> You'll need to have an APK uploaded before you can create in-app products. Check out our guide on [sandbox testing on Android](https://www.revenuecat.com/docs/google-play-store) for details on how to upload an APK and roll out a release on a closed test track.

To create an in-app product or subscription, go to Google Play Console's 'All Applications' page and select your app from the list.

In the sidebar, select the **Products** dropdown. Depending on your in-app product type, you will either choose **In-app products** or **Subscriptions**.

<figure><img src="https://cakras-organization-1.gitbook.io/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F1bbcf2f-2020-10-09_18.02.44_play.google.com_16c50bed37ae.png&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=bd779ad2e4845a46173c7c0735cbf9b5bf2e4833c6911fd9a4e3f82d095deb02" alt=""><figcaption></figcaption></figure>

After clicking Create, provide a couple pieces of metadata to Google:

MetadataDescription

Product ID

The product ID is a unique alphanumeric ID that is used for accessing your product in development and syncing with RevenueCat. After you use a Product ID for one product in Google Play Console, **it can’t be used again across any of your apps, even if the product is deleted**.

Name

A short name of the item, up to 55 characters. This will be displayed on your Google Play Store listing.

**Tips for creating robust product IDs**

After you use a Product ID for one product in Google Play Console, **it can’t be used again across any of your apps, even if the product is deleted**. It helps to be a little organized here from the beginning - we recommend using a consistent naming scheme across all of your product identifiers such as:

> **`<app>_<entitlement>_<version>`**

* **app:** Some prefix that will be unique to your app, since the same product Id cannot but used in any future apps you create.
* **entitlement**: A name for what the product provides access to, e.g., "premium"
* **version**: A version number

For example, using this format the identifier for your first product that grants access to a "premium" subscription would be:

> `rc_premium_v1`

<figure><img src="https://cakras-organization-1.gitbook.io/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F9b43a80-Screen_Shot_2022-06-28_at_5.51.57_PM.png&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=c9a0330b6b170dc37793fbfa2b78bd6024dfd84c6845c0445a4893695f899353" alt=""><figcaption></figcaption></figure>

**Create a base plan**

For subscription products, you'll need to add a base plan. Base plans define a billing period, price, and renewal type for purchasing your subscription. Customers never purchase a subscription product directly, they always purchase a base plan of a subscription.

Click "Add base plan" and fill out the associated fields. Make sure to set a price, and click "Activate". Since Google introduced multiple base plans with Billing Client 5, it's good practice to be as clear as possible when naming your plans, such as: `<duration>-<renewaltype>`, eg. `annual-autorenewing`.

<figure><img src="https://cakras-organization-1.gitbook.io/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F9f32a53-image.png&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=ecc896d02b9475f24bdc48aaced9512b6387791e00478aa20f12ecf7dfa5a35e" alt=""><figcaption></figcaption></figure>

> **👍Migrated products from before May 2022**
>
> When Google introduced the new subscription features in May 2022, all existing subscriptions were migrated to subscription products with a single base plan. That base plan has an identifier representing the duration, like `P1Y` which stands for annual.

> **📘Representation of Google Play subscription products in RevenueCat**
>
> RevenueCat Products map to Base Plans for Google Play subscriptions, since those are the products that customers can purchase. Newly set up products in RevenueCat follow the identifier format `<subscription_id>:<base-plan-id>`, whereas products that were set up before February 2023 follow the identifier format `<subscription_id>`.

> **❗️Support for non backwards-compatible base plans**
>
> Old versions of RevenueCat SDKs do not support Google's new subscription features such as multiple base plans per subscription product. Only base plans marked as "[backwards compatible](https://support.google.com/googleplay/android-developer/answer/12124625?hl=en#backwards_compatible)" in Google Play Console are available in these SDK versions. [Learn more](https://www.revenuecat.com/docs/google-subscriptions-and-backwards-compatibility). Only one base plan per subscription can be marked as backwards compatible.

To mark a base plan as backwards compatible, click the overflow menu on the base plan and select "Use for deprecated billing methods".

<figure><img src="https://cakras-organization-1.gitbook.io/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F0375be4-f309ab8-Screen_Shot_2022-07-07_at_2.12.18_PM.png&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=d64b7da4293e86fe332721e78c8a533b134d2e85e72e0f12ac7449d491f34a9a" alt=""><figcaption></figcaption></figure>

**(Optional) Create an offer**

If you wish to create an offer for your base plan, you can do so from the subscription page by clicking "Add offer". Offers can be free trials, discounts, or simply special price setups that apply when a customer first purchases a subscription.

<figure><img src="https://cakras-organization-1.gitbook.io/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F63e2cad-Screen_Shot_2022-06-30_at_3.58.40_PM.png&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=576328aeaafec401200a0b33d7d23225cac1ae4a00ba02f8c97b38e2fdf27c27" alt=""><figcaption></figcaption></figure>

You can then select a product ID, eligibility, and offer phases.

> **❗️Support for non backwards-compatible offers**
>
> Old versions of RevenueCat SDKs do not support Google's new subscription features such as multiple offers per base plan. Only offers marked as "[backwards compatible](https://support.google.com/googleplay/android-developer/answer/12124625?hl=en#backwards_compatible)" in Google Play Console are available in these SDK versions. [Learn more](https://www.revenuecat.com/docs/google-subscriptions-and-backwards-compatibility). Only one offer per base plan can be marked as backwards compatible.

To mark an offer as backwards compatible, click the overflow menu and select "Use for deprecated billing methods".

<figure><img src="https://cakras-organization-1.gitbook.io/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2Ff309ab8-Screen_Shot_2022-07-07_at_2.12.18_PM.png&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=ca560c466ded41b28f7f4e80d5bc5691f7ffdac10b56cb92e29a36a9311f2c37" alt=""><figcaption></figcaption></figure>

**Making Subscriptions Editable, InAppProduct API**

**RevenueCat does not use the InAppProduct API for subscriptions.** You are safe to make subscriptions editable, **unless** you are manually using this API outside of RevenueCat.

This is related to this notice:

<figure><img src="https://cakras-organization-1.gitbook.io/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F3b927cd-Screen_Shot_2022-07-07_at_2.23.03_PM.png&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=828e316091d6c300b5a7fdc144a4f2f45d03a591a839520a5e27ffb0759afd4c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://cakras-organization-1.gitbook.io/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F6dcb926-4a6f1139-085f-4e5c-8132-5d5573ec2cca.png&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=2b62ca579bdef3a23f3a654f209955a558fe99fd9618c30691108426ac782246" alt=""><figcaption></figcaption></figure>

If you are relying solely on RevenueCat for your subscriptions, you can safely select "Make editable".


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://orban-tech.gitbook.io/v2ray-vpn/app-guide/in-app-purchase/google-play-product-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
