Release 6.4.0 - Simplified APIs
We're releasing version 6.4.0 with the streamlined fetchProducts API plus
all of the platform work that landed during the 6.3.x cycle. If you skipped the
intermediate patch releases, this post captures everything you need to know.
Version Information
- Current Version: 6.4.0
- Previous Stable: 6.3.3
Breaking Changes
Simplified fetchProducts API
Based on feedback from issue #527, we've simplified the fetchProducts method to use direct parameters instead of a wrapper object:
Before (6.3.x):
final products = await iap.fetchProducts(
RequestProductsParams(
productIds: ['product_id'],
type: PurchaseType.inapp,
),
);
After (6.4.0):
final products = await iap.fetchProducts(
productIds: ['product_id'],
type: PurchaseType.inapp, // Optional, defaults to PurchaseType.inapp
);
The RequestProductsParams class has been removed entirely, making the API cleaner and more intuitive.
Deprecated Android aliases retained (still deprecated)
In v6.4.0 we kept the previously deprecated Android aliases in place, but they remain deprecated and will be removed in a future major release:
subscriptionOfferDetailsfield → usesubscriptionOfferDetailsAndroidinstead.prorationModefield → usereplacementModeAndroidinstead.AndroidProrationModetypedef → useAndroidReplacementModeinstead.
Update any lingering usage so you are ready once the aliases are finally removed.
Android Replacement Mode & OpenIAP compliance (from 6.3.x)
The 6.3.x line introduced the Play Billing v8 terminology and a big schema refresh for OpenIAP. Those updates remain in 6.4.x:
replacementModesupersedes the oldprorationModevalues on Android.- The Dart enums follow the Play Store names (
withTimeProration,chargeProratedPrice, etc.). - Core types now inherit from
ProductCommon,PurchaseCommon, andProductSubscriptionCommon, matching the OpenIAP spec. - Android products expose the missing Play Store fields (
nameAndroid,oneTimePurchaseOfferDetailsAndroid) so you get the full pricing payload. - Extensive null‑safety and naming clean-up across the generated types.
If you still reference the deprecated symbols, update them soon—6.4.x keeps them as aliases, but they are scheduled for removal in a later release.
iOS subscription lifecycle improvements
We fixed the StoreKit 2 sandbox behaviour that hid expired subscriptions. You
can now request historical transactions directly via getAvailablePurchases:
final purchases = await FlutterInappPurchase.instance.getAvailablePurchases(
PurchaseOptions(onlyIncludeActiveItemsIOS: false),
);
PurchaseOptions is new in 6.4.x and lets you opt in to expired items or event
rebroadcasts. With this, getPurchaseHistories() is officially deprecated—plan
to migrate before 6.6.0, where it will disappear.
Android Replacement Mode & OpenIAP compliance (from 6.3.x)
The 6.3.x line introduced the Play Billing v8 terminology and a big schema refresh for OpenIAP. Those updates remain in 6.4.x:
replacementModesupersedes the oldprorationModevalues on Android.- The Dart enums follow the Play Store names (
withTimeProration,chargeProratedPrice, etc.). - Core types now inherit from
ProductCommon,PurchaseCommon, andProductSubscriptionCommon, matching the OpenIAP spec. - Android products expose the missing Play Store fields (
nameAndroid,oneTimePurchaseOfferDetailsAndroid) so you get the full pricing payload. - Extensive null‑safety and naming clean-up across the generated types.
If you still reference the deprecated symbols, update them now—6.4.0 is the first release where they are removed.
iOS subscription lifecycle improvements
We fixed the StoreKit 2 sandbox behaviour that hid expired subscriptions. You
can now request historical transactions directly via getAvailablePurchases:
final purchases = await FlutterInappPurchase.instance.getAvailablePurchases(
PurchaseOptions(onlyIncludeActiveItemsIOS: false),
);
PurchaseOptions is new in 6.4.x and lets you opt in to expired items or event
rebroadcasts. With this, getPurchaseHistories() is officially deprecated—plan
to migrate before 6.6.0, where it will disappear.
A Note on Recent Changes
We understand there have been several breaking changes in recent releases, and we sincerely apologize for any inconvenience this may have caused. These changes are part of our concerted effort to rapidly address the long maintenance gap this library experienced and bring it up to modern standards.
We're pleased to announce that with version 6.4.0, we believe the major restructuring phase is now complete. The API should remain stable moving forward, allowing you to build with confidence.
Migration Guide
To migrate from 6.3.x to 6.4.0:
- Remove any imports of
RequestProductsParams - Update all calls to
fetchProductsto use the new parameter format:- Replace
RequestProductsParams(productIds: ids, type: type)with direct named parameters - The
typeparameter now defaults toPurchaseType.inappif not specified
- Replace
Looking Forward
With this release, we've addressed the accumulated technical debt and modernized the API structure. Future releases will focus on:
- Adding new features
- Performance improvements
- Bug fixes
- Documentation enhancements
All while maintaining API stability.
Thank you for your patience and continued support as we've worked to improve flutter_inapp_purchase.
