Overview
The Helium SDK fires various events related to paywall display and purchase actions. Visit the SDK docs to see how to listen for and handle these events.Event Types
- iOS
- React Native
- Flutter
Listening to Events
See the SDK quickstarts for examples on how to listen for events, either through a Helium delegate or by passing in handlers during paywall presentation.Available Events
The following definitions are all provided in Swift, but the same events and values are available for every SDK.
Lifecycle Events
PaywallOpenEvent
Fires when a paywall is displayed.PaywallCloseEvent
Fires when a paywall is closed (removed from view hierarchy). This might be due to a user dismissal, successful purchase, or programmatic hide.PaywallDismissedEvent
Fires when paywall is explicitly dismissed by user.PaywallOpenFailedEvent
Fires if a paywall fails to open and fallback fails to show. (This should be extremely rare.)PaywallSkippedEvent
Fires if a paywall display is skipped due to a targeting or workflow configuration.PaywallButtonPressedEvent
Fires when a non-purchase button is pressed.PaywallWebViewRenderedEvent
Fires when the paywall content has finished rendering.Purchase Events
ProductSelectedEvent
Fires when a user selects a product on the paywall.PurchasePressedEvent
Fires when a purchase is initiated.PurchaseSucceededEvent
Fires when a purchase is successfully completed.PurchaseCancelledEvent
Fires when the purchase process is cancelled by the user.PurchaseFailedEvent
Fires when the process fails for any reason.PurchaseRestoredEvent
Fires when a previous purchase is successfully restored.PurchaseRestoreFailedEvent
Fires when an attempt to restore purchases is not successful.PurchasePendingEvent
Fires when when purchase is in a pending state (e.g. waiting for parental approval).System Events
InitializeStartEvent
Fires when SDK initialization is started.PaywallsDownloadSuccessEvent
Fires when Helium paywalls downloaded and initialized successfully.PaywallsDownloadErrorEvent
Fires when paywalls download failed.Legacy Events
The following section documents the legacy event system from SDK versions lower than 3.x. For new implementations, use the event system described above.
Legacy Event Handling
The legacy system uses theonHeliumPaywallEvent method with an enum-based approach: