# 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

# Interactive Paywall Preview

The interactive paywall preview shows how your paywall looks on certain iOS devices, for different configurations:

> **Warning:** The legacy editor is deprecated. Please visit the docs covering our new
> [editor](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-overview).

![1746](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/4.png)

The top bar allows you to change the localization of the paywall and the device that it's displayed on:

![](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/5.png)

As you mouse-over the paywall, you'll see blue boxes appear highlighting the elements of the paywall that are editable. Clicking on one of these will bring up an editor to the right:

![](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/6.png)

This is where you define what the end user sees for the selected element. It contains fields that are relevant to the type of element that's selected. For example, text can be edited in a textfield, and images and videos can be replaced.

Above this, you'll see two buttons: **Default** and **Free Trial**:

![](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/7.png)

You can click these to toggle between the free trial and default (no free trial) behaviour of the selected element. This also toggles the device preview. When the SDK detects a free trial in any product and the user hasn't already used a free trial within that product's subscription group, it will use the content supplied in the free trial tab. Otherwise it will use the content in the default tab. The free trial tab automatically inherits from the default tab.

### Adding Variables

You can show product, user, or device data within text elements by adding a **Variable**. This uses a language called [Liquid](https://shopify.github.io/liquid/basics/introduction/) to substitute in data at runtime.

Click the **+ Add Variable** button to choose a variable:

![](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/8.png)

This opens a navigation menu from which you can select the data you want to display, along with a preview of what that data looks like:

![](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/9.png)

![](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/10.png)

Clicking on a variable row will insert it inside your textfield with double curly brackets, which tells the device to replace it with real data:

![](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/a447c2e-Screenshot_2022-11-29_at_15.03.06.png)

The following objects can be referenced and templated within your paywalls:

| Object    | Description                                                                                                                           | Example                                                                                                            | User Sees                                                                                  |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| primary   | Product information relating to the *primary product* defined in the *Product section*                                                | `{{primary.trialPeriodDays}`} days free then only `{{primary.price}}` per `{{primary.period}}        `             | 7 days free then only $89.99 per year                                                      |
| secondary | Product information relating to the *secondary product* defined in the *Product section*                                              | Subscribe for only `{{secondary.price}}` per `{{secondary.period}}`                                                | Subscribe for only $4.99 per month                                                         |
| tertiary  | Product information relating to the *tertiary product* defined in the *Product section*                                               | That's only `{{tertiary.weeklyPrice}}` per week!                                                                   | That's only $2.49 per week!                                                                |
| user      | User attributes your SDK implementation sets on the user. See [Setting User Attributes](/docs/sdk/quickstart/setting-user-properties) | Hey `{{user.firstName}}`! FitnessAI offers tons of `{{user.fitnessGoal}}` workouts to help you reach your goals :) | Hey Sam! FitnessAI offers tons of calorie burning workouts to help you reach your goals :) |
| params    | Parameters defined when triggering a paywall. See [Showing Paywalls](/docs/sdk/quickstart/feature-gating).                            | Oh no, you lost! The secret word was `{{params.gameAnswer}}`. Start a free trial to play again!                    | Oh no, you lost! The secret word was MONEY. Start a free trial to play again!              |
| device    | Device attributes automatically created on device.                                                                                    | Compatible with your `{{ device.deviceModel }`}                                                                    | Compatible with your iPhone 14 Pro                                                         |

You can do complex math on these variables using liquid. [Take a look at their documentation](https://shopify.github.io/liquid) for more on how to do that.

Additionally, you can use the following device properties: `device.minutesSince_X`, `device.hoursSince_X`, `device.daysSince_X`, `device.monthsSince_X`, and `device.yearsSince_X`, where X is the name of an event that you've [registered](/docs/sdk/quickstart/feature-gating) or a [Superwall event](/docs/sdk/guides/3rd-party-analytics/tracking-analytics). This gives you the days etc since the last occurrence of the event that you specify, excluding the event that triggered the paywall. For example, a paywall presented via an `app_open` event and the text It has been `{{ device.daysSince_app_open}}` since you last opened the app will show `{{ It has been 2 days since you last opened the app }}`.

### AI Powered Suggestions

When you edit a textfield, the AI Powered Suggestions section will offer alternative suggestions for your text using OpenAI's gpt3:

![](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/d0bbfb5-Screenshot_2023-06-14_at_18.25.25.png)

### Click Behavior

You can set the click behavior of an element by using the **Click Behavior** dropdown:

![](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/db7c993-Screenshot_2022-11-29_at_16.40.53.png)

You choose from the following types of click behavior:

| Click Behavior      | Functionality                                                                                                                                                                                                                                                  |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Do nothing          | This won't do anything if the user taps on it.                                                                                                                                                                                                                 |
| Open deep link      | This will open a deep link. After selecting this you can specify the link to use. We recommend sending deep links to the SDK: [Deep Links & In-App Previews](/docs/sdk/quickstart/in-app-paywall-previews).                                                    |
| Open URL            | This will open a URL from within the paywall.                                                                                                                                                                                                                  |
| Open URL externally | This will open the provided URL in the user's browser.                                                                                                                                                                                                         |
| Close the paywall   | Closes the paywall.                                                                                                                                                                                                                                            |
| Restore             | Restores purchases via the restorePurchases(completion:) [delegate method](/docs/sdk/quickstart/configure#conforming-to-the-delegate).                                                                                                                         |
| Custom action       | Sends the custom action name you provide to the SDK's delegate method handleCustomPaywallAction(withName:). You can use this to perform custom logic from your app as discussed in [Custom Paywall Actions](/docs/sdk/guides/advanced/custom-paywall-actions). |
| Purchase primary    | Initiates the delegate method purchase(product:) with your primary product identifier.                                                                                                                                                                         |
| Purchase secondary  | Initiates the delegate method purchase(product:) with your secondary product identifier.                                                                                                                                                                       |
| Purchase tertiary   | Initiates the delegate method purchase(product:) with your tertiary product identifier.                                                                                                                                                                        |

### Customizing design

You can customize the layout, typography, layer, size, margin, padding, corners, effects and background image using the fields below the click behavior:

![](https://2a2314a4-superwall-docs.staffbar.workers.dev/docs/images/ad94d77-Screenshot_2022-11-30_at_11.43.34.png)