/

/

Google Play Billing Library 7.0.0 Updates: Essential Guide for App Developers

Summary

Title

Tatev

May 17, 2024

News

Google Play Billing Library 7.0.0 Updates: Essential Guide for App Developers

Tatev

May 17, 2024

News

Google Play Billing Library 7.0.0 Updates: Essential Guide for App Developers

Tatev

May 17, 2024

News

Google Play Billing Library 7.0.0 Updates: Essential Guide for App Developers

Tatev

May 17, 2024

News

Google Play Billing Library 7.0.0 Updates: Essential Guide for App Developers

In the previous article we've touched upon 2024 Google I/O Updates for App Developers, among which was the new Google Play Billing Library 7. This latest iteration enhances the in-app billing and subscriptions framework.

You can always find all the info on these and other updates in Google's release notes but for the nitty-gritty details, but we've made things easier by pulling together the key updates right here.

Need a hand integrating these changes into your app? Give us a shout!

In the previous article we've touched upon 2024 Google I/O Updates for App Developers, among which was the new Google Play Billing Library 7. This latest iteration enhances the in-app billing and subscriptions framework.

You can always find all the info on these and other updates in Google's release notes but for the nitty-gritty details, but we've made things easier by pulling together the key updates right here.

Need a hand integrating these changes into your app? Give us a shout!

In the previous article we've touched upon 2024 Google I/O Updates for App Developers, among which was the new Google Play Billing Library 7. This latest iteration enhances the in-app billing and subscriptions framework.

You can always find all the info on these and other updates in Google's release notes but for the nitty-gritty details, but we've made things easier by pulling together the key updates right here.

Need a hand integrating these changes into your app? Give us a shout!

In the previous article we've touched upon 2024 Google I/O Updates for App Developers, among which was the new Google Play Billing Library 7. This latest iteration enhances the in-app billing and subscriptions framework.

You can always find all the info on these and other updates in Google's release notes but for the nitty-gritty details, but we've made things easier by pulling together the key updates right here.

Need a hand integrating these changes into your app? Give us a shout!

Google Play Billing Library 7.0.0 Updates:
Google Play Billing Library 7.0.0 Updates:
Google Play Billing Library 7.0.0 Updates:
Google Play Billing Library 7.0.0 Updates:

Installment Subscriptions in Play Billing Library 7 or Google's New Pay Over Time Feature

Google's Play Billing Library has just leveled up the billing with installment subscriptions. Once you implement

ProductDetails.InstallmentPlanDetails API

your app users will be able to pay for subscriptions in easy, bite-sized installments instead of all at once. This update, available in Play Billing Library 7, makes subscriptions more flexible for users and straightforward for developers to manage. Here's the quick scoop:

What is it? Flexible Installments: Apps can set up and manage subscription plans that let users pay monthly over a set period, like 15 months.

Where? Initially, this feature rolls out in Brazil, France, Italy, and Spain.

How is this going to work? Let's see in detail:

  • Plan Changes: Price changes and cancellations take effect after the current period ends, but other plan changes can happen immediately.

  • Notifications: You'll get real-time alerts if a user cancels, with effects kicking in only after the commitment period.

  • Getting Paid: You’ll receive your money as users make their installment payments, just like regular subscriptions.

  • Missed Payments: Google might try to collect during grace periods, but there’s no chasing after that.

Streamlining Pending Purchases in Play Billing Library 7: What’s New

Google has updated the way you handle pending purchases in your app. They've introduced a new

PendingPurchasesParams

along with a method called

BillingClient.Builder.enablePendingPurchases(PendingPurchaseParams)

This new setup replaces the old method

BillingClient.Builder.enablePendingPurchases()

which they've phased out in this latest release. Essentially, the new method does the same thing as the old one, especially when you set it up to enable one-time products, but it’s structured to be more flexible and clear for future enhancements.

Simply put, developers need to tweak their code slightly to accommodate this new method, ensuring their apps remain up-to-date with Google's billing practices.

Navigating Pending Transactions for Subscription Prepaid Plans

Google rolled out some new API updates that make handling subscription payments more predictable and secure, providing clear paths for upgrades, downgrades, and initial purchases while ensuring users get access only when they paid. Here are the details:

New APIs for Prepaid Plans

Developers can now use

