Sanniv Khare 6 min read

Play Billing Library 9 migration: what changes from 8 and from 7

Play Billing Library 9 migration: what changes from 8 and from 7

The short version: Google Play stops accepting new apps and updates built with Play Billing Library (PBL) 8 on 31 August 2027 (extension possible to 1 November 2027). If you are already on PBL 8, the move to 9.1.0 is small: bump the dependency, make sure AndroidX core resolves to 1.9 or later, handle BILLING_UNAVAILABLE where you used to see ERROR for a blocked Play Store, and treat DeveloperProvidedBillingDetails.getLinkUri() as nullable. If you are still on PBL 7 or older, you missed the 2026 cutoff and have the whole SkuDetails removal to do as well.

This post is a table we built from three Google pages (the FAQ and the guide were last updated on 13 November 2026): the deprecation FAQ, the Play Billing release notes and the migration guide to PBL 9. Every row links to its source.

Why we did this: we build and maintain Android and React Native apps for clients, and Play’s billing library is one of the dependencies Google forces up on a fixed yearly schedule. We wanted one page to check an app against before the next cutoff, instead of reading three.

The deadlines, as Google lists them

Play Billing Library deadlines for new apps and updates: v7 2026, v8 2027, v9 2028

Each date is 31 August of that year, from the deprecation FAQ’s support timeline.

Version New apps and updates must be off it by Extension until
PBL 7 31 Aug 2026 1 Nov 2026
PBL 8 31 Aug 2027 1 Nov 2027
PBL 9 31 Aug 2028 1 Nov 2028

Source: deprecation FAQ, support timeline. The banner at the top of that page still talks about the 2026 date (“all new apps and updates to existing apps must use Billing Library version 8 or later”); that is the PBL 7 cutoff, and it agrees with the table. As of today, both PBL 7 dates have passed.

The deadline covers new apps and updates. An installed app keeps working, but you cannot ship an update to it on the old library after the date, which in practice means the next bug fix forces the upgrade.

Which versions exist

Release Date What it brought Source
8.0.0 30 Jun 2025 removed queryPurchaseHistory(), querySkuDetailsAsync(), no-arg enablePendingPurchases(), queryPurchasesAsync(String skuType, ...) release notes
8.1.0 6 Nov 2025 minSdkVersion 23, Kotlin 2.2.0 support release notes
8.3.0 23 Dec 2025 external payments APIs (BillingProgram.EXTERNAL_PAYMENTS), last 8.x release notes
9.0.0 19 May 2026 ERROR to BILLING_UNAVAILABLE for a blocked Play Store, nullable getLinkUri(), library targetSdkVersion 35 release notes
9.1.0 18 Jun 2026 Billing Choice APIs, nothing removed release notes

The important line is the first one: the big removals happened in 8.0.0, not 9. If your app compiles against PBL 8 today, those APIs are already gone from your code.

From PBL 8 to 9: the four changes

1. The dependency

// app/build.gradle.kts
dependencies {
    val billingVersion = "9.1.0"
    implementation("com.android.billingclient:billing-ktx:$billingVersion")
}

Use com.android.billingclient:billing instead of billing-ktx if you do not use the Kotlin extensions. Both coordinates and the 9.1.0 version are from the migration guide.

2. BILLING_UNAVAILABLE for a blocked Play Store

From 9.0.0, when the system blocks the Play Store app (Google’s example is an OEM-customised kids mode), the response code changes from ERROR to BILLING_UNAVAILABLE, with the debug message “Play Store is blocked”. Google notes this needs AndroidX core 1.9 or later in the app (release notes, 9.0.0).

The risk is in code that retries on ERROR. A blocked Play Store will not unblock itself, so it should get a message, not a retry loop:

when (billingResult.responseCode) {
    BillingResponseCode.OK -> showProducts()
    BillingResponseCode.BILLING_UNAVAILABLE ->
        showStoreUnavailable() // includes "Play Store is blocked"
    BillingResponseCode.ERROR -> retryWithBackoff()
    else -> logAndShowGenericError(billingResult)
}

Check which AndroidX core version your app actually resolves; another library may hold it back:

./gradlew :app:dependencies --configuration releaseRuntimeClasspath | grep "androidx.core:core:"

3. getLinkUri() can be null

DeveloperProvidedBillingDetails.getLinkUri() is @Nullable from 9.0.0, and Google’s guide says to handle both null and an empty string. In Kotlin the platform type hides this until it crashes, so make it explicit:

