Google In-App Purchase

Last updated: June 17, 2026

Google Play In-App Purchase (IAP) is required whenever your Android app sells digital products or services. If your website already has a payment system, it works fine inside the app for physical goods and real-world services. But for digital content — premium features, virtual items, subscriptions — Google mandates that purchases go through Google Play Billing.

When Is IAP Required?

SellingRequires Google Play Billing
Premium features, subscriptionsYes
Digital content (ebooks, videos, courses)Yes
Virtual currency or in-app itemsYes
Physical products (clothing, furniture)No
Real-world services (consulting, delivery)No

Supported Product Types

TypeDescription
ConsumableCan be purchased multiple times. Examples: credits, coins, extra lives.
Non-ConsumablePurchased once and owned permanently. Examples: removing ads, unlocking a feature.
SubscriptionRenews automatically. Examples: monthly premium, yearly membership.

Enabling the Module and Rebuilding Your App

Google Play Billing only works in a build that's been uploaded to the Play Console — it cannot be tested with a directly installed APK. Before you can create any products, do the following:

  1. Enable the Google In-App Purchase module in your Appilix App Dashboard.
  2. Rebuild your app with a higher version code than your last upload.
  3. Upload the new build to a testing track (internal or closed) or to production in the Play Console.

Only after this build is uploaded will Play Console let you create in-app products for your app.

Setting Up Products in Google Play Console

  1. Log in to Google Play Console and open your app.
  2. For Consumable or Non-Consumable products, go to Monetize with Play → Products → One-time products → Create product. For Subscriptions, go to Monetize with Play → Products → Subscriptions → Create subscription.
  3. Enter the Product ID, for example: premium_monthly. This is the ID you'll reference in your JavaScript code.
  4. Set the price, availability, and localization. Activate the product.

Integrating with Your Website

When your website is running inside the Android app, your existing payment buttons need to be intercepted and rerouted through the JavaScript Bridge. See the Google In-App Purchase JavaScript Bridge article for full implementation details, including how to trigger the purchase and handle the response.

Once the bridge is wired up, test it on your website inside the app.

Testing

Play Billing only works in a build installed through the Play Store — it will not work if the app is installed from a directly downloaded APK file. To test:

  • If your build is on an internal or closed testing track, add yourself as a tester, accept the testing invite, and install the app from the Play Store using that tester account.
  • If your build is in production, install the app from the Play Store as a normal user.
  • Open your website inside the installed app and trigger a purchase to confirm the JavaScript Bridge and Play Billing flow work end to end.

Important Notes

  • Product IDs must match exactly between Google Play Console and your JavaScript code.
  • Always verify purchases on your backend server before delivering the product.
  • This is Android-only. On iOS, see the Apple In-App Purchase article.