zerosettle library

Classes

CancelFlowAnswer
A single answer in the cancel flow questionnaire.
CancelFlowAnswerPayload
A single answer within a cancel flow response.
CancelFlowCancelled
The user completed the flow and chose to cancel.
CancelFlowConfig
Cancel flow configuration returned by the backend.
CancelFlowDismissed
The user dismissed the sheet without completing the flow.
CancelFlowOffer
Save offer configuration shown to retain the user.
CancelFlowOption
An answer option for a single-select question.
CancelFlowPauseConfig
Pause configuration within the cancel flow.
CancelFlowPaused
The user chose to pause their subscription.
CancelFlowPauseOption
A single pause duration option in the cancel flow.
CancelFlowQuestion
A single question in the cancel flow questionnaire.
CancelFlowResponse
The complete response submitted at the end of a cancel flow.
CancelFlowResponsePayload
Payload submitted to the backend after a cancel flow completes.
CancelFlowResult
The outcome of a cancel flow presentation.
CancelFlowRetained
The user accepted the save offer and was retained.
CancelFlowSaveOfferResult
Result of accepting a save offer.
CheckoutConfig
Configuration for the checkout UI behavior.
CheckoutFailure
Reason a web checkout failed. Mirrors CheckoutFailure from ZeroSettleKit, which is a Swift enum with associated values:
CheckoutTransaction
Represents a completed or pending purchase transaction.
Entitlement
Represents an active entitlement from either a StoreKit or web checkout purchase.
Identity
Identity hint for ZeroSettle.identify. Mirrors the native Identity enum.
IdentityAnonymous
IdentityDeferred
IdentityUser
JurisdictionCheckoutConfig
Per-jurisdiction checkout configuration override.
MigrationManager
Handle for ZeroSettleKit's ZSMigrationManager. Adopters obtain a handle via ZeroSettle.migrationManager and use it to drive a fully custom migration UI.
MigrationManagerState
Coherent snapshot of ZSMigrationManager's 5 published properties. Emitted on every state-property change via the manager's stream.
MigrationOfferData
Server-driven data for an eligible migration offer. Mirrors MigrationOffer.OfferData from ZeroSettleKit.
MigrationPrompt
Data for a migration campaign prompt.
OfferData
Server-resolved offer payload. Mirrors Offer.OfferData.
OfferDisplay
Server-configurable display copy for every tip-card state. Empty strings mean "use SDK default". Mirrors Offer.Display.
OfferManager
Handle for ZeroSettleKit's ZSOfferManager. Adopters obtain a handle via ZeroSettle.offerManager and use it to drive a fully custom offer UI for both migration and upgrade flows.
OfferManagerState
Coherent snapshot of ZSOfferManager's 5 published properties. Emitted on every state-property change via the manager's stream.
OfferPerProductOffer
Per-product offer override. Mirrors Offer.PerProductOffer.
OfferTipView
Embeds the native ZeroSettle offer tip inside a Flutter app: SwiftUI OfferTipView on iOS (from ZeroSettleKit), Compose ZeroSettleOfferTip on Android (from ZeroSettle-Android :ui).
PendingAction
A backend-driven prompt for the user, surfaced via ZeroSettle.pendingActionsUpdates. Android-only data; the iOS bridge always reports an empty list.
PendingActionManualPlayCancel
Actionable banner shown when the backend's programmatic Play cancel failed and the user must cancel manually via deepLink.
PendingActionMigrationCompletedInfo
One-time info banner shown after a successful Play→web migration.
PendingClaim
A purchase that the current user could claim from a different ZeroSettle account.
Price
A price with currency information. Mirrors the Swift Price struct in ZeroSettleKit.
Product
A product available for web checkout via ZeroSettle.
ProductCatalog
The result of fetching the product catalog.
Promotion
An active promotion for a product.
ReconcileResult
The outcome of ZeroSettle.reconcile. Mirrors the native ReconcileResult.
RemoteConfig
Remote configuration from the ZeroSettle backend.
TrialFacts
Trial billing facts for a subscription product.
UpgradeOfferConfig
Upgrade offer configuration returned by the backend.
UpgradeOfferCurrentProduct
The user's current subscription product within an upgrade offer.
UpgradeOfferDeclined
The user explicitly declined the upgrade offer.
UpgradeOfferDismissed
The user dismissed the sheet without completing the flow.
UpgradeOfferDisplay
Display copy for the upgrade offer sheet.
UpgradeOfferProration
Proration details for the upgrade transition.
UpgradeOfferResponsePayload
Payload submitted to the backend after an upgrade offer completes.
UpgradeOfferResult
The outcome of an upgrade offer presentation.
UpgradeOfferTargetProduct
The target subscription product the user can upgrade to.
UpgradeOfferUpgraded
The user accepted the upgrade offer and was upgraded.
UserOfferAppleSubscription
Current Apple subscription state for the user's active StoreKit product.
UserOfferData
The server-resolved offer payload for a single user.
UserOfferDisplay
Server-configurable display copy for all tip-card states.
UserOfferProration
Proration details for a web→web or storeKit→web subscription upgrade.
UserOfferResponse
Top-level response from fetchUserOffer().
UserOfferSubscription
Summary of the user's current subscription state.
ZeroSettle
Main entry point for the ZeroSettle Flutter SDK.
ZeroSettleEvent
A discriminated event emitted by the ZeroSettle native SDK event stream.
ZeroSettlePendingActionBanner
A zero-config mount point for the native ZeroSettle pending-action banner.
ZSEventEntitlementsRefreshed
Emitted when the SDK's entitlement cache is refreshed from the backend.
ZSEventMigrationCompleted
Emitted when a Switch & Save migration has completed successfully.
ZSEventOfferAccepted
Emitted when the user accepts an offer tip.
ZSEventOfferDismissed
Emitted when the user dismisses an offer tip without acting on it.
ZSEventOfferEvaluationFailed
Emitted when the SDK fails to evaluate an offer for the current user.
ZSEventOfferShown
Emitted when an offer tip (migration or upgrade) is presented to the user.
ZSEventPendingActionShown
Emitted when the SDK surfaces a pending-action banner to the user.
ZSEventPurchaseFailed
Emitted when a purchase attempt fails after exhausting retries.
ZSEventPurchaseSucceeded
Emitted when a purchase completes successfully via any channel.
ZSEventSyncFailed
Emitted when a background store-transaction sync fails.
ZSEventUnknown
Fallback variant for any event type not recognised by this SDK version.

