> For the complete documentation index, see [llms.txt](https://help.twinr.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.twinr.dev/extensions/in-app-purchase-iap/android-in-app-purchase-iap.md).

# Android In-App Purchase (IAP)

## <mark style="color:green;">How to setup In App Purchase?</mark>

### Create In-App Purchase Products

There are 4 types of in-app purchases.

* **Consumable:** These are items that can be used up or expire over time and can be bought multiple times (e.g. in-game currency, items, or other virtual goods).
* **Non-Consumable:** These are permanent items that can only be purchased once (e.g. unlocking a full version of an app or purchasing a permanent game character).
* **Auto-renewable subscriptions:** This type of in-app purchase allows a user to subscribe to a service or content within an app on a recurring basis.
* **Non-renewable subscriptions:** This type of in-app purchase allows a user to subscribe to a service or content within an app for a specific duration of time.

{% tabs %}
{% tab title="Consumable & Non-Consumable" %}
Android doesn't differentiate between consumable & non-consumable products. You need to manage from your side if user can purchase one product single time or multiple times.

**1.)** Go to Google Play Developer Console -> Select Your App -> Monetize -> In-app product.

<figure><img src="/files/xcCnivpjzmO4rYWMdn2N" alt=""><figcaption></figcaption></figure>

**2.)** Click on **Create Product** button to create a product. Enter all the info and create a product.

**3.)** Once you create it, Activate button will gets displayed with all the information you filled-up. Click on **Activate** to activate the product. This is required to test IAP.

<figure><img src="/files/c2bDcrVuFxAR8s6hUB2j" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Subscriptions" %}
Google provides very easy way to create Auto-Renewable and Non-Renewable subscriptions. Follow below steps.

**1.)** Go to Google Play Developer Console -> Select Your App -> Monetize -> Subscriptions

![](/files/3yybnNmzxL5yYa5JCoCl)

**2.)** Click on **Create Subscription** button to create a product. Enter all the info and create a product.

![](/files/WORYBClhuH2uyKsB9Pnr)

**3.)** Once you create it, it will ask you to complete below tasks.

![](/files/Ka65S2U2LkcUTIIeSXv1)

* **Add subscription benefits:** In this section you will need to enter all the subscription benefits, description and other info.
* **Add a base plan:** First of all select your plan type.&#x20;
  * **Auto-renewing:**  Select this option if you want to create auto-renewable subscription.
  * **Pre-paid:** Select this option if you want to create non-renewable subscriptions
* **Add offers:** Use this option if you want to enable offer for your subscription such as free trial. This steps is optional.
* **Activate:** At last you need to activate your subscription to make it available for testing and prod users when you go live.
  {% endtab %}
  {% endtabs %}

### Create Licence User Accounts to Test IAP

**1.)** Go to PlayStore Console -> Setup -> Licence Testing

<figure><img src="/files/wN5aAnOrEpIlXn2mY7BW" alt=""><figcaption></figcaption></figure>

**2.)** Enter comma separated email addresses under **Add licence testers** field and hit Enter.

**3.)** Select **RESPOND\_NORMALLY** under **Licence response** dropdown.

**4.)** Now, you need to prepare an APK and upload it under internal tester. To do that, go to PlayStore Console -> Select Your App -> Testing -> Internal testing.

<figure><img src="/files/7Zcl9YZEVpgNh3dqZit8" alt=""><figcaption></figcaption></figure>

**5.)** Click **Create a new release** button and upload your APK in there. Publish that release for review.

**6.)** Next step is to join the testers program. To do so, click on Testers tab and then copy **Join on the web** URL. Open this URL in your browser and join the testers program.

<figure><img src="/files/Ur6kVjEmD1O44uCq4egk" alt=""><figcaption></figcaption></figure>

**7.)** Now, you are ready to test IAP in your application. Install APK file in your mobile and test everything.
