Skip to main content

Migration v17.0

This latest update integrates Google Play Billing v7 bringing support for Android API v35. (This is a required update before the end of August 2025.)

This release brings a refactoring of the extension around products and purchases events. The purpose here is to reduce the ambiguity of the InAppBillingEvent that was previously used to handle all events and to provide a more consistent API for handling purchases and products.

This update also includes a major update to the Samsung IAP integration.

Google Play Billing

This release updates the Google Play Billing client library to v7.1.1 which includes a number of improvements and bug fixes.

  • Added APIs to support installment subscriptions
  • Added ability to set new EU requirements on purchase requests (isOfferPersonalised)
  • Added SubscriptionInstallmentPlan on a SubscriptionOffer for subscription installment payment options
  • Added PendingUpdate details on a purchase when purchase is changing
  • Updated minSdkVersion to 21
  • Series of internal refactors to improve performance and maintainability
  • Internal updates and bug fixes

You will likely want to update your application to use target sdk version 35 to ensure compatibility with the latest Google Play requirements.

<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />

Samsung IAP

This release includes a major update to the Samsung IAP integration. The SDK has been updated to v6.4.0 which includes a range of internal changes. Purchases now need to be acknowledged which is completed through the normal process of calling finishPurchase(). There have been some internal changes to offers with usage of the "promotion eligibility" checks that are performed when retrieving the product list.

  • Added support for Samsung IAP v6.4.0
  • Updated to use new Samsung IAP APIs for purchase acknowledgment
  • Updated to use new Samsung IAP APIs for promotion eligibility checks
  • Updated minSdkVersion to 23

Subscription Management UI

This release adds a subscription management UI and fallback URL redirect for both Android and iOS platforms. This allows users to manage their subscriptions directly from the app, providing a better user experience.

if (InAppBilling.service.isShowManageSubscriptionsSupported) 
{
InAppBilling.service.showManageSubscriptions();
}

More information: Subscription Management UI

Product and Purchase Event Refactor

This latest release brings a refactoring of the extension around products and purchases events.

The purpose here is to reduce the ambiguity of the InAppBillingEvent that was previously used to handle all events and to provide a more consistent API for handling purchases and products.

The existing events will continue to work but we recommend you update your code to use the new events as they are more consistent and easier to use.

Product Events

The ProductEvent class has been introduced to handle product events. This means the following events:

  • InAppBillingEvent.PRODUCTS_LOADED
  • InAppBillingEvent.PRODUCTS_FAILED
  • InAppBillingEvent.INVALID_PRODUCT

Are now handled by the ProductEvent class with similarly named events.

  • ProductEvent.PRODUCTS_LOADED
  • ProductEvent.PRODUCTS_FAILED
  • ProductEvent.INVALID_PRODUCT

This means you should update your code to use the new event class and the new event types.

InAppBilling.service.addEventListener( ProductEvent.PRODUCTS_LOADED, products_loadedHandler );
InAppBilling.service.addEventListener( ProductEvent.PRODUCTS_FAILED, products_failedHandler );
InAppBilling.service.addEventListener( ProductEvent.INVALID_PRODUCT, invalid_productHandler );

The parameters for the events are slightly different as well. The ProductEvent class now has a products property that contains the list of products that were loaded or failed to load. This replaces the data property that was previously used on the InAppBillingEvent class.

So the products_loadedHandler function should be updated to use the new event class and the new event properties.

Previously:

private function products_loadedHandler( event:InAppBillingEvent ):void
{
trace( "products loaded: " + event.data );
}

Now:

private function products_loadedHandler( event:ProductEvent ):void
{
trace( "products loaded: " + event.products );
}

Purchase Events

The existing PurchaseEvent class has been updated to handle all purchase related events. This means the following events:

  • InAppBillingEvent.RESTORE_PURCHASES_SUCCESS
  • InAppBillingEvent.RESTORE_PURCHASES_FAILED
  • InAppBillingEvent.CONSUME_SUCCESS
  • InAppBillingEvent.CONSUME_FAILED
  • InAppBillingEvent.FINISH_SUCCESS
  • InAppBillingEvent.FINISH_FAILED

Have all been moved to the PurchaseEvent class with similarly named events.

  • PurchaseEvent.RESTORE_PURCHASES_SUCCESS
  • PurchaseEvent.RESTORE_PURCHASES_FAILED
  • PurchaseEvent.CONSUME_SUCCESS
  • PurchaseEvent.CONSUME_FAILED
  • PurchaseEvent.FINISH_SUCCESS
  • PurchaseEvent.FINISH_FAILED

This means you should update your code to use the new event class and the new event types.

InAppBilling.service.addEventListener( PurchaseEvent.RESTORE_PURCHASES_SUCCESS, restore_purchases_successHandler );
InAppBilling.service.addEventListener( PurchaseEvent.RESTORE_PURCHASES_FAILED, restore_purchases_failedHandler );
InAppBilling.service.addEventListener( PurchaseEvent.CONSUME_SUCCESS, consume_successHandler );
InAppBilling.service.addEventListener( PurchaseEvent.CONSUME_FAILED, consume_failedHandler );
InAppBilling.service.addEventListener( PurchaseEvent.FINISH_SUCCESS, finish_successHandler );
InAppBilling.service.addEventListener( PurchaseEvent.FINISH_FAILED, finish_failedHandler );

The parameters for the events are slightly different as well. The PurchaseEvent class has a data property that is strongly typed to be a Vector.<Purchase> that contains the purchases related to the event. This replaces the untyped data property that is used on the InAppBillingEvent class.