Superwall

SuperwallOptions

A configuration class for customizing paywall appearance and behavior.

Only modify networkEnvironment if explicitly instructed by the Superwall team. Use .RELEASE (default) for production apps.

Use different SuperwallOptions configurations for debug and release builds to optimize logging, purchasing behavior, and Google Play settings for each environment.

Purpose

Configures paywall presentation, logging, Google Play purchase behavior, and other global SDK settings. Pass an instance in to Superwall.configure.

Signature

class SuperwallOptions {
    var paywalls: PaywallOptions = PaywallOptions()
    var shouldObservePurchases: Boolean = false
    var networkEnvironment: NetworkEnvironment = NetworkEnvironment.Release()
    var isExternalDataCollectionEnabled: Boolean = true
    var localeIdentifier: String? = null
    var isGameControllerEnabled: Boolean = false
    var passIdentifiersToPlayStore: Boolean = false
    var enableExperimentalDeviceVariables: Boolean = false
    var logging: Logging = Logging()
    var useMockReviews: Boolean = false
}
// Java
public class SuperwallOptions {
    public PaywallOptions paywalls = new PaywallOptions();
    public boolean shouldObservePurchases = false;
    public NetworkEnvironment networkEnvironment = new NetworkEnvironment.Release();
    public boolean isExternalDataCollectionEnabled = true;
    public @Nullable String localeIdentifier = null;
    public boolean isGameControllerEnabled = false;
    public boolean passIdentifiersToPlayStore = false;
    public boolean enableExperimentalDeviceVariables = false;
    public Logging logging = new Logging();
    public boolean useMockReviews = false;
}

Parameters

PropertyTypeDescription
paywallsPaywallOptionsControls paywall presentation, preload, and alert behavior.
shouldObservePurchasesBooleanSet to true to have Superwall observe Google Play purchases you make outside the SDK.
networkEnvironmentNetworkEnvironmentOverrides the API environment. Only change if instructed by Superwall.
isExternalDataCollectionEnabledBooleanAllows Superwall to send non-paywall analytics events to the backend. Defaults to true.
localeIdentifierString?Overrides the locale used for rule evaluation (e.g., "en_GB").
isGameControllerEnabledBooleanForwards game controller events to paywalls.
passIdentifiersToPlayStoreBooleanWhen true, Google Play receives the raw userId as obfuscatedExternalAccountId; otherwise Superwall sends a SHA-256 hash.
enableExperimentalDeviceVariablesBooleanEnables experimental device variables (subject to change).
loggingLoggingSets log level and scopes printed to Logcat.
useMockReviewsBooleanShows mock Google Play review dialogs for testing.

How passIdentifiersToPlayStore affects Google Play

Superwall always calls BillingFlowParams.Builder.setObfuscatedAccountId(Superwall.instance.externalAccountId) when launching a billing flow.

  • Default (false)externalAccountId is a SHA-256 hash of the userId. Google Play displays the hashed value as obfuscatedExternalAccountId, and the same hash is sent back to your servers.
  • Enabled (true) – Superwall forwards the exact appUserId you passed to identify(). This makes it easier to correlate Google Play purchases with your users, but the value must comply with Google's policy and must not contain PII.

Configure it as part of your application startup:

val options = SuperwallOptions().apply {
    passIdentifiersToPlayStore = true
    logging.level = LogLevel.info
}

Superwall.configure(
    application = this,
    apiKey = "pk_your_api_key",
    options = options
)

How is this guide?

Edit on GitHub