Android In-App Purchase (IAP) is a feature provided by Android that allows app owners to sell digital content within their apps. This can include things like subscriptions, premium features.
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.
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.
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.
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
2.) Click on Create Subscription button to create a product. Enter all the info and create a product.
3.) Once you create it, it will ask you to complete below tasks.
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.
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.
Create Licence User Accounts to Test IAP
1.) Go to PlayStore Console -> Setup -> Licence Testing
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.
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.
7.) Now, you are ready to test IAP in your application. Install APK file in your mobile and test everything.