# SuperwallOptions

Configuration options for customizing Superwall SDK behavior.

Purpose [#purpose]

Configures various aspects of the Superwall SDK including paywall behavior, logging, and network settings.

Signature [#signature]

```dart
class SuperwallOptions {
  PaywallOptions paywalls = PaywallOptions();
  NetworkEnvironment networkEnvironment = NetworkEnvironment.release;
  bool isExternalDataCollectionEnabled = true;
  String? localeIdentifier;
  bool isGameControllerEnabled = false;
  Logging logging = Logging();
  bool passIdentifiersToPlayStore = false;
  TestModeBehavior testModeBehavior = TestModeBehavior.automatic;
  bool shouldObservePurchases = false;
  bool shouldBypassAppTransactionCheck = false; // iOS only
  int maxConfigRetryCount = 6; // iOS only
  bool useMockReviews = false; // Android only
}
```

Parameters [#parameters]

<TypeTable
  type="{
  paywalls: {
    type: &#x22;PaywallOptions&#x22;,
    typeDescriptionLink: &#x22;/flutter/sdk-reference/PaywallOptions&#x22;,
    description: &#x22;Configuration for paywall presentation behavior.&#x22;,
    required: true,
  },
  networkEnvironment: {
    type: &#x22;NetworkEnvironment&#x22;,
    description: &#x22;Network environment for API calls (release/releaseCandidate/developer). Only change when instructed by Superwall.&#x22;,
    required: true,
  },
  isExternalDataCollectionEnabled: {
    type: &#x22;bool&#x22;,
    description: &#x22;Enables external analytics collection.&#x22;,
    default: &#x22;true&#x22;,
  },
  localeIdentifier: {
    type: &#x22;String?&#x22;,
    description: &#x22;Override locale for paywall localization.&#x22;,
    default: &#x22;device locale&#x22;,
  },
  isGameControllerEnabled: {
    type: &#x22;bool&#x22;,
    description: &#x22;Enables game controller support.&#x22;,
    default: &#x22;false&#x22;,
  },
  logging: {
    type: &#x22;Logging&#x22;,
    description: &#x22;Configuration for SDK logging levels and behavior.&#x22;,
    required: true,
  },
  passIdentifiersToPlayStore: {
    type: &#x22;bool&#x22;,
    description: &#x22;When `true`, Android builds send the plain `appUserId` to Google Play as `obfuscatedExternalAccountId`.&#x22;,
    default: &#x22;false&#x22;,
  },
  testModeBehavior: {
    type: &#x22;TestModeBehavior&#x22;,
    description: &#x22;Controls when the SDK enters test mode. Options: `automatic`, `whenEnabledForUser`, `never`, `always`.&#x22;,
    default: &#x22;TestModeBehavior.automatic&#x22;,
  },
  shouldObservePurchases: {
    type: &#x22;bool&#x22;,
    description: &#x22;When `true`, Superwall observes StoreKit/Play Store transactions made outside of Superwall and reports them.&#x22;,
    default: &#x22;false&#x22;,
  },
  shouldBypassAppTransactionCheck: {
    type: &#x22;bool&#x22;,
    description: &#x22;Disables the app transaction check on SDK launch. iOS only.&#x22;,
    default: &#x22;false&#x22;,
  },
  maxConfigRetryCount: {
    type: &#x22;int&#x22;,
    description: &#x22;Number of times the SDK will attempt to get the Superwall configuration after a network failure before it times out. iOS only.&#x22;,
    default: &#x22;6&#x22;,
  },
  useMockReviews: {
    type: &#x22;bool&#x22;,
    description: &#x22;Enables mock review functionality. Android only.&#x22;,
    default: &#x22;false&#x22;,
  },
}"
/>

Android-only: `passIdentifiersToPlayStore` [#android-only-passidentifierstoplaystore]

Flutter apps can target both iOS and Android. Google Play always consumes the identifier you send through `BillingFlowParams.Builder.setObfuscatedAccountId`, which the SDK sources from `Superwall.instance.externalAccountId`.

* When `passIdentifiersToPlayStore&#x60; is &#x2A;*`false`** (default) we SHA-256 hash your `userId` before sending it. Play Console and the Superwall backend will show the hashed value.
* When it is &#x2A;*`true`**, we pass the exact `appUserId` you supplied to `Superwall.shared.identify`. This only changes behavior on Android—the flag is ignored on iOS builds.

Set the option at configuration time when you specifically need the un-hashed identifier:

```dart
final options = SuperwallOptions()
  ..passIdentifiersToPlayStore = true;

await Superwall.configure(
  apiKey,
  options: options,
);
```

Make sure the identifier complies with [Google's policy](https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setObfuscatedAccountId) and never contains personally identifiable information.

Usage [#usage]

Basic options:

```dart
final options = SuperwallOptions()
  ..paywalls = PaywallOptions()
  ..logging = (Logging()..level = LogLevel.debug);

await Superwall.configure(
  'pk_your_api_key',
  options: options,
);
```

Production configuration:

```dart
final productionOptions = SuperwallOptions()
  ..paywalls = (PaywallOptions()
    ..shouldPreload = true
    ..automaticallyDismiss = true)
  ..networkEnvironment = NetworkEnvironment.release
  ..isExternalDataCollectionEnabled = true
  ..logging = (Logging()..level = LogLevel.warn);
```

Development configuration (with Play Store IDs on Android):

```dart
final developmentOptions = SuperwallOptions()
  ..paywalls = (PaywallOptions()
    ..shouldPreload = false
    ..automaticallyDismiss = false)
  ..networkEnvironment = NetworkEnvironment.developer
  ..logging = (Logging()
    ..level = LogLevel.debug
    ..scopes = {LogScope.all})
  ..passIdentifiersToPlayStore = true; // Android only
```

Custom locale:

```dart
final localizedOptions = SuperwallOptions()
  ..localeIdentifier = 'es_ES' // Spanish (Spain)
  ..paywalls = (PaywallOptions()..shouldPreload = true);
```

Related [#related]

* [`PaywallOptions`](/docs/flutter/sdk-reference/PaywallOptions)