For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configure in-app purchase (Android)

How to connect in-app purchases with Google Play Console

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.

Step 1: Set up a Payments profile

  • From the left side menu, go to Settings.

  • Click Create payments profile.

  • Complete the required payment details.

Step 2: Enable real-time developer notifications

  • 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.

Step 4: Configure Pub/Sub in 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.

  • Assign the role Pub/Sub Publisher.

  • Click Update to save changes.

Step 5: Configure in-app products

  • 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.

Last updated

Was this helpful?