val uri: String? = details.linkUri
if (uri.isNullOrEmpty()) {
    // no developer link: stay in the Play flow
} else {
    openDeveloperBillingLink(uri)
}

This only matters if you use the alternative or external billing programs; most apps never call it. Treat the snippets in this post as a starting point and compile them against your own billing wrapper.

The migration guide also recommends turning on automatic service reconnection and reading the sub-response codes that launchBillingFlow() can return, such as PAYMENT_DECLINED_DUE_TO_INSUFFICIENT_FUNDS and USER_INELIGIBLE, so you can show a better message than “purchase failed” (migration guide, steps 4 and 5).

From PBL 7 or older: the SkuDetails removal

If you are coming from 7, the migration guide’s table of removed APIs is the real work. We checked each row against the release notes:

Removed Use instead Source
SkuDetails ProductDetails guide
SkuDetailsParams QueryProductDetailsParams guide
SkuDetailsResponseListener ProductDetailsResponseListener guide
BillingClient.SkuType BillingClient.ProductType guide
querySkuDetailsAsync queryProductDetailsAsync guide, notes
getSkuDetailsList / setSkuDetailsList setProductDetailsParamsList on BillingFlowParams.Builder guide
queryPurchaseHistoryAsync, QueryPurchaseHistoryParams queryPurchasesAsync (owned items); trial eligibility from getSubscriptionOfferDetails() guide, notes
enablePendingPurchases() (no arguments) enablePendingPurchases(params) with PendingPurchasesParams guide
queryPurchasesAsync(skuType, ...) queryPurchasesAsync(params, ...) with QueryPurchasesParams guide

Two things to know when reading Google’s pages. The release notes put the removal of queryPurchaseHistory() in 8.0.0, while the migration guide lists it under PBL 9; either way it is gone on 9. And the guide has two removal tables that give different replacements for the purchase history APIs (queryPurchasesAsync in one, queryProductDetailsAsync in the other). Purchase history and product details answer different questions, so pick by what your code used history for: owned items come from queryPurchasesAsync, trial eligibility from the subscription offers on ProductDetails.

Kotlin before and after: SkuDetailsParams replaced by QueryProductDetailsParams

The most common rewrite, product lookup, in Kotlin. Product is QueryProductDetailsParams.Product and SUBS is ProductType.SUBS, shortened for the card.

Coming from 7 there is one more step: the product details callback changed shape in PBL 8, and the listener now receives a QueryProductDetailsResult rather than a plain list, so productDetailsList is read from that result (migration guide, step 2).

React Native apps

A React Native app does not declare the billing library itself; it arrives through the IAP package. In react-native-iap 17.6.1 (the current npm release), the Android build reads the native version from openiap-versions.json in the package, which pins the OpenIAP Google module at 4.4.1, and that module brings the Play Billing dependency. The quickest honest answer to “which PBL does my app ship” is the resolved dependency tree, not the package version:

cd android
./gradlew :app:dependencies --configuration releaseRuntimeClasspath | grep billingclient

If that prints com.android.billingclient:billing:9.x, the library side is done and only steps 2 and 3 above apply to your JavaScript error handling. If it prints 8.x, upgrade the IAP package first; adding a direct billing dependency on top of a wrapper that was not built for it is a good way to get runtime errors instead of compile errors.

A checklist for one app

  1. Run the grep billingclient command above and note the version.
  2. On 8.x: bump to 9.1.0 and confirm androidx.core:core resolves to 1.9 or later.
  3. Search for ERROR handling around billing calls and give BILLING_UNAVAILABLE its own message.
  4. Search for linkUri / getLinkUri() and add the null and empty checks.
  5. On 7.x or older: work through the SkuDetails table first, then steps 2 to 4.
  6. Ship it in a normal release well before 31 August 2027, so the deadline never decides your release date.

Made by the team behind this post

Apps from our studio

  • Goes with this post

    BMDB.fun

    Your Bollywood world at a glance, with links straight to the OTT app that streams each film.

    Android TV · Web · Mobile

    Get
  • Nix

    The Mac uninstaller that finds what the Trash leaves behind: caches, logs, derived data and saved states.

    macOS

    Get
  • Cardigami

    Pop-up greeting cards that rise out of the fold on iPhone Duo.

    iPhone · App Store

    Get
  • OneClick QuitAll

    Quit every running app in one click. See memory and CPU first.

    macOS · Mac App Store

    Get

Need this built? Let’s talk.

We build and run apps for Mac, TV, mobile and the web, and write about what we learn.