Skip to main content

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

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 the onHeliumPaywallEvent method with an enum-based approach:

Initialization Events

Initialize Start

Triggered when the Helium SDK initialization process begins.

User Interaction Events

CTA Pressed

Triggered when a user presses a Call-To-Action (CTA) button on the paywall.

Offer Selected

Triggered when a user selects a specific offer or product.

Subscription Pressed

Triggered when a user presses the subscribe button for a specific product.

Subscription Status Events

Subscription Cancelled

Triggered when a subscription process is cancelled by the user.

Subscription Succeeded

Triggered when a subscription is successfully completed.

Subscription Failed

Triggered when the subscription process fails for any reason.

Subscription Restored

Triggered when a previous subscription is successfully restored.

Subscription Restore Failed

Triggered when an attempt to restore purchases fails.

Subscription Pending

Triggered when a subscription is in a pending state (e.g., waiting for approval).

Paywall Lifecycle Events

Paywall Open

Triggered when a paywall is successfully opened and displayed to the user. View type maps to:

Paywall Open Failed

Triggered when there’s an error opening or displaying the paywall.

Paywall Close

Triggered when the paywall is closed programmatically.

Paywall Dismissed

Triggered when the user dismisses the paywall.

Paywall Skipped

Triggered when a paywall open gets skipped for a trigger, due to a targeting or workflow configuration.

Paywall WebView Rendered

Triggered when a WebView-based paywall has been successfully rendered.

Configuration Events

Paywalls Download Success

Triggered when paywall configurations are successfully downloaded.

Paywalls Download Error

Triggered when there’s an error downloading paywall configurations.