zerosettle 1.3.4 copy "zerosettle: ^1.3.4" to clipboard
zerosettle: ^1.3.4 copied to clipboard

ZeroSettle SDK for Flutter — Merchant of Record web checkout.

1.3.4 #

Tracks ZeroSettleKit 1.3.4. Two adopter-visible changes plus a bridge cleanup.

ZSApplePaySetupRequiredException gains autoPresentedSetup field #

Mirrors Kit 1.3.4's payload addition on ZeroSettleError.applePaySetupRequired(autoPresentedSetup:). When the SDK auto-presented the system Wallet (because Configuration.applePaySetupBehavior == ApplePaySetupBehavior.presentBuiltInUI, the default), autoPresentedSetup is true; your app should NOT stack additional setup UI. When delegateToApp, the flag is false and your app owns the setup affordance — call ZeroSettle.instance.presentApplePaySetup() when ready.

try {
  await ZeroSettle.instance.purchase(productId: 'pro_monthly');
} on ZSApplePaySetupRequiredException catch (e) {
  if (e.autoPresentedSetup) {
    // SDK already opened Wallet — no UI needed, maybe analytics
  } else {
    showCustomSetupSheet();
  }
}

Source-compatible — the new field has a default of false, so existing catch (e) blocks keep working.

OfferManager factory: orphan-manager hazard fixed (Kit-side) #

Kit 1.3.4's offerManager(stripeCustomerId:) is now non-throwing and eager — it returns the canonical shared instance regardless of identify() state. The Flutter bridge no longer wraps the call in try/catch. Adopters using await ZeroSettle.instance.offerManager(...) benefit automatically: handles obtained before identify() runs now stay live and re-evaluate eligibility in place once the user identifies.

Internal: @Observable migration in ZeroSettleKit (no Flutter impact) #

Kit 1.3.4 migrated ApplePayAvailability from ObservableObject/@Published to Swift's modern Observation framework. The Flutter bridge subscribes to the deprecated-but-still-supported statePublisher (Combine AnyPublisher) — no Flutter-visible behavior change. Will be revisited before Kit 2.0 removes the Combine bridge.

Bumps #

  • iOS pod dependency: ZeroSettleKit ~> 1.3.4.
  • Plugin tracks Kit's 1.3.x line in lockstep.

1.3.3 #

Tracks ZeroSettleKit 1.3.3. No Flutter-visible API changes — the Kit's 1.3.3 work (OfferTipView and ZSOfferManager direct-init no longer require userId:) only affects native Swift call sites. Flutter already uses the canonical ZeroSettle.instance.offerManager(stripeCustomerId:) factory, so all 1.3.3 fixes are absorbed transparently.

  • iOS pod dependency: ZeroSettleKit ~> 1.3.3.

1.3.2 #

Tracks ZeroSettleKit 1.3.2. Pre-existing primitives that were missing in earlier 1.3.x Flutter releases are now bridged, plus the new Apple Pay availability + setup-behavior surface.

New purchase primitives #

  • purchase({productId, presentation?}) — unified purchase entry point. Routes web vs. StoreKit per jurisdiction. Returns a CheckoutTransaction.
  • purchaseViaStoreKit({productId}) — explicit native StoreKit 2 purchase. Returns a CheckoutTransaction populated from the StoreKit 2 Transaction (price/currency may be null).
  • CheckoutType enum for the optional presentation argument on purchase().

New state queries #

  • getCurrentUserId() → Future<String?> — observable identity state.
  • getIsBootstrapped() → Future<bool> — SDK readiness flag adopters can poll/listen for before calling user-scoped APIs.
  • recommendedAppAccountToken() → Future<String> — UUID derivation helper for non-UUID user IDs (Firebase, Privy, Auth0, etc.).

Pending claims (StoreKit ownership transfer UX) #

  • getPendingClaims() → Future<List<PendingClaim>> — read once.
  • pendingClaimsUpdates stream — emits whenever the SDK observes a StoreKit purchase that belongs to another ZeroSettle account on this device. Power your "transfer this purchase?" UX from this stream, then call transferStoreKitOwnershipToCurrentUser({productId}) when the user confirms.
  • New PendingClaim model.

Apple Pay surface (new in Kit 1.3.2) #

  • Configuration.applePaySetupBehavior — new optional configure() parameter. ApplePaySetupBehavior.presentBuiltInUI (default) opens system Wallet automatically when an Apple-Pay-only merchant has no Wallet card; ApplePaySetupBehavior.delegateToApp surfaces ZSApplePaySetupRequiredException so your app can handle the flow.
  • presentApplePaySetup() — opens system Wallet to add a card.
  • getIsApplePayOnly() → Future<bool> — true when the active merchant config is Apple-Pay-only.
  • getApplePayState() → Future<ApplePayAvailabilityState> — read the current .ready / .setupRequired / .unavailable state.
  • applePayStateUpdates stream — observe state transitions to drive your own banner / pre-flight UI.
  • 2 new exceptions: ZSApplePayUnavailableException, ZSApplePaySetupRequiredException.
  • CheckoutConfig.paymentMethods + isApplePayOnly getter on the remote config.

