Google Play In-App Billing: Setting Up Subscriptions and Purchases

How to set up Google Play in-app billing: Play Console product setup, Play Billing Library integration, purchase acknowledgement rules, and how to test purchases before release.

Reviewed August 24, 2026Moderate change risk — verify before applying3 min read2 official sources

Written & maintained by AppsTestLabAbout AppsTestLabHow we research

An Android phone showing an in-app purchase confirmation screen during a billing flow
An Android phone showing an in-app purchase confirmation screen during a billing flow
On this page
  1. Set up products in Play Console
  2. Integrate the Play Billing Library
  3. Test before you ship

In-app billing is how Android apps sell digital goods and subscriptions through Google Play. The system has two halves: the product catalog you configure in Play Console, and the Play Billing Library your app uses to talk to the Play Store at runtime. This guide covers both halves, plus the acknowledgement rules that silently refund purchases when developers forget them.

Set up products in Play Console

  1. Open your app's product catalog

    In Play Console, go to your app, then the monetization section for in-app products or subscriptions. One-time products cover consumables like coins and non-consumables like feature unlocks, while subscriptions cover recurring access.

  1. Create the product with a stable ID

    Give each product a product ID that will never change, because the ID is what your app matches on at runtime. You can edit the price and description later, but renaming the ID breaks every build that references it.

  1. Set pricing and availability

    Choose a base price, let Play handle currency conversion and local taxes where applicable, and decide which countries can buy the product. Product availability is separate from your app's country availability, so check both.

Integrate the Play Billing Library

  1. Add the Play Billing Library dependency to your Gradle build and sync.
  2. Connect a billing client when your app starts and handle the connection result.
  3. Query product details for the IDs you sell, and show the localized price Play returns.
  4. Launch the billing flow from an activity, so Play can return the result to a live screen.
  5. Listen for purchases, verify them, then acknowledge or consume them.

Test before you ship

Add license testers in Play Console so you can run real purchase flows with test payment methods that do not charge anyone. Run every path: successful purchase, user cancellation, declined card, and the upgrade or downgrade path if you sell subscriptions. Testing billing on a real device with a real Play Store build is the only reliable check, because emulators without Play services will not exercise the flow.

Billing integrations fail review for the same small reasons repeatedly: missing acknowledgement, prices that do not match the store listing, or a subscription screen that hides the renewal terms. AppsTestLab runs a pre-submission pass over purchase flows and the screens around them, so those problems surface before review does.

Frequently asked questions

Do I need a server to sell in-app products?

Not for simple apps. The Play Billing Library can run entirely on device, though a server is worth it when you need shared entitlements, receipt validation, or subscription state that survives reinstalls.

Can I sell the same product in multiple apps?

Products belong to one app in Play Console. If several apps should share a purchase, you need separate product definitions per app or a shared account system of your own.

What happens if the user uninstalls after buying?

For non-consumable products and subscriptions, Play records the purchase and restores it when the user installs again on the same account. Your app should query existing purchases at startup and restore entitlements without charging again.

Sources & references

Official Google documentation

These links open Google's official Play Console Help pages used to verify this guide. AppsTestLab guidance is independent and not affiliated with Google.

Get help doing this

AppsTestLab can run your testing for you

Ready to test?

5,000+ apps tested. A 99% historical approval rate. And a 100% money-back guarantee.

Tell us about your app and we'll confirm the right testing approach. One WhatsApp message to start, no complicated setup.

Guarantee applies to eligible app testing orders · Google makes the final approval decision

Chat on WhatsApp