Enums

ApplePayAvailabilityState
Tri-state Apple Pay availability on the device, observed from the iOS Kit's ApplePayAvailability service.
ApplePaySetupBehavior
How the SDK reacts when the merchant is Apple-Pay-only and the device's Wallet has no supported card configured (ApplePayAvailabilityState.setupRequired).
CancelFlowOutcome
The outcome of a cancel flow for analytics/reporting.
CheckoutType
The type of checkout UI to present.
EntitlementSource
The origin of a purchase/entitlement.
FunnelEventType
Funnel analytics event types for paywall and checkout tracking.
Jurisdiction
Geographic jurisdiction for checkout configuration.
MigrationOfferState
Lifecycle state of the migration offer flow. Mirrors MigrationOffer.State from ZeroSettleKit.
OfferCheckoutPresentation
How the tip view presents checkout when the CTA is tapped. Mirrors Offer.CheckoutPresentation. When null, the SDK uses the global checkoutType setting.
OfferFlowType
The type of offer flow, determined by the server. Mirrors Offer.FlowType.
OfferState
Lifecycle state of the offer flow. Mirrors Offer.State.
OfferUpgradeType
The upgrade-path type (only relevant for upgrade flows). Mirrors Offer.UpgradeType.
PromotionType
The type of promotional discount.
TransactionStatus
The status of a transaction.
UserOfferActionType
The action the offer instructs the SDK to take for the user.
UserOfferSourceStorefront
The storefront the user's current active subscription originates from.
ZSProductType
Product type for in-app purchases.
ZSSaveTheSaleResult
The user's choice from the save-the-sale retention sheet.
ZSTrialMode
The trial billing mode for a subscription product.

Typedefs

MigrationTipView = OfferTipView
Deprecated alias for OfferTipView — the iOS SDK renamed MigrationTipView to OfferTipView once the tip became the unified surface for migration, upgrade, and web-to-web offers.
ZSException = ZeroSettleException
Backward-compatible typedef. Use ZeroSettleException instead.
ZSMigrateTipView = OfferTipView
Deprecated alias for OfferTipView.
ZSProduct = Product
Backward-compatible typedef. Use Product instead.
ZSTransaction = CheckoutTransaction
Backward-compatible typedef. Use CheckoutTransaction instead.

Exceptions / Errors

ZeroSettleException
Base exception type for the ZeroSettle SDK.
ZSApiException
An API or network error occurred.
ZSApplePaySetupRequiredException
The merchant is Apple-Pay-only and the device supports Apple Pay but the Wallet has no supported cards. The customer was NOT charged. Call ZeroSettle.presentApplePaySetup to launch the system Wallet setup flow, then retry the purchase.
ZSApplePayUnavailableException
The merchant is Apple-Pay-only and the device cannot do Apple Pay at all (older hardware, simulator, MDM/parental restriction). The customer was NOT charged. The hosting app should show its own UX or skip the purchase path.
ZSCancelledException
The user cancelled the checkout flow.
ZSCheckoutConfigExpiredException
The deferred-mode checkout config expired (the server-side PENDING transaction's checkout_config_expires_at has passed). Re-initiate checkout to obtain a fresh session rather than retrying finalize.
ZSCheckoutFailedException
The checkout flow failed.
ZSCheckoutNotStartedException
Checkout could not start (e.g. backend failed to create the payment intent). Distinct from terminal errors that occur after checkout is in flight.
ZSInvalidLinkTokenException
The link token passed to ZeroSettle.reconcile is invalid, expired or already used. Have your server mint a new one.
ZSInvalidPublishableKeyException
The publishable key format is invalid. Check your ZeroSettle dashboard.
ZSNotConfiguredException
The SDK has not been configured. Call ZeroSettle.configure first.
ZSProductNotFoundException
No product found with the given identifier.
ZSPurchasePendingException
The purchase is pending approval (e.g., StoreKit Ask to Buy). The user has not been charged; the SDK will surface a follow-up event when the purchase resolves.
ZSRateLimitedException
Too many requests. Retry after retryAfter when the server provided one, otherwise back off and retry later.
ZSReconcileRefusedException
ZeroSettle.reconcile was refused: the two ids could not be merged (for example both already hold conflicting purchases). Nothing was moved and the link token is spent; have your server mint a new one before retrying.
ZSTransactionVerificationFailedException
Transaction verification failed after checkout (e.g., signature or JWS validation rejected by the backend or by Apple).
ZSUserIdRequiredException
A userId is required for this product type.
ZSUserNotIdentifiedException
A user-scoped method was called before ZeroSettle.identify. Call ZeroSettle.identify with Identity.user (or Identity.anonymous) at app launch (after ZeroSettle.configure) before invoking user-scoped APIs like ZeroSettle.restoreEntitlements.
ZSWebCheckoutDisabledException
Web checkout is disabled for the user's jurisdiction.