Configure in-app purchase (Android)
Last updated
Was this helpful?
If your app unlocks digital content such as premium features, subscriptions, Google recommends using In-app purchases.
Before starting, ensure you have already created the in-app purchase product in your AppMySite dashboard. You will need the generated Product ID during this setup.
Log in to Google Play Console.
From the left side menu, go to Settings.
Click Create payments profile.
Complete the required payment details.
In-app purchases cannot be enabled without an active Payments profile in Google Play Console.
In Google Play Console, select your app.
From the left menu, go to Monetisation with Play > Monetisation setup.
Under Google Play Billing, enable Real-time developer notifications.
Add a topic name. The topic name is the Project ID that you can find in your Firebase account
To find your Project ID: go to Firebase > Settings > General.
Copy the Project ID.
Enter the topic in this format: projects/PROJECT-ID/topics/play-notifications
Under Notification content, select Subscriptions, voided purchases, and all one-time products.
Click Save changes.
The Project ID is unique for all accounts and must match the Firebase project connected to your Android app.
Log in to Google Cloud Console.
Select the project linked to your Android app.
Search for Pub/Sub and open it.
Click Create topic and enter a topic name.
Open the created topic and click the subscription ID.
Click Edit.
Set Delivery type to Push.
Copy the Endpoint URL from your AppMySite In-app purchase dashboard and paste it into the Endpoint URL field. You can find the Endpoint URL in the Server URL field in your AppMySite In-app purchase dashboard
In Subscription permissions, click Add principal.
Add: [email protected]
Assign the role Pub/Sub Publisher.
Click Update to save changes.
Ensure the Endpoint URL is copied exactly from your AppMySite dashboard to allow proper validation of in-app purchases.
In your Google Play Console, select your app from the app listing screen.
From the left navigation menu, go to Monetize > Products >One-time products/Subscriptions.
Click Create one-time product/Create Subscriptions.
Enter the Product ID generated in your AppMySite in-app purchase dashboard.
Fill in the remaining product details.
Click Save.
The Product ID in Google Play Console must exactly match the Product ID created in your AppMySite dashboard.
Last updated
Was this helpful?
Was this helpful?