# Superwall: Subscription Infrastructure for iOS, Android, and Web

Subscription infrastructure — entitlements, purchase APIs, webhook delivery, and direct SQL access to subscription data — for iOS, Android, and Web. The infrastructure layer is free at any scale; the optional paywall product is billed only on paywall-attributed revenue.

## Pricing

- **Infrastructure: free at any scale, every plan.** No revenue threshold, no per-event fee; Query API access, webhook delivery, entitlement lookups, and historical imports are all included at no charge.
- **Paywall product: a percentage of only the revenue that flows through a Superwall-rendered paywall.** Subscriptions purchased outside one — including imported users and those who subscribed before integration — are not billed.

Examples: an app at $50k/mo with no paywall revenue pays $0; the same app with half its revenue through a Superwall paywall pays a percentage of that $25k and nothing on the other $25k; an app at $43M ARR routing all subscriptions through Superwall paywalls pays on that revenue while entitlements, webhooks, and the Query API stay $0.

## Scale

$1.5B+ annual subscription revenue across 10,000+ apps. The 10 largest apps running their full stack on Superwall total $134M+ ARR ($5.7M–$43.7M each). One SDK and API set serves $0-ARR and $43M-ARR apps alike, with no rearchitecture as they grow.

## Infrastructure capabilities

- **Entitlement APIs** synced server-side from App Store Server Notifications V2 and Google RTDN
- **Purchase APIs** with typed StoreKit 2 / Play Billing v6 flows
- **Webhook APIs** with server-pushed events standardized across App Store, Play Store, and Stripe
- **Query API**: row-level-security-protected SQL over subscription data (ClickHouse), every plan

Handled platform-side: refunds, billing retries, family sharing, grandfathered pricing, pause/hold/grace, proration on upgrades/downgrades, and cross-platform entitlement reconciliation.

## Migration

Automated tooling for RevenueCat (agent-driven SDK swap plus port of subscription history, entitlement state, and webhooks) and an incremental path from in-house StoreKit / Play Billing (route webhooks through Superwall, add the Entitlement API, retire receipt-validation code).

## Paywall product (optional, separately billable)

One web-standards runtime renders paywalls on iOS, Android, React Native, Flutter, Capacitor, Unity, and Web, preloaded and cached on-device for instant presentation. Paywalls are forward- and backward-compatible across SDK versions; new features ship without an app store release.

## Architecture

Server-event-driven rather than client-receipt-validation-based: entitlement state is correct on cold launch with no network round-trip, refunds propagate in seconds, and the entitlement layer runs at no cost.

## Docs

* Migrate from RevenueCat: https://superwall.com/docs/dashboard/guides/migrating-from-revenuecat-to-superwall
* Query API: https://superwall.com/docs/dashboard/guides/query-clickhouse
* Webhooks: https://superwall.com/docs/integrations/webhooks
* Pricing: https://superwall.com/pricing

# Advanced Configuration

When configuring the SDK you can pass in options that configure Superwall, the paywall presentation, and its appearance.

### Logging

Logging is enabled by default in the SDK and is controlled by two properties: `level` and `scopes`.

`level` determines the minimum log level to print to the console. There are five types of log level:

1. **debug**: Prints all logs from the SDK to the console. Useful for debugging your app if something isn't working as expected.
2. **info**: Prints errors, warnings, and useful information from the SDK to the console.
3. **warn**: Prints errors and warnings from the SDK to the console.
4. **error**: Only prints errors from the SDK to the console.
5. **none**: Turns off all logs.

The SDK defaults to `info`.

