# In App Purchase - Android Setup

An in-app purchase (or IAP) allows developers to charge users for specific functionality or content while using an app. Implementing IAPs is particularly compelling for several reasons:

1. It’s an extra way to earn money, in addition to simply selling the app for a fee upfront. Some users are willing to spend a lot more on extra content or features.&#x20;
2. An app can be offered for free, which makes it a no-brainer download for most people. Free apps will typically get many more downloads than paid apps. If users enjoy the app, then they can purchase more content or functionality later.&#x20;
3. You can display advertisements to the user in a free app with an option to remove them by purchasing an IAP.
4. &#x20;Following the initial release of an app, new paid content can be added to the same app instead of having to develop a brand new app to earn more money.

You can use Google Play to sell the following types of products:

1. One-time products: A one-time product is a product that users can purchase with a single, non-recurring charge to the user's form of payment. Examples of one-time products include additional game levels, premium loot boxes, and media files. One-time products are either consumable or non-consumable.
   * Consumable product: A consumable product is one that a user consumes to receive in-game content. For example, a user might purchase an in-game currency product such as a stack of coins. When the user consumes the product, your app then dispenses a fixed number of coins to the user, and the purchased stack of coins product is no longer available. Consumable products can be purchased multiple times.
   * Non-consumable product: A non-consumable product is a product that is purchased once and provides a permanent benefit. Once purchased, these products are permanently associated with the user's Google account. Examples of non-consumable products include premium upgrades and level packs.
2. Subscription: A subscription is a set of benefits that users can access during a stated time period. You can have multiple subscriptions within the same app, either to represent entirely different benefits (for example, a streaming video app could have separate “news” and “sports” subscriptions), or different tiers of a single set of benefits (for example, a cloud storage app could have 100 GB, 1 TB, and 10 TB subscriptions).\
   \
   Users gain access (or entitlement) to a subscription by purchasing a base plan or offer, either in your app or on Google Play.<br>

Make sure that you have set up your android app on Google PlayStore.

To integrate the in-app-purchase for your android app you can just follow the steps below

**Add products in play console**

1. Steps for adding one-time purchases

   * Go to the App Dashboard and inside the "Monetise" section you’ll find options for adding "In-app products".

     <figure><img src="https://lh5.googleusercontent.com/3r_TIr-Ipu-gFVOogfGuXYQwklWX924G9885d1cDa2BMpGRAi9ykQslTmuJToLqjJQJpnDnuPAAn86USvb4FoCilGFhzkzH4XwqJQiT7jNDEQTu7ZFCk3xMqaQOtLWsPIu2-M3h9AeZMTxbgHfL9g_8zdYiLP4q2cN_aS-IcILqy5PeuwlPX6hTBLKcVDg" alt=""><figcaption></figcaption></figure>
   * Tap on In-app products and then click on create product. Fill the details and we will need this product id later.&#x20;

     <figure><img src="https://lh6.googleusercontent.com/LupnDuXgamBtu6FFG9aZRIIm4hr35lC54bZgBR2xG0HGvzxupJ03vTtBrGI0EqFH6BKiFvq8FH10IOTc6qTVdN4OrSdDmpUdhegZ_2R-F2N8Do3IjNbvO99bZtJnTaW0yjXZpgkbzJIMP2SwrHtZGIFcwDDxzTmB5wmw9c4eXNzBVMA-2pKFMxBedwWKYg" alt=""><figcaption></figcaption></figure>
   * Set price and then apply prices.

     <figure><img src="https://lh4.googleusercontent.com/CEtkMMsPFVrH_n-YWvMdQFwMjwOJyb5czTOLbOCdKtg7Ey5pdal5l7YdskgKgInnIa2oSnXWh-1nuDzSFmCPcq4rUS31WzeY9GrdIX6vKeWvfxODXCvNcGiaZ9YwnLQiXs-KhyRtovyjl835-ZCYj39_NqCLt6MVtKIkJnlK-KVeaclInVGiL9nsabgXrg" alt=""><figcaption></figcaption></figure>

     <figure><img src="https://lh6.googleusercontent.com/8dJTqMco0rbDNpD1r7TavwjtUWDQp3qxSxoEegA3g4YEAZNS2l4sOGW9DkUDPvpCpI1ieXGRYVfwR94V083pUh5kOek9ZnUO0TieDSM4k93hYrRNKpqLkNB7zrT0rVqQz1ARE_fah0IGYc8iofkw4yAfyT6QmAioM4CytgtPkrcyDxIG3fAVHgZk2Lgvaw" alt=""><figcaption></figcaption></figure>

     <figure><img src="https://lh4.googleusercontent.com/8bdbHmfERst_M0_qiyOv_KLvNfZqvvAT9Wfim6S3imXBOkXEWBprflqQYUc6XP538xERw3s0YQZYjBWG1ZNmE_nKfv1a4qQWA1cfH-NrK0gtwklqBQLSbetKK3lsYV5ufl82iy1wD7vlovpJreUDE4t4Ej1bY84lfnVrzhnuFziUz9qJuOYp2QXkyYiVVw" alt=""><figcaption></figcaption></figure>

     You’ve successfully added a one time product.

