# 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

# Superwall CLI

Set up the SDK, manage products, campaigns, and paywalls, query your analytics data, and call the API from your terminal or coding agent using the Superwall CLI.

The [Superwall CLI](https://github.com/superwall/cli) brings your whole Superwall account to the terminal: set up the SDK in your app, manage products, campaigns, and paywalls, run SQL against your analytics data, and call the Superwall and App Store Connect APIs. It's built for humans and coding agents alike, so everything it can do, your agent can do too.

> **Note:** The CLI is also what powers the [Superwall Skill](/docs/dashboard/guides/superwall-skill). Installing the skill teaches your coding agent to use these commands on your behalf, so you rarely need to memorize them. This page is the full reference for when you're driving the terminal yourself, or want to know exactly what your agent can do.

## Installation

Install the CLI globally with npm, then log in:

```bash
npm install --global superwall
superwall login
```

You can also run it without installing via `npx superwall`. The package installs two commands that behave identically: `superwall` and the shorter `sw`.

The CLI tells you when a new version is available. Update any time with:

```bash
superwall upgrade
```

## Authentication

`superwall login` opens your browser once, and every command shares that session. The session is stored in `~/.superwall`.

```bash
superwall login     # opens the browser
superwall whoami    # shows the logged-in account
superwall logout    # ends the session
```

![Running superwall login in the terminal. The CLI shows a device code, waits for browser approval, then confirms the logged-in account and checks the agent skills.](https://superwall.com/docs/images/cli_prompt_for_auth.png)

Approve the login on the page that opens, and you're done. The terminal picks it up automatically:

![The auth.superwall.com confirmation page after approving the login, telling you the device is connected and the page can be closed.](https://superwall.com/docs/images/cli_confirmation.jpg)

In CI or other headless environments, log in with an API key instead of a browser:

```bash
superwall login --api-key <key>
```

If your account belongs to more than one organization, pick one with `superwall orgs use`. Otherwise, the CLI asks the first time it matters.

> **Note:** Logging in also installs the [Superwall agent skills](/docs/dashboard/guides/superwall-skill) into your coding agents and keeps them updated. See [Install agent skills](#install-agent-skills) below.

## Set up your app

The CLI's workflow commands handle SDK setup end to end:

```bash
npx superwall integrate   # set up Superwall in your app from scratch
superwall migrate         # switch from RevenueCat, Adapty, or Qonversion
superwall review          # audit an existing setup; add --fix to repair issues
superwall doctor          # quick health check
```

`integrate` is the fastest way to get started, and it works even before you have a Superwall account: run it in your project directory and it walks you through signing up right from the terminal. It works out what kind of app it's looking at, connects it to your Superwall account, and then runs the coding agent already on your machine (Claude Code or Codex, headless) to install and configure the SDK. From there it walks you through the rest: products, campaigns, placements, paywalls, and verifying everything on a real device.

`migrate` does the same for apps moving off RevenueCat, Adapty, or Qonversion, and `review` audits an existing integration, with `--fix` applying verified, safe fixes. Here's the end of a `review` run against a real iOS app: findings ranked by severity, proposed fixes written to a plan file, and nothing modified without your say-so:

![The end of a superwall review report on an iOS app, summarizing verified strengths, genuine findings, and a plan file with proposed fixes. No files were modified.](https://superwall.com/docs/images/cli_improvements_report_iOS_example.jpg)

### Drive the agent yourself

The CLI normally runs its workflows through a headless Claude Code or Codex on your machine. Add `--skill` to `integrate`, `migrate`, or `review` and instead of running anything, the CLI prints the exact instructions it would have given that agent: the bundled playbook for the task, composed for your project's framework, so an Expo project gets Expo instructions and never sees Swift ones.

```bash
superwall integrate --skill   # prints the playbook, runs nothing
```

Reach for this when:

* **You use a different agent.** The CLI only drives Claude Code and Codex headlessly. Paste the playbook into Cursor, Gemini CLI, or any other agent and it can follow the same guided workflow there.
* **You want to stay in the loop.** A headless run works autonomously and reports back. Running the playbook in your own agent session lets you watch every step, approve each change, and steer as it goes.
* **You want to read it first.** Review exactly what the agent will be told to do before anything touches your codebase.

## Manage your account

Everything in the dashboard, from the terminal:

```bash
superwall apps list
superwall products create pro_monthly --price 9.99 --period month
superwall products storekit               # generate a local .storekit file
superwall entitlements create pro
superwall campaigns create "Onboarding upsell" onboarding_complete
superwall paywalls list
superwall bootstrap                       # the whole account tree at a glance
```

| Command        | Actions                       | Notes                                                                                                                                                       |
| -------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bootstrap`    |                               | Prints the complete account tree: orgs, projects, apps, campaigns, placements, and products                                                                 |
| `apps`         | `list`, `create`, `use`       | Projects and platform apps; `create` takes `--platform` and `--bundle`                                                                                      |
| `products`     | `list`, `create`, `storekit`  | `create` takes `--price`, `--currency`, `--period`, `--period-count`, `--trial-days`, `--entitlement`; `storekit` writes a local `.storekit` file (`--out`) |
| `entitlements` | `list`, `create`              |                                                                                                                                                             |
| `campaigns`    | `list`, `create`, `placement` | `create` takes a name and a placement name                                                                                                                  |
| `paywalls`     | `list`                        |                                                                                                                                                             |
| `orgs`         | `list`, `use`                 | Only needed if you belong to multiple organizations                                                                                                         |

`list` is the default action, so `superwall products` means `superwall products list`. Add `--json` for machine-readable output, and `--project <id>` or `--app <id>` to scope when you have more than one. Run `superwall <command> --help` for every action and flag.

## Query your analytics data

Run SQL directly against your organization's ClickHouse analytics data:

```bash
superwall query "SHOW TABLES FROM sw"
superwall query "SELECT count() FROM sw.events_rep"
superwall query --file mrr.sql       # runs a saved .sql file
cat query.sql | superwall query      # or pipe SQL on stdin
```

Use it for anything you'd build on raw data: ad hoc analysis, custom dashboards, scheduled reports, agent workflows. `--json` returns ClickHouse's native JSON envelope (leave any `FORMAT` clause out of the SQL; the CLI requests JSON for you). Your session needs data read access.

See [Query with ClickHouse](/docs/dashboard/guides/query-clickhouse) for the available tables and schema.

## Call the API

Make raw, authenticated requests to any Superwall API endpoint:

```bash
superwall get /v2/products
superwall post /v2/products -d name="Pro Monthly" -d price:=9.99
superwall delete /v2/products/prod_123
```

Params follow an httpie-style convention: `-d key=value` sends a string, `key:=value` sends typed JSON (numbers, booleans, objects), and `key[sub]=value` nests. On `get` and `delete`, `-d` params become query parameters.

## App Store Connect

The entire App Store Connect API, proxied and signed by Superwall, with no `.p8` file or JWT to manage locally. Connect your credentials once:

```bash
superwall asc keys set --key-id <id> --issuer <id> --key-file AuthKey.p8
```

From there, you can call any endpoint in the ASC API. The CLI is schema-aware: it keeps a copy of Apple's own OpenAPI spec (fetched on first use, refreshed in the background) and knows every endpoint, field, and enum.

Look up the exact schema for anything, without hunting through Apple's docs:

```bash
superwall asc docs                          # browse every resource
superwall asc docs "introductory offer"     # search by keyword
superwall asc docs /v1/subscriptions post   # required fields, enums, relationships
```

Write with flat params. The CLI assembles the JSON:API body for you and validates it locally, so a mistake comes back as a precise fix instead of one of Apple's opaque `409` errors:

```bash
superwall asc post /v1/subscriptions \
  -d name="Premium Monthly" -d productId=com.acme.pro \
  -d subscriptionPeriod=MONTHLY -d group=<groupId>
```

```
✗ Invalid POST /v1/subscriptions body:
  • subscriptionPeriod "MONTHLY" not allowed — use ONE_WEEK|ONE_MONTH|…|ONE_YEAR
```

Fix the value and it goes through. Shortcuts cover the common reads (`asc apps`, `asc products <bundle-id>`, `asc subscriptions <bundle-id>`, `asc iaps <bundle-id>`); everything else is `asc get|post|patch|delete /v1/...`. If your organization has more than one ASC team connected, scope with `--team <id>`.

## Install agent skills

Logging in installs the [Superwall agent skills](/docs/dashboard/guides/superwall-skill) into your coding agents automatically and keeps them updated. To reinstall them (or a subset) manually:

```bash
npx superwall skills
```

The CLI shows a picker with every skill pre-selected, so pressing **Enter** installs them all, globally, for every coding agent detected on your machine (Claude Code, Cursor, Codex, Gemini CLI, Copilot, Windsurf, and more). To skip the picker or force a refresh:

```bash
superwall skills --skill superwall        # install specific skills by name
superwall skills --force                  # reinstall even if already up to date
```

## For agents and scripts

Pass `--json` to any command: stable output shape, structured errors, and it never prompts. `--no-interactive` keeps the human-readable output but drops the prompts.

```bash
superwall products list --json
superwall query "SELECT count() FROM sw.events_rep" --json
```

## Feedback

Something broken, confusing, or missing? Send feedback straight to the team:

```bash
superwall feedback "migrate crashed on Expo"
```

## Telemetry

The CLI sends fully anonymous usage events (which workflow ran and whether it succeeded, never emails, IDs, file paths, SQL, prompts, or error messages). Opt out with `SUPERWALL_TELEMETRY_DISABLED=1` or `DO_NOT_TRACK=1`.

## Related

* [Superwall Skill](/docs/dashboard/guides/superwall-skill): Give your coding agent live Superwall docs and this CLI.
* [Superwall MCP](/docs/dashboard/guides/superwall-mcp): Manage your account from MCP-compatible AI tools.
* [Query with ClickHouse](/docs/dashboard/guides/query-clickhouse): The analytics tables behind `superwall query`.
* [Editor MCP](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-mcp): Connect an agent to the paywall open in your editor.
* [Vibe Coding](/docs/sdk/guides/vibe-coding): All the AI tools available for working with Superwall in one place.