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
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.
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.
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
- Add the Play Billing Library dependency to your Gradle build and sync.
- Connect a billing client when your app starts and handle the connection result.
- Query product details for the IDs you sell, and show the localized price Play returns.
- Launch the billing flow from an activity, so Play can return the result to a live screen.
- 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 documentationThese 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