Bug fixes #

  • setBaseUrlOverride had no concrete MethodChannel override (regression introduced in 0.4.0). Fixed; any environment using baseUrlOverride (staging, internal/ngrok) now configures correctly.
  • MIME-type cleanups in test mocks for acceptSaveOffer / fetchUpgradeOfferConfig so facade round-trips don't fail on empty maps.

Bumps #

  • iOS pod dependency: ZeroSettleKit ~> 1.3.2.
  • Plugin tracks Kit's 1.3.x line in lockstep.

1.3.0 #

  • Adds identify() as the canonical entry point. Takes an Identity (sealed class with Identity.user, Identity.anonymous, Identity.deferred). Call once at launch (and again on sign-in/sign-out). Subsequent user-scoped calls read identity from internal state — no more passing userId: everywhere.
  • Adds 10 userId-less method overloads. restoreEntitlements(), fetchTransactionHistory(), acceptSaveOffer({productId}), presentCancelFlow({productId}), pauseSubscription({productId, pauseDurationDays}), resumeSubscription({productId}), cancelSubscription({productId, immediate}), presentUpgradeOffer({productId}), fetchUpgradeOfferConfig({productId}), trackMigrationConversion(). Use these after calling identify().
  • Deprecates the userId: parameter on every facade method, plus bootstrap(). They still compile and work through the 1.x line, but the parameter is annotated @Deprecated and will be removed in 2.0. Migrate by calling identify() once and dropping userId: from the rest.
  • Adds appleMerchantId, preloadCheckout, maxPreloadedWebViews to configure(). Configuration parity with iOS Kit 1.3.0.
  • Fixes pauseSubscription signature. The bridge now passes pauseDurationDays to ZeroSettleKit 1.3.0 (was pauseOptionId). Deprecated pauseOptionId parameter remains on the facade for source compatibility through 1.x.
  • Adds 5 new exception types mapped from ZeroSettleKit 1.3.0 errors: ZSInvalidPublishableKeyException, ZSCheckoutConfigExpiredException, ZSTransactionVerificationFailedException, ZSPurchasePendingException, ZSUserNotIdentifiedException.
  • Fixes CancelFlowOption.fromMap null-safety for triggersOffer / triggersPause (defaults to false when absent).
  • Bumps iOS pod dependency to ZeroSettleKit ~> 1.3.0.
  • See MIGRATING.md in the iOS Kit for the full 1.3.0 migration guide; the same renames and deprecations apply to the Flutter SDK Dart facade.

0.4.0 #

  • Aligns bridge with ZeroSettleKit 1.2.5.
  • Adds setCustomer({name, email}) and logout().
  • Adds transferStoreKitOwnershipToCurrentUser (replaces removed claimEntitlement).
  • Adds hasActiveEntitlement(productId), product(productId).
  • Maps ZeroSettleError.checkoutNotStarted to ZSCheckoutNotStartedException.
  • Surfaces previously-missing model fields:
    • Entitlement.storekitOriginalTransactionId, originalPurchaseDate
    • Product.subscriptionGroupId, billingInterval, freeTrialDuration, isTrialEligible
    • CheckoutTransaction.storekitStatus
  • Stubs removed APIs (openCustomerPortal, showManageSubscription, presentSaveTheSaleSheet) with not_implemented errors; Dart facade kept for source-compat.
  • Fixes bridge drift: ZeroSettleKit.Product → ZSProduct, Price.cents → Price.amountCents, Entitlement.status no longer optional.

0.3.4 #

  • Update to ZeroSettleKit 1.2.3

0.3.3 #

  • Maintenance release - no functional changes

0.3.2 #

  • Add ZSMigrateTipView widget for encouraging StoreKit users to migrate to web billing
  • Update to ZeroSettleKit 0.7.2

0.3.1 #

  • Breaking: Add required freeTrialDays parameter to bootstrap(), warmUpPaymentSheet(), preloadPaymentSheet(), and presentPaymentSheet() methods
  • Update to ZeroSettleKit 0.7.1+ with free trial support
  • Update podspec to automatically use latest 0.7.x releases

0.3.0 #

  • Add remoteConfig and detectedJurisdiction getters for jurisdiction-specific checkout behavior
  • Add support for smart subscription management via showManageSubscription()
  • Update to ZeroSettleKit 0.6.0+ API surface

0.2.0 #

  • Update models and APIs to match ZeroSettleKit iOS SDK
  • Add checkout events stream
  • Improve error handling

0.1.0 #

  • Initial release with core IAP functionality
  • Support for product catalog, payment sheets, and entitlements
  • iOS platform support via ZeroSettleKit
2
likes
140
points
125
downloads

Documentation

API reference

Publisher

verified publisherzerosettle.io

Weekly Downloads

ZeroSettle SDK for Flutter — Merchant of Record web checkout.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on zerosettle

Packages that implement zerosettle