`scopes` defines the scope of logs to print to the console. For example, you might only care about logs relating to `paywallPresentation` and `paywallTransactions`. This defaults to `.all`. Check out [LogScope](https://sdk.superwall.me/documentation/superwallkit/logscope) for all possible cases.

You set these properties like this:

:::flutter
```dart
SuperwallOptions options = SuperwallOptions();
options.logging.level = LogLevel.warn;
options.logging.scopes = { LogScope.paywallPresentation, LogScope.paywallEvents };

Superwall.configure(
  "MY_API_KEY",
  options: options
);

// Or you can set:
Superwall.logging.logLevel = LogLevel.warn;
```
:::

### Preloading Paywalls

Paywalls are preloaded by default when the app is launched from a cold start. The paywalls that are preloaded are determined by the list of placements that result in a paywall for the user when [registered](/docs/sdk/quickstart/feature-gating). Preloading is smart, only preloading paywalls that belong to audiences that could be matched.

Paywalls are cached by default, which means after they load once, they don't need to be reloaded from the network unless you make a change to them on the dashboard. However, if you have a lot of paywalls, preloading may increase network usage of your app on first load of the paywalls and result in slower loading times overall.

> **Tip:** To make an onboarding or first-launch paywall load before the rest of your campaigns, prioritize the campaign from the dashboard with [Priority Placements](/docs/dashboard/dashboard-campaigns/campaigns-placements-prioritized). Use the SDK methods below when you need to disable automatic preloading or manually preload specific placements.

You can turn off preloading by setting `shouldPreload` to `false`:

:::flutter
```dart
SuperwallOptions options = SuperwallOptions();
options.paywalls.shouldPreload = false;

Superwall.configure(
  "MY_API_KEY",
  options: options
);
```
:::

Then, if you'd like to preload paywalls for specific placements you can use `preloadPaywalls(forPlacements:)`:

:::flutter
```dart
var placements = {"campaign_trigger"};
Superwall.shared.preloadPaywallsForPlacements(placements);
```
:::

If you'd like to preload all paywalls you can use `preloadAllPaywalls()`:

:::flutter
```dart
Superwall.shared.preloadAllPaywalls();
```
:::

Note: These methods will not reload any paywalls that have already been preloaded.

### Event Tracking Behavior

By default, Superwall allows the SDK to send event collection that supports paywall analytics, reporting, and targeting. Use the platform-specific options below when your app needs to control which SDK events are sent to Superwall.

:::flutter
Flutter currently uses `isExternalDataCollectionEnabled`. Setting it to `false` suppresses user-initiated tracking, trigger-fire events, and user-attribute updates while keeping internal Superwall event collection enabled.

```dart
SuperwallOptions options = SuperwallOptions();
options.isExternalDataCollectionEnabled = false;

Superwall.configure(
  "MY_API_KEY",
  options: options
);
```
:::

### Automatically Dismissing the Paywall

By default, Superwall automatically dismisses the paywall when a product is purchased or restored. You can disable this by setting `automaticallyDismiss` to `false`:

:::flutter
```dart
SuperwallOptions options = SuperwallOptions();
options.paywalls.automaticallyDismiss = false;

Superwall.configure(
  "MY_API_KEY",
  options: options
);
```
:::

To manually dismiss the paywall , call `Superwall.shared.dismiss()`.

### Custom Restore Failure Message

You can set the title, message and close button title for the alert that appears after a restoration failure:

:::flutter
```dart
SuperwallOptions options = SuperwallOptions();
options.paywalls.restoreFailed.title = "My Title";
options.paywalls.restoreFailed.message = "My message";
options.paywalls.restoreFailed.closeButtonTitle = "Close";

Superwall.configure(
  "MY_API_KEY",
  options: options
);
```
:::

### Haptic Feedback

On iOS, the paywall uses haptic feedback by default after a user purchases or restores a product, opens a URL from the paywall, or closes the paywall. To disable this, set the `isHapticFeedbackEnabled` `PaywallOption` to false:

:::flutter
```dart
SuperwallOptions options = SuperwallOptions();
options.paywalls.isHapticFeedbackEnabled = false;

Superwall.configure(
  "MY_API_KEY",
  options: options
);
```
:::

Note: Android does not use haptic feedback.

### Transaction Background View

During a transaction, we add a `UIActivityIndicator` behind the view to indicate a loading status. However, you can remove this by setting the `transactionBackgroundView` to `nil`:

:::flutter
```dart
SuperwallOptions options = SuperwallOptions();
options.paywalls.transactionBackgroundView = TransactionBackgroundView.none;

Superwall.configure(
  "MY_API_KEY",
  options: options
);
```
:::

### Purchase Failure Alert

When a purchase fails, we automatically present an alert with the error message. If you'd like to show your own alert after failure, set the `shouldShowPurchaseFailureAlert` `PaywallOption` to `false`:

:::flutter
```dart
SuperwallOptions options = SuperwallOptions();
options.paywalls.shouldShowPurchaseFailureAlert = false;

Superwall.configure(
  "MY_API_KEY",
  options: options
);
```
:::

### Web Purchase Confirmation Alert

When a user completes a purchase via web checkout (app2web flow), you can control whether to show a confirmation alert. By default, this is set to `false` to prevent duplicate alerts. Set `shouldShowWebPurchaseConfirmationAlert` to `true` if you want to show the native confirmation alert:

:::flutter
```dart
SuperwallOptions options = SuperwallOptions();
options.paywalls.shouldShowWebPurchaseConfirmationAlert = true;

Superwall.configure(
  "MY_API_KEY",
  options: options
);
```
:::

### Locale Identifier

When evaluating rules, the device locale identifier is set to `autoupdatingCurrent`. However, you can override this if you want to test a specific locale:

:::flutter
```dart
SuperwallOptions options = SuperwallOptions();
options.localeIdentifier = "en_GB";

Superwall.configure(
  "MY_API_KEY",
  options: options
);

// Or you can set:
Superwall.shared.setLocaleIdentifier("en_GB");

// To revert to default:
Superwall.shared.setLocaleIdentifier(null);
```
:::

For a list of locales that are available on iOS, take a look at [this list](https://gist.github.com/jacobbubu/1836273). You can also preview your paywall in different locales using [In-App Previews](/docs/sdk/quickstart/in-app-paywall-previews).

### Game Controller

If you're using a game controller, you can enable this in `SuperwallOptions` too. Check out our [Game Controller Support](/docs/sdk/guides/advanced/game-controller-support) article.

Take a look at [SuperwallOptions](https://sdk.superwall.me/documentation/superwallkit/superwalloptions) in our SDK reference for more info.