PaywallOptions

Options for configuring the appearance and behavior of paywalls.

Constructors

Link copied to clipboard
constructor()
constructor(definition: PaywallOptions.() -> Unit)

Types

Link copied to clipboard

Where a presented paywall is hosted. See presentationHost.

Link copied to clipboard

Defines the messaging of the alert presented to the user when restoring a transaction fails.

Link copied to clipboard

Defines the different types of views that can appear behind Apple's payment sheet during a transaction.

Properties

Link copied to clipboard

Automatically dismisses the paywall when a product is purchased or restored. Defaults to true.

Link copied to clipboard

Determines whether the paywall should use haptic feedback. Defaults to true.

Link copied to clipboard

A color resource used to tint the spinner shown while a purchase or restoration is in progress. Defaults to null, which keeps the system's default spinner color.

Link copied to clipboard

This will be invoked when reroute_back_button is enabled in Paywall settings. You can use this to react to back button presses with custom logic. Return true if the press has been consumed. Return false to fall back to SDK logic: the press is forwarded into the paywall as a back_button_input message, and the paywall either navigates its flow back one page or closes itself.

Link copied to clipboard

Hide shimmer optimistically.

Link copied to clipboard

A map of product name to product identifier that allows you to override products on all paywalls.

Link copied to clipboard

If preloading is enabled, you can control preloading per-device tier. This way you can control preloading on low-end and high-end devices granularly. Define only the tiers you want to specifically control, the rest will fall back to using the shouldPreload flag.

Link copied to clipboard

Experimental. Chooses how presented paywalls are hosted. Defaults to PresentationHost.ACTIVITY. This may change or be removed in a future release.

Link copied to clipboard

Defines the messaging of the alert presented to the user when restoring a transaction fails.

Link copied to clipboard

Pre-loads and caches trigger paywalls and products when you initialize the SDK via `Superwall/configure(apiKey:purchaseController:options:completion:)-52tke`. Defaults to true.

Link copied to clipboard

Shows an alert after a purchase fails. Defaults to true.

Link copied to clipboard

How long a presented paywall may take to finish loading before it's given up on.

Link copied to clipboard

The view that appears behind Apple's payment sheet during a transaction. Defaults to .spinner.

Link copied to clipboard

Has no effect. Defaults to false.