IAP on Android devices

Enabling in-app purchases

Start a build after enabling in-app purchases by clicking the button in this section.

Once the build is complete (this can take up to 30 minutes), go to Google Play Console → App → Test and release → Testing → Internal testing. Save the draft release that was automatically created when the build file was sent to the Play Console.

If you received a build success email but don’t see a draft release with the new build file, manually create a draft release and attach the build file provided in the email.

Click the button to verify that everything is properly connected.

Handling billing notification events

Because in-app purchases are completed through Google’s interface, your app needs a way to detect when a user performs actions such as subscribing to or canceling a plan. Google Play Billing sends server-side notifications whenever these events occur. This step ensures your app’s backend is properly connected to Google Play Billing.

Click the link to open your Google Cloud permissions and add the following permission levels:

  • Pub/Sub-Admin

  • Service Account User

The Manage permissions option is located in the three-dot actions menu.

After adding the permissions, wait about 10 seconds. Then return to Bubble and click the button to automatically create a Pub/Sub configuration.

If this doesn’t work, make sure billing is enabled for your Google Cloud project and that the Pub/Sub API is enabled (step 3 in Google’s Pub/Sub documentation).

Testing setup

1

Copy the new pub/sub name

Then go to Google Play Console > Monetize with Play > Monetization setup > Enable notifications.

2

Check the box

Check the box to Enable real-time notifications and paste in the Topic Name.

3

Send a test notification

Still in the Google Play Console: Click Send a test notification.

4

Confirm

Return to Bubble and ensure a test notification has been successfully received.

If you encounter an error, check Google Play Console → Products → Pub/Sub to find the Google in-app purchase subscription that was created.

Last updated

Was this helpful?