Follow steps below to easily activate In App Purchase in your app :
Step 1 : Go to Google Play Console
Step 2 : If you have a Google account, login, else create account
Step 3: Select your app from the dashboard.
Note: If you have not created/published an app, refer to How to Publish Your Android App on Google Play Store?
Step 4 : Click on In-app Products
Step 5 : Click on Create Product
Step 6 : Provide Product ID, and Product Details including Name and Description. You can either select a pricing template or add your own price.
Step 7 : Once you have provided the required details, click on Save and, then go to In-app products.
Step 8 : You will see your One Time Product ID, copy it.
Step 9 : Now switch to Subscriptions tab.
Step 10 : Click on Create Subscription
Step 11 : Enter the Product ID and Name, then click on the Create button to create your subscription.
Step 12 : Click on Add base plan to set up a new base plan for your subscription.
Step 13 : Enter the Base plan ID, and set the Type as Auto-renewing
Step 14 : Once done, you'll have to fill up a few additional details to set up the auto-renewing subscription.First, click on the Billing Period drop-down menu, and choose the desired options for the Grace period and Customer base plan and offer charges sections. Select the appropriate Resubscribe option to allow or disallow users from resubscribing.
Step 15 : Select the Weekly option.
Step 16 : Next, scroll down and click on the Set prices option.
Step 17 : You can either select countries individually or simply click the Country/Region checkbox to add all countries at once.
Step 18 : Once done, select the Set price button.
Step 19 : In the new dialog box that appears, enter the price amount and currency. You can modify the prices for each country individually in the pricing table.
Step 20 : Once you've entered the necessary details, save them by clicking the Save button.
Step 21 : Click on Activate to finish setting up your base plan.
Step 22 : Find the Product ID for the plan you just created, under the Subscription details section.
Note: Repeat steps 10 to 22 for Monthly and Yearly billing periods.
Step 23 : Go to Monetisation setup
Step 24 : Here is your Public Key, copy it too
Step 25 : Now paste all the package IDs and public key in their respective fields on creator software