verify_local_purchase 2.0.3
verify_local_purchase: ^2.0.3 copied to clipboard
A Flutter package for verifying in-app purchases and subscriptions locally on device with Apple App Store and Google Play Store.
2.0.3 #
- fix: App Store subscriptions and purchases with an introductory offer or free trial failed with
VerifyPurchaseException(invalidResponse)(type 'int' is not a subtype of type 'String?'). Transaction and renewal payloads are now decoded leniently instead of through theapp_store_server_sdkmodels, whoseofferType/gracePeriodExpiresDatetypes don't match Apple's responses.willAutoRenewis also filled in during billing grace period.
2.0.1 #
- chore: bumps
in_app_purchaseto^3.3.1(pullsin_app_purchase_android^0.5.0/ Google Play Billing Library 8.0.0). Apps callingqueryPurchaseHistoryon Android must migrate toqueryPurchases.
2.0.0 #
Breaking changes — see "Migrating from 1.x" in the README.
- feat!: verification methods return
VerificationResult(isValid,state,productId,expiresAt,willAutoRenew,isSandbox,raw) instead ofbool - feat!:
VerifyLocalPurchasemethods are now static (VerifyLocalPurchase.verifyPurchase(...)) - feat!: errors are thrown as
VerifyPurchaseExceptionwith aVerifyPurchaseErrorCode - feat!:
AppleConfig.useSandboxreplaced byAppleConfig.environment; defaultproductionWithSandboxFallbackretries in sandbox when production returns "transaction not found" (App Review / TestFlight) - feat!:
RefundPlatformrenamed toStorePlatform;VerifyPurchaseServiceis no longer exported - feat!: removed the unused native platform channel — now a pure Dart package (Android, iOS, macOS)
- feat:
verifyPurchaseDetails/verifySubscriptionDetailstake aPurchaseDetailsdirectly - feat:
initialize(enableLogging:)— logs are off by default and tokens are masked - feat:
VerifyLocalPurchase.dispose() - fix: Apple subscriptions in billing grace period (status 4) are valid; all subscription groups are checked, preferring the entry matching the
originalTransactionId - fix: Google
SUBSCRIPTION_STATE_PENDINGis no longer valid (reverts 1.0.6);IN_GRACE_PERIODis valid;CANCELEDstays valid untilexpiryTime - fix: macOS was verified against Google Play
- fix:
getSubscriptionToken/getOneTimePurchaseTokenthrowinvalidTokeninstead of crashing or returning'' - fix: unknown Google tokens (HTTP 404/410) return
state: notFoundinstead of throwing - perf: Google OAuth client and App Store clients are reused between calls
- chore:
flutter >=3.38.0, CI workflow, unit tests for all store states
1.1.0 #
- feat: add
getRefundsWithAppStore()— lists refunds for a single customer via App Store Server API (getRefundHistory) - feat: add
getRefundsWithGooglePlay()— lists all voided purchases for the app via Google Play Developer API (voidedpurchases) with automatic pagination - feat: add
RefundEntrymodel (+RefundPlatformenum) exported in public API
1.0.8 #
- feat: export
in_app_purchasepackage for convenience
1.0.7 #
- docs: remove dotenv example from README
1.0.6 #
- fix: consider
SUBSCRIPTION_STATE_PENDINGas valid active state when verifying Google Play subscriptions
1.0.5 #
- docs: add Google Play Android Developer API enablement step in Google Cloud Console setup
1.0.4 #
- purchase_token_utils.dart
1.0.3 #
- new doc
1.0.2 #
- Added individual platform-specific methods to
VerifyLocalPurchase:verifyPurchaseWithAppStore()verifyPurchaseWithGooglePlay()verifySubscriptionWithAppStore()verifySubscriptionWithGooglePlay()
1.0.0 #
- Initial release
- Support for verifying in-app purchases on iOS and Android
- Support for verifying subscriptions on iOS and Android
- Easy initialization with
VerifyLocalPurchase.initialize() - Apple App Store integration using App Store Server API
- Google Play Store integration using Google Play Developer API
- Local verification without backend server
- Support for both sandbox and production environments