PendingPurchasesParams.Builder.enablePrepaidPlans() alongside BillingClient.Builder.enablePendingPurchases(PendingPurchaseParams)

to handle pending transactions specifically for prepaid subscription plans. This ensures that the app manages the lifecycle of subscriptions more effectively.

Handling Pending Transactions

Methods like

Purchase.PendingPurchaseUpdate

and

Purchase.getPendingPurchaseUpdate()

allow you to manage changes such as top-ups, upgrades, or downgrades that are still pending. This allows your app to handle pending transactions smoothly without prematurely changing the user’s subscription status.

Subscription States

When a subscription transaction is pending (e.g., during initial purchase, top-up, upgrade, or downgrade), it starts in a

SUBSCRIPTION_STATE_PENDING

It only transitions to

SUBSCRIPTION_STATE_ACTIVE

once the transaction is complete. If a transaction is canceled or expires, it moves to

SUBSCRIPTION_STATE_PENDING_PURCHASE_EXPIRED

This careful tracking ensures that users only gain access to new subscription benefits after their transactions are fully processed.

Purchase Management

Google has updates how developers should handle purchase history and revoked transactions in their apps by deprecating the

queryPurchaseHistoryAsync()

in favor of more robust methods:

Active Purchases: Use

BillingClient.queryPurchasesAsync()

for current transactions.

Consumed Purchases: Track these on your own servers, shifting the responsibility away from Google's systems

Canceled Purchases: Handle through the voided-purchases developer API that provides a list of voided orders for revoking access to products, applicable to both one-time orders and subscriptions. This function helps boost fairness, especially in the game apps. The API only includes revoked orders, so if a refund is issued without the revoke option, it won’t appear here.

Other Method Replacements

Developers aiming to provide a more integrated and flexible approach to handling user billing options should replace

BillingClient.Builder.enableAlternativeBilling()
AlternativeBillingListener

and

AlternativeChoiceDetails

with new

BillingClient.Builder.enableUserChoiceBilling()

coupled with

UserChoiceBillingListener and UserChoiceDetails

To simplify subscription updating, replace the removed

 BillingFlowParams.ProrationMode

and methods like

BillingFlowParams.SubscriptionUpdateParams.Builder.setReplaceProrationMode()

and

setReplaceSkusProrationMode()

with

BillingFlowParams.SubscriptionUpdateParams.ReplacementMode

and

BillingFlowParams.SubscriptionUpdateParams.Builder#setSubscriptionReplacementMode(int)

To handle subscriptions more effectively and securly, replace

BillingFlowParams.SubscriptionUpdateParams.Builder#setOldSkuPurchaseToken()

with

BillingFlowParams.SubscriptionUpdateParams.Builder#setOldPurchaseToken(java.lang.String)

Migrating from Play Billing Library 5 and 6

As always, once a new version is released, apps from the older versions need to migrate. With the announcement of Google Play Billing Library 7 you need to know when to migrate from Play Billing Library 5 and Play Billing Library 6:

  • Google Play Billing Library 5: You've got until August 1, 2024 to launch any new apps using this version. For updates to existing apps, you have a little longer — until November 1, 2024.

  • Google Play Billing Library 6: This version gives you a bit more leeway. You can launch new apps with it up until August 1, 2025, and continue updating existing apps until November 1, 2025.

Google Play Billing Library 7

Qonversion SDK Support for Play Billing Library 7

The recent updates in Google Play Billing are incremental, but they still require updates and valuable development time. With Qonversion, you avoid the hassle and potential errors of migrating on your own.

We provide support of new versions as fast as we can to ensure you can quickly leverage new features. Whether you're a current Qonversion customer or considering the switch, our Android SDK makes integrating the latest SDK changes effortless — we handle all the heavy lifting for you.

More Resources on Google Play Billing Library 7

Here's a list of helpful resources related to this topic to further guide you through these updates.

If you have any questions or need personalized assistance, don't hesitate to reach out. We're here to help you navigate these updates and app subscription management.

Start Now for Free

Or book a demo with our team to learn more about Qonversion

Start Now for Free

Or book a demo with our team to learn more about Qonversion

Start Now for Free

Or book a demo with our team to learn more about Qonversion

Start Now for Free

Or book a demo with our team to learn more about Qonversion