Implementing Google Play Billing (One-Time Purchases) for Android

Implementing Google Play Billing (One-Time Purchases) for Android Imagine: your app is already in the store, but the build gets rejected due to an outdated BillingClient version. Or worse — purchases go through, but Google refunds the money three days later because the developer forgot to call ac

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
Implementing Google Play Billing (One-Time Purchases) for Android
Medium
~2-3 days

Our competencies:

Frequently Asked Questions

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    894
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    782
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1216
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1079
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    1002
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    597

Implementing Google Play Billing (One-Time Purchases) for Android

Imagine: your app is already in the store, but the build gets rejected due to an outdated BillingClient version. Or worse — purchases go through, but Google refunds the money three days later because the developer forgot to call acknowledgePurchase(). Such cases are not rare. In our practice, we had a client losing up to 30% of revenue due to incorrect handling of pending transactions. After migrating to Billing Library 6 and implementing server-side verification, their revenue grew by 15%. We help avoid these mistakes and guarantee first-time moderation approval. In this article, you'll learn how to properly integrate one-time purchases while avoiding typical pitfalls.

Google's official documentation emphasizes: acknowledgement is mandatory for all purchases. Billing Library 6 became mandatory for new apps. Its asynchronous API requires rewriting existing code. The synchronous queryPurchases is replaced by queryPurchasesAsync, PendingPurchasesParams has been added for deferred transactions, and acknowledge is now required. Without calling it within 72 hours, Google automatically revokes the purchase. Let's dive into the key aspects of integration.

One-time products: INAPP vs DURABLE

In Play Billing 6+, one-time purchases are split into two subtypes:

  • INAPP (legacy type) — consumables and non-consumables in one basket.
  • DURABLE — explicitly non-consumable, a new type since BillingClient 6.

In practice, for "remove ads" and "unlock levels" we use ProductType.INAPP with acknowledged status as an ownership marker. DURABLE is convenient when you need to strictly separate product types in analytics.

Criteria INAPP DURABLE
Product type Any (consumable/non-consumable) Only non-consumable
History Before Billing 6 Introduced in Billing 6
Acknowledgement Mandatory Mandatory
Recommendation Universal For clear separation

Why acknowledgement is critical?

Every purchase must be acknowledged within 3 days via acknowledgePurchase() or consumePurchase() (for consumables). If not acknowledged, Google automatically refunds and revokes the purchase. This is not obvious from the documentation but is strictly checked during moderation. Revenue loss can reach up to $1,600 per year with 1,000 paying users.

Example purchase acknowledgement code
val billingClient = BillingClient.newBuilder(context) .setListener { billingResult, purchases -> purchases?.forEach { purchase -> if (purchase.purchaseState == Purchase.PurchaseState.PURCHASED) { if (!purchase.isAcknowledged) { val params = AcknowledgePurchaseParams.newBuilder() .setPurchaseToken(purchase.purchaseToken) .build() billingClient.acknowledgePurchase(params) { result -> if (result.responseCode == BillingClient.BillingResponseCode.OK) { unlockFeature(purchase.products.first()) } } } } } } .enablePendingPurchases( PendingPurchasesParams.newBuilder() .enableOneTimeProducts() .build() ) .build() 

enablePendingPurchases() is now mandatory. Without it, BillingClient.startConnection() throws an exception. Pending purchases (cash payments via Google Pay partners in some regions) don't transition to PURCHASED immediately — you need to listen for updates via PurchasesUpdatedListener.

How to restore purchases after reinstall?

Upon app reinstall, purchases are restored via queryPurchasesAsync(QueryPurchasesParams). Call on every startup:

val params = QueryPurchasesParams.newBuilder() .setProductType(BillingClient.ProductType.INAPP) .build() billingClient.queryPurchasesAsync(params) { billingResult, purchaseList -> purchaseList.filter { it.purchaseState == Purchase.PurchaseState.PURCHASED && it.isAcknowledged }.forEach { restoreAccess(it) } } 

How to choose between client-side and server-side verification?

Criteria Client-only Server-side verification
Reliability Low (can be spoofed) High (Google Play Developer API)
Restoration across devices No Yes
Fraud protection No Yes
Complexity Minimal Medium (back-end needed)

Server-side verification is 2x more reliable than client-only and prevents revenue leakage: with 1,000 paying users, it saves up to 15% of revenue. We always implement the server part — we set up integration with the Google Play Developer API in 1 day.

Process: from audit to release

  1. Audit current code — find outdated calls, state handling errors.
  2. Design — choose INAPP or DURABLE, design purchase flow.
  3. Integration — connect Billing Library 6, implement acknowledgement, pending purchases, restoration.
  4. Server-side verification — set up endpoint, deploy token verification.
  5. Testing — via License Testing in Play Console, test all states.
  6. Release — publish update, guarantee moderation approval.

What's included

  • Source code of integration (Kotlin/Java with comments)
  • API endpoint for server-side verification (Node.js/Python/PHP)
  • Documentation on purchase flow and testing
  • Help setting up test accounts
  • Support during release (2 weeks)

Typical integration mistakes

Developers often skip acknowledgePurchase — then money is refunded after 3 days. Missing enablePendingPurchases causes a crash on connection. Not restoring purchases on reinstall means users lose access. Client-only verification without server allows spoofing. Each of these mistakes can cost a business up to $2,000 in debugging and lost loyalty.

We guarantee none of these errors make it into production. Our team has 5+ years of experience in mobile app monetization. We have developed a secure verification system that reduces integration time by 30% compared to in-house development. Certified specialists (Google Play Console Administrator) confirm our expertise.

Integration timelines are 2–3 working days for the client part, +1 day for server-side verification. Cost is calculated individually. If you need to implement one-time purchases in your app, request a consultation. We'll assess your project in 1 day and offer an optimal solution. Contact us to discuss details.