2. Steps for adding subscriptions
   * Go to the App Dashboard and inside the "Monetise" section you’ll find options for adding "Subscriptions".

     <figure><img src="https://lh3.googleusercontent.com/8znkT_3TkI29_wpj79PuRVeNV2bNxUIAd6w983QhfF1QcYOG54ngDl0mOYgpUnxdtncj2LdWamHNCWf-dD20lP-Pr0XX_SYt7mf8_sGof7KRLqE56hHckLKNGrihnsNM4zsGCKCmbuZNtviKuMf8j2htjyY-GT7Z53EzOONspa4soQNrQ8zurB1EOdOOxA" alt=""><figcaption></figcaption></figure>
   * Then click on create subscription and fill details, we will need this product id later.

     <figure><img src="https://lh4.googleusercontent.com/xto1OeoqeNLVtDUWglVgIrWBo3svE1tOEJe9hakQD-och1tPM0XFUJ_mF89DbdIjIWsgwU9I826uhxhHQEM9o3a68gGtYziNuF5jhfCRCr08MAEms6t8p_ycaTOPPMrC4Gpjvcm7SdE7urdRRyOewL40SXdsqWLgNe1emuhyE4uyQ_tSFCOR6Q8KCc4aKw" alt=""><figcaption></figcaption></figure>
   * Then find base plans and offers by scrolling a bit. You can add multiple base plans.

     <figure><img src="https://lh4.googleusercontent.com/XfGmCb4T_UXz_XQ639yRyPW2E0nEal0SEO4xKGlinq6eCRjj1T_lUFG9kTExMhVjdxZCe11MAwJKj3SRQovbQa7aQYeY72W1puIoKRKXBcDbb8ZlLu-reRfDt8VKzhC4XAbtmKDZThktZBrVZ1D13BIulVKwisqxY3zLnRr3uGYh9VS8ABYNRV0BqZEScQ" alt=""><figcaption></figcaption></figure>
   * Fill in the relevant details

     <figure><img src="https://lh4.googleusercontent.com/YxiPvML5Uu12Jmkg0LVOLRETrG9bgVCCRc2tWw4GEqsgVpHneTMNyxvod177eVeVkhS14I7L0RQ2z7iWeq9uIPQENxX8Tf9b6FlAmTya2YaBieKdBScfPpuQuUwbZBjE9FYOFL7Skf20fSbfq19nEj1pyrnPUugfn9sR-XAhj2y4Jej3Sg4uaanUcBgK-Q" alt=""><figcaption></figcaption></figure>
   * Set price and select countries

     <figure><img src="https://lh3.googleusercontent.com/235zJ3UA0zWCqahQG-tPF347F9oEtoQMsnDC8i3zjHCrEtxAtzwJM-nSW0ZgCpzdIKDR7wUOQAPjNsBvo30px-OBr4q_UKnS8HgaahS6wHtLMgyoxntObClL6ViqWRwuebWRIl-6Ua9tNgOirmENVDy_TJhIYsdakoCzJUD72UGrU9v7Ge2CHt_Wopy6eQ" alt=""><figcaption></figcaption></figure>
   * Click on set price and then after entering amount tap on update

     <br>

     <figure><img src="https://lh3.googleusercontent.com/71qu-jwSeqF3vXbt1GzKG_sQIbmoCTMu7CbXgPz5fmJYXqCRk8_iaTqIVXrm3IA6AkRmGRowGHjV9c9dAwg-PIUV5n_bg1Qsu-YBeIBIxGE6rm8WObUkb04YeKaoN8Av0QkoCQEeHyDcYP-SDbKj5WHmDBU0eQZs2gUiw11NtTH1kfmRsjqYLgJ5If2lxg" alt=""><figcaption></figcaption></figure>
   * Then click on "Save" and then "Activate" the plan.&#x20;
   * You have successfully added your one base plan. You can have multiple base plans in a single subscription. You can add offers to each base plan by clicking on add offer.

Now you are ready to integrate IAP in your app. [Click here](https://docs.webtonative.com/javascript-apis/in-app-purchase-android-integration) to know how to integrate it into your website. <br>
