# Superwall Documentation # 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 # External Paywall Creation Build your own paywall webpage for Superwall with data-pw tags, the Paywall.js script, and game controller input. Covers the deprecated legacy editor. > **Warning:** The legacy editor is deprecated. Please visit the docs covering our new > [editor](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-overview). The following is only necessary if you're looking to build your own paywall website outside of Superwall. We strongly recommend using the paywall editor or templates instead. ### Data Tags Data tags are specific attributes attached to elements, like text, links, or buttons, on the paywall webpage.\ These are recognised by a special script called [Paywall.js](/docs/advanced-paywall-creation#paywalljs) that interprets user feedback and transmits information to and from the SDK. These are built in to the templates we've created and you don't need to worry about them unless you're building your own paywall webpage. When you configure your paywall webpage on the Superwall dashboard, the dashboard instantly recognizes the data tags on your website. From there you can edit the text that appears in the tagged elements. There are seven different types of data tag: | Name | Value | Purpose | | ----------------------- | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | data-pw-var | The reference name of the element, e.g. "Title". | This indicates to Superwall that the element should be remotely configurable. The Superwall dashboard will create an editable text field for this element. The reference name of that text field will be equal to the value you provide. | | data-pw-close | Add anything as a value. It's ignored. | Closes the paywall. | | data-pw-restore | Add anything as a value. It's ignored. | For restoring purchases, if you bought on a different device. | | data-pw-purchase | Either primary, secondary, or tertiary. | This relates to your primary, secondary, or tertiary product set up in the Superwall dashboard respectively. When the tagged element is tapped, it tells the SDK to initialize a purchase of the specified product. | | data-pw-open-url | A valid url. E.g.` .` | Normal href links do not work in a paywall. However, attaching this tag to an element opens the provided url. | | data-pw-open-deep-link | A valid deep link url. E.g. fb://profile/33138223345. | Opens a deeplink from a button on a paywall. | | data-pw-custom | A name for a custom action | When the tagged element is tapped, the SDK calls its delegate method handleCustomPaywallAction(withName:). The value you provide is passed to the function, from which you can perform custom logic. Check out [Custom Paywall Buttons](/docs/sdk/guides/advanced/custom-paywall-actions) for more. | | data-pw-skip-inner-html | true | This prevents an element's text from being edited. It tells Paywall.js to keep looking into the element's children for more data-pw-var tags. This is useful when you want to hide a whole section or edit the style of a container, rather than edit its text. | Here are a few examples of what data tags look like in the webpage HTML: ```html HTML

``` ### Paywall.js Paywall.js is a javascript utility that recognizes data tags and acts as the interface between the Superwall client SDK and the webpage presented to the user. It does a few fancy tricks to make the HTML feel native, but it's main purpose is to interpret user feedback and transmit information to and from the SDK. In addition, when you configure a paywall on the Superwall dashboard, the dashboard instantly recognizes the data tags you’ve provided. From there, you can edit the text of all tagged items. To get your webpage to be operable with Superwall, you need to add the Paywall.js script to the header of your site. We recommend using [Webflow](https://webflow.com). To add custom scripts to a Webflow webpage you need to have a paid Webflow account. However, our [clonable Webflow project](https://webflow.com/website/45-Paywall-Elements?ref=showcase-search\&searchValue=superwall) already includes this script. Therefore, we recommend using the cloned project as the basis of your paywalls. In this project, we've also removed the Webflow watermark that is attached to all free Webflow webpages. If you'd like to add this script yourself, open the **Pages panel**, select the **cog wheel** next to the page name, then scroll down to the **Custom Code** section. In the **Inside head tag** section, add the following code: ```html HTML ``` > **Warning:** Do not remove async ![](/docs/images/bc9fb2b-57addcd-Screen_Shot_2021-08-17_at_12.23.07_AM.png) > **Note:** Paywall.js is available to Superwall customers subject to the terms of the subscription agreement > between Superwall and the customer, and is not available as an open-source project. ### Game Controller Paywall.js now supports game controller input so users can make purchases while maintaining the native game controller experience. #### Basic Setup To attach an on-screen button to a game controller button, simply add the `data-pw-gc-button` tag to the element. The value of this tag must match the [unmappedLocalizedName](https://developer.apple.com/documentation/gamecontroller/gccontrollerelement/3681941-unmappedlocalizedname) of the game controller button in iOS. For example, the following button would purchase the primary product if a user pressed the "A" button on their game controller. ```html HTML
Purchase
``` #### Styling To allow users to style buttons, we will add and remove classes during the button press event. When the game controller input becomes depressed, we add `pw-gc-press`. When the button is let up, we will remove that class. Many users will use these classes to slightly shirk the button on press and restore it on press end. ```css CSS .pw-gc-press { opacity: 0.9; transition: all .2s ease-in-out; transform: scale(0.93); } ``` #### Advanced Some users may want to take other actions based on the game controller input so we will automatically forward all game controller events to a function on the window if it is defined. ```typescript TypeScript type DirectionalInput = { controller_element: string directional: true x: number y: number } type NonDirectionalInput = { controller_element: string directional: false value: number } export type Input = | DirectionalInput | NonDirectionalInput window.onGameControllerInput = (data: Input) => { // Do anything you want with the input! } ``` # 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 # Analyze Your Data Ask AI about conversion, revenue, and experiments, from quick questions in the dashboard to SQL queries and scheduled reports. An agent can answer questions about your paywalls, experiments, and revenue, and turn the answers into charts and reports. | You want to | Use | | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | | Ask a quick question about your data | [Superwall AI](/docs/agents/superwall-ai) in the dashboard | | Analyze data from Claude, ChatGPT, Codex, or Cursor | The [plugin](/docs/agents/plugins) or [Superwall MCP](/docs/agents/mcp) | | Run your own SQL | [`superwall query`](/docs/agents/cli#query-your-analytics-data) | | Get a recurring report or an analysis triggered by another system | [Superwall Agents](/docs/agents/superwall-agents) | ## Quick questions Open [Superwall AI](/docs/agents/superwall-ai) from the chat bubble in the dashboard and ask in plain English, for example "How did my onboarding paywall convert last week?" It writes and runs the queries, charts the results, and points out what stands out. ## From your agent With the [plugin](/docs/agents/plugins) or [Superwall MCP](/docs/agents/mcp) connected, your agent can query your analytics directly: it writes SQL against your organization's data and runs it with the `query` tool, the same as [`superwall query`](#your-own-sql). It also reads the dashboard's own figures for an app or a campaign's audiences, and can run the [acquisition cohort report](/docs/dashboard/guides/acquisition-cohort-report), which shows installs and revenue by campaign, ad set, ad, or country. ## Your own SQL The [Superwall CLI](/docs/agents/cli) runs SQL against your organization's analytics data: ```bash superwall query "SELECT count() FROM sw.events_rep" ``` Agents use the same command when you ask for an analysis that needs raw data. See [Query ClickHouse](/docs/dashboard/guides/query-clickhouse) for the available tables. ## Recurring reports [Superwall Agents](/docs/agents/superwall-agents) can run a prompt on a schedule, such as a weekly experiment readout or a daily anomaly check. It can also start from a webhook. See [Automations](/docs/agents/superwall-agents/automations) and [Webhooks](/docs/agents/superwall-agents/webhooks). # 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 API Call the Superwall REST API with an organization API key, the same API the MCP, CLI, and Superwall AI use. The Superwall API is the REST API behind the dashboard, the [Superwall MCP](/docs/agents/mcp), the [Superwall CLI](/docs/agents/cli), and [Superwall AI](/docs/agents/superwall-ai). Use it directly when you're building your own integration or script. If you're working with an AI agent, you usually don't need to call the API yourself. The [plugin](/docs/agents/plugins), MCP, and CLI already use it with your account's permissions. ## Reference The full reference, with every endpoint and its parameters, is at [api.superwall.com/docs](https://api.superwall.com/docs). The OpenAPI spec is at [api.superwall.com/openapi.json](https://api.superwall.com/openapi.json). You can give either one to an agent so it can write requests for you. The base URL is `https://api.superwall.com`, and endpoints are versioned under `/v2`, for example `/v2/projects` and `/v2/products`. ## Authentication Requests use an organization API key as a bearer token: ```bash curl https://api.superwall.com/v2/projects \ -H "Authorization: Bearer $SUPERWALL_API_KEY" ``` Create keys in the dashboard under **Settings › API Keys**. Each key has scopes, which control the resources it can read or write, and project access, which controls the projects it can reach. See [API key access](/docs/dashboard/dashboard-settings/overview-settings-access-controls#api-key-access). ## From the CLI The CLI can make authenticated API calls using your `superwall login` session, so you don't need a key: ```bash superwall get /v2/products superwall post /v2/products -d project_id= -d identifier=pro_monthly -d name="Pro Monthly" -d 'price[amount]:=9.99' -d 'price[currency]=USD' ``` See [Call the API](/docs/agents/cli#call-the-api) in the CLI guide. ## Analytics queries To run SQL against your analytics data, use [`superwall query`](/docs/agents/cli#query-your-analytics-data) or the [ClickHouse query API](/docs/dashboard/guides/query-clickhouse). # 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 # Build a Paywall Build paywalls with an AI agent using the Superwall Framework, or edit them in the visual editor with AI chat and Editor MCP. The recommended way to build paywalls with AI is the **Superwall Framework**. Your agent writes the paywall as code in your repo, you preview it in the studio, and you push it to Superwall when it's ready. ## Recommended: the Superwall Framework With the [Superwall Framework](/docs/framework), a paywall is a small React app that lives in your repo. Agents already know how to write that kind of code, so you can describe a paywall in plain English and have it built for you. * **Preview everything before it ships.** The [studio](/docs/framework/studio) shows your paywall on iPhone, Android, and iPad, in light and dark mode, in every language, with and without a free trial. You pick what happens on every purchase. * **Prices come from the store.** Products, prices, and trials come from the App Store, Google Play, or Stripe, so an agent can't hardcode a wrong price. * **No app update needed.** Pushed paywalls go live on the next app open, and you A/B test them in campaigns like any other paywall. * **Start from what you have.** An agent can rebuild an existing editor paywall as code, or turn a screen from your app into a paywall. ## Build with an AI agent /docs/framework/build-with-an-agent A plain-language guide to building, previewing, and shipping paywalls by chatting with an agent. No code required. ## Framework quickstart /docs/framework/quickstart Set up a project, preview your first paywall in the studio, and push it to Superwall. ## Migrate from the editor /docs/framework/migrate-from-editor Rebuild a paywall from the visual editor as code and compare the two side by side. ## Framework overview /docs/framework How the Framework works and when to use it. ## Other ways to build with AI | You want to | Use | | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | Edit a paywall in the visual editor by chatting | [AI Chat Builder](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-ai-chat) | | Edit the paywall open in the editor from Claude Code, Codex, or Cursor | [Editor MCP](/docs/agents/editor-mcp) | | Create a visual editor paywall from a template without opening the dashboard | The [plugin](/docs/agents/plugins) or [Superwall MCP](/docs/agents/mcp) | ### In the visual editor Open a paywall and click **AI Chat** in the editor sidebar. Describe the change, attach reference images if you have them, and the [AI Chat Builder](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-ai-chat) makes draft edits for you to review. There's nothing to set up. ### From your own agent, in the editor To keep working in Claude Code, Codex, or Cursor, connect your agent to the paywall open in your browser with [Editor MCP](/docs/agents/editor-mcp). Open **AI Chat** in the editor, click the agent connection pill, and follow the pairing steps. Your agent can then edit text, styles, products, variables, tap behaviors, and more while you watch. ### From a template With the [plugin](/docs/agents/plugins) or [Superwall MCP](/docs/agents/mcp) connected, ask your agent to create a paywall. It can start from a template or from scratch, attach products, and set up a campaign to show it. For example: "Create a paywall from a template for my iOS app with the annual and monthly products, and show it on the `onboarding_complete` placement." # 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 [skills](/docs/agents/skills). Installing the skills 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`. From 2.4.0, a CLI installed globally with npm updates itself within its major version. When a newer minor or patch release is out, it installs it in the background after a command finishes, and you're on it from the next run. It never installs a new major version for you; it tells you one is available instead. It doesn't update itself in CI. Update any time, or across a major version, with: ```bash superwall upgrade ``` ## Authentication `superwall login` opens your browser once, and every command shares that session. The session is stored in `~/.superwall`. Where it can't open a browser (a server, or over SSH), it says so: open the URL it prints on any device and approve the code there. ```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.](/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.](/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 ``` `SUPERWALL_API_KEY` is only ever your organization's secret key (`sk_…`): set it in CI and `push`, `promote`, and `publish` use it without a login. `integrate` never reads it. The public key it writes into your app (`pk_…`) comes from `--api-key`, or from your project when the SDK is already configured. There are no organizations to pick. `superwall apps list` shows every app you can open, grouped by organization, and commands take `--app ` or the app's dashboard link. Commands that work on a whole organization's data, like `query`, use the organization of that app. > **Note:** Logging in also installs the [Superwall agent skills](/docs/agents/skills) 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.](/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. Commands follow the API, the way Stripe's CLI does: `superwall [ids] [--field value]`. ```bash superwall apps list superwall apps get # one app: bundle ID, Apple team, keys, notification URL, SDK reports, revenue provider superwall apps update --team-id superwall entitlements create --identifier pro --app superwall products create --identifier pro_monthly --price 9.99 --period month --entitlement pro --app superwall products storekit # generate a local .storekit file superwall campaigns create --description "Onboarding upsell" --placement onboarding_complete superwall campaigns placements create --event-name paywall_trigger superwall users subscriptions --app superwall bootstrap # the whole account tree at a glance ``` `` is an app's id, its name, or its dashboard link. In a project with several apps, pass the same `--app` to `entitlements create` and `products create`. `--entitlement` takes an entitlement's identifier or id; the CLI resolves it to the entitlement on the product's app and refuses one on a different app, naming both. | Resource | Operations | | -------------- | --------------------------------------------------------------------------------------------------------------------------- | | `apps` | `list`, `get`, `create`, `update`, `use`, `statistics`, `transactions`, `notices` | | `products` | `list`, `get`, `create`, `update`, `delete`, `impact`, `storekit` | | `entitlements` | `list`, `get`, `create`, `update`, `delete`; `grants list`, `create`, `delete` | | `campaigns` | `list`, `get`, `create`, `update`, `archive`, `unarchive`, `prioritize`, `counts`; `placements`, `audiences` and `variants` | | `paywalls` | `list`, `get`, `create`, `duplicate`, `publish`, `archive`, `unarchive`, `versions` | | `users` | `get`, `subscriptions`, `summary`, `entitlements`, `attributes`, `update`, `aliases`, `events` | | `webhooks` | `list`, `get`, `create`, `update`, `delete`, `rotate-secret`, `attempts`, `stats` | | `events` | `list`, `get`, `attempts`, `retry` | * `superwall --help` lists its operations, and `superwall --help` lists that operation's flags. They're read from the live API reference, so a new API field works without a CLI update. * A flag is a request field: `--event-name x` sends `event_name`. Anything else goes in with `-d key=value`. A flag the endpoint doesn't take is refused before anything is sent. * `--app` fills in the project, app and organization ids, so you never type them into a path. * Creating always takes flags, never positional values. An app's fields, including its bundle ID and revenue provider, change with `apps update`. * `--dry-run` prints the request instead of sending it. Deleting, archiving and other changes that can't be undone ask first, and need `--yes` outside a terminal. * Every `list` takes `--search ` and `--limit `. `list` is the default operation, and `--json` returns the API's response unformatted. A paywall's design and settings change in the [editor](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-overview) or, for a paywall built as code, in [its project](/docs/framework), not through `paywalls`. > **Info:** Every command that doesn't need your machine is also a tool of the [Superwall MCP](/docs/agents/mcp), with the same inputs and the same `--json` output. > **Info:** CLI 2.0 renamed several commands, and the old names are unknown commands now; see [Upgrading from 1.x](#upgrading-from-1x) for each replacement. ## 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. Many apps receive revenue from both their store and RevenueCat, so the same purchase can arrive twice. Each app's revenue provider decides which one its dashboard figures count. Pass `--app ` and the query gets it as ClickHouse parameters, `{app:UInt64}`, `{revenue_provider:String}` and `{revenue_integrations:Array(String)}`, so your SQL counts revenue the way the dashboard does: ```sql -- superwall query --file revenue.sql --app SELECT sum(price) FROM open_revenue.attributed_events_by_ts_rep FINAL WHERE applicationId = {app:UInt64} AND (integration IN {revenue_integrations:Array(String)} OR source = 'sdk') AND NOT (coalesce(integration, '') = 'revenue_cat' AND store = 'STRIPE') ``` `--param name=value` passes any other parameter. Change an app's revenue provider with `superwall apps update --revenue-provider open_revenue` (or `revenue_cat`). See [Query with ClickHouse](/docs/dashboard/guides/query-clickhouse) for the available tables and schema. To find the event names and attribute keys an app sends, run `superwall get /v2/charts/data-schema -d application_id=`, and for one event's property keys, `superwall get /v2/charts/data-schema/event-properties -d application_id= -d event=` (see [Find event names and property keys](/docs/dashboard/guides/query-clickhouse#find-event-names-and-property-keys)). ## Call the API For an endpoint no resource covers, such as charts, surveys or retention messaging, find it and its exact parameters and body with `superwall api docs`, which reads the live API reference and needs no login: ```bash superwall api docs # every group of endpoints superwall api docs variant # search by keyword superwall api docs /v2/campaigns/123/audiences/9/variants post # one endpoint in full ``` Then make raw, authenticated requests to any endpoint. A request that fails points to its reference entry: ```bash superwall get /v2/products superwall post /v2/products -d project_id= -d identifier=pro_monthly -d name="Pro Monthly" -d 'price[amount]:=9.99' -d 'price[currency]=USD' 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. ## Connect an app to Apple One command connects an iOS app to Apple: ```bash superwall setup apple --app ``` It signs you in to Apple, creates the App Store Connect API key and the In-App Purchase key the app doesn't have yet, saves them on the app, and points the app's App Store Server Notifications at Superwall. It also saves the app's bundle ID when Superwall has none, after telling you how many builds the SDK has reported under other IDs would run in test mode. * Your Apple password goes from your computer straight to Apple. Superwall never receives it, and it isn't saved. * The Apple Account must be an Admin or the Account Holder, on a team with its agreements signed. * It never creates a second key of a kind the app already has, never replaces a notification URL another server holds (it reports it and exits non-zero), never revokes a key, and never changes the app's revenue provider. In a terminal it asks for your Apple Account email, your password (masked) and the verification code Apple sends. Type `sms` at the code prompt, or pass `--sms`, to get the code by text. Pass `--team ` when the account is on several teams, `--bundle-id ` to create the Superwall app from an App Store Connect app, and `--dry-run` to sign in and check key access without changing anything. When the Superwall app has no bundle ID yet, `setup apple` saves the App Store Connect app's, and says how many builds the SDK has reported under other IDs would run in test mode. When the app already has a different bundle ID, it stops before creating anything; change it first with `superwall apps update --bundle-id `. ### Let a coding agent run it A coding agent can run `setup apple` for you if you decide it should. Put the password where the agent's shell can read it, as `SUPERWALL_APPLE_PASSWORD`; never paste it into a chat. Without prompts it runs in two steps, because Apple sends the code after the sign-in starts: ```bash superwall setup apple --apple-id you@example.com --app --no-interactive # Apple sends you a code superwall setup apple --code 123456 --app --no-interactive # same flags, within 10 minutes ``` The first run exits non-zero saying a code is required; give the agent the code and it runs the second. Only Apple's pre-verification cookies are kept between the two runs, in `~/.superwall/apple-sign-in.json`, for 10 minutes. ### One step at a time Every step of `setup apple` is also its own command: ```bash superwall apps get # which keys the app has, its notification URL and bundle ID superwall asc keys import --app # reuse a key your organization already has superwall asc keys create api_key --app # sign in to Apple and create just this key superwall asc keys create purchase_key --app superwall asc notification-url check --app # whose URL Apple sends purchase events to superwall asc notification-url set --app # set it where Apple has none superwall apps update --bundle-id com.acme.app # save the bundle ID ``` | Command | What it does | | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `asc keys list --app ` | The app's API key and In-App Purchase key (key id and issuer id). Without `--app`, your organization's keys, the ones the signed proxy uses. | | `asc keys create --app ` | Signs in to Apple, creates a key named "Superwall" and saves it. Does nothing when the app already has one; `--replace` creates another, and the old one stays valid at Apple. | | `asc keys create --app --key-file --key-id --issuer ` | Saves a key you already hold, once Apple accepts it. Without `--app` it becomes your organization's key. | | `asc keys update --team --key-file ...` | Replaces your organization's key for an Apple team, only when Apple confirms the new key belongs to that team. | | `asc keys import [kind] --app ` | Tries the keys your organization already has and saves the first one Apple confirms for this app. `--from ` copies that app's key instead. | | `asc keys sources --app ` | The keys on your other apps that `import` could use. | | `asc keys delete --app ` | Removes a key from the app. Nothing is revoked at Apple. | | `asc notification-url check --app ` | For production and sandbox: whether Apple sends to this app, another Superwall app, someone else (such as RevenueCat), or nowhere. Changes nothing. | | `asc notification-url set --app ` | Sets this app's URL where Apple has none. Never replaces another server's URL. | `` is `api_key` or `purchase_key`. `asc keys import` exits non-zero when a key is still missing, so you can fall back to creating one: ```bash superwall asc keys import api_key --app || superwall asc keys create api_key --app ``` A key file created at Apple that Superwall couldn't save is written next to you as `./AuthKey_.p8` or `./SubscriptionKey_.p8`, because Apple releases a key only once. ### Server notification URL Apple sends an app's purchase events to one URL per environment. `superwall apps get ` shows the app's Superwall URL. `check` asks Apple with the app's saved API key and says, for production and sandbox, whose URL it has: | Owner | Meaning | | --------------- | -------------------------------------------------------------------------------------------------------------------- | | `this_app` | This app's Superwall URL, in either address Superwall has issued | | `superwall_app` | Another Superwall app's. Named, with its URL, when you can read that app; otherwise its token is shown as `REDACTED` | | `other` | Someone else's, such as RevenueCat or your own server | | `none` | Apple has no URL | It also reports one status for the app: | Status | Meaning | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `set` | `set` only: Superwall just wrote this app's URL where Apple had none | | `already_set` | Apple already sends this app's notifications to Superwall | | `not_set` | Production, sandbox, or both are empty, and no other server holds either | | `conflict` | Another server or another Superwall app holds production, sandbox, or both | | `skipped` | The app has no API key or no bundle ID saved, so Apple can't be asked | | `failed` | Apple couldn't be asked. The message says why: Apple refused the saved key (it may have been revoked), the key can't see an app with this bundle ID, or a key saved in the last few minutes isn't active yet | `set` fills whichever environment is empty and never replaces another server's URL. If RevenueCat receives Apple's notifications today, keep it there and [forward them from RevenueCat](/docs/dashboard/dashboard-settings/overview-settings-revenue-tracking-revenuecat-forwarding). If your own server does, [forward from your server](/docs/dashboard/dashboard-settings/app-store-server-notifications#through-your-server). `set` leaves the [revenue provider](#revenue-provider) alone; pass `--set-revenue-provider` to also count revenue from the store. `check` and `set` work with a `superwall login` session or an API key with `applications:write`. ## App Store Connect The entire App Store Connect API, proxied and signed by Superwall with the keys above, with no `.p8` file or JWT to manage locally. 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= ``` ``` ✗ Invalid POST /v1/subscriptions body: • subscriptionPeriod "MONTHLY" not allowed — use ONE_WEEK|ONE_MONTH|…|ONE_YEAR ``` Fix the value and it goes through. Anything the commands below don't cover is `asc get|post|patch|delete /v1/...`. If your organization has more than one ASC team connected, scope with `--team `. `asc get`, `asc post`, `asc patch`, `asc delete` and `asc docs` warn when an endpoint is one Apple has replaced, and name the replacement: the v1 subscription and in-app purchase localizations, the v1 product submissions, `subscriptionAvailabilities`, the old in-app purchase and version-submission endpoints, and screenshot and preview sets. ### Subscriptions and in-app purchases What an app sells has its own commands, each on Apple's current endpoints. They take the App Store app as its id or its bundle ID, and flags named after Apple's own fields: ```bash superwall asc apps # your apps at Apple superwall asc products com.acme.app # everything the app sells superwall asc subscription-groups create --asc-app com.acme.app \ --reference-name Pro --display-name "Acme Pro" superwall asc subscriptions list com.acme.app superwall asc subscriptions get # localizations, prices, offers, availability, what's missing superwall asc iaps create --asc-app com.acme.app --product-id coins.100 --name "100 Coins" \ --in-app-purchase-type CONSUMABLE --price 0.99 --display-name "100 Coins" ``` `asc subscriptions create` does everything Apple asks for before review, in order: the subscription, its localization, where it's sold, its price in one territory equalized to every other, and a free trial if you want one. It ends by reading the subscription back and saying what's still missing: ```bash superwall asc subscriptions create --group Pro --asc-app com.acme.app \ --product-id com.acme.pro.monthly --name "Pro Monthly" --subscription-period ONE_MONTH \ --price 9.99 --display-name "Pro" --description "Everything, monthly" --trial ONE_WEEK ``` The details have commands of their own: | Command | Operations | What it covers | | ------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------ | | `asc subscription-groups` | `list`, `get`, `create`, `update`, `delete` | Subscription groups and their localizations | | `asc subscriptions` | `list`, `get`, `create`, `update`, `delete` | Auto-renewable subscriptions | | `asc iaps` | `list`, `get`, `create`, `update`, `delete` | Consumables, non-consumables, and non-renewing subscriptions | | `asc localizations` | `list`, `add`, `update`, `delete` | The App Store name and description of a subscription, group, or in-app purchase | | `asc prices` | `points`, `list`, `set` | Apple's price points, and a price set in one territory and equalized everywhere else | | `asc offers` | `list`, `create`, `update`, `delete` | Introductory offers: free trials and discounted first periods, in every territory | | `asc availability` | `get`, `set` | The territories a subscription or in-app purchase is sold in | | `asc screenshots` | `upload` | The App Review screenshot | | `asc submit` | | Submits subscriptions, groups, and in-app purchases for App Review | ```bash superwall asc localizations add --subscription --locale de-DE --name "Pro" superwall asc prices set --subscription --price 12.99 --preserve-current-price superwall asc offers create --subscription --offer-mode FREE_TRIAL --duration TWO_WEEKS superwall asc availability set --iap --available-territories USA,CAN superwall asc screenshots upload --subscription paywall.png superwall asc submit --asc-app com.acme.app --group --subscription ``` Every change takes `--dry-run`: it prints each request it would send, bodies included, and changes nothing. Deletes ask first, and need `--yes` outside a terminal. Apple reviews an app's first subscriptions and in-app purchases only together with an app version, so submit those with [`asc release submit`](#releases). ### Releases The steps of an App Store release have commands too. A version is its id, or its version string with `--asc-app` (and `--platform` for a platform other than iOS): ```bash superwall asc versions create --asc-app com.acme.app --version-string 1.3.0 --release-type MANUAL superwall asc builds list com.acme.app --version-string 1.3.0 --processing-state VALID superwall asc builds attach 1.3.0 --asc-app com.acme.app superwall asc metadata update 1.3.0 --asc-app com.acme.app --locale en-US --whats-new "Faster sync" superwall asc release submit 1.3.0 --asc-app com.acme.app --subscription superwall asc release status 1.3.0 --asc-app com.acme.app # state, build, review submission, phased release superwall asc release release 1.3.0 --asc-app com.acme.app # once it's pending developer release superwall asc release phased pause 1.3.0 --asc-app com.acme.app ``` | Command | Operations | What it covers | | -------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `asc versions` | `list`, `get`, `create`, `update`, `delete` | App Store versions. `delete` works only while a version is still editable | | `asc builds` | `list`, `get`, `attach`, `expire` | Uploaded builds, and which version each is attached to | | `asc metadata` | `list`, `get`, `update`, `add` | A version's text per locale: What's New, description, keywords, promotional text, URLs | | `asc release` | `submit`, `release`, `phased`, `status` | Submits a version for review with any `--subscription`, `--iap`, or `--group` alongside, releases it, and starts, pauses, resumes, or completes its phased release | `asc versions delete`, `asc builds expire`, and `asc release release` ask first. ## Revenue provider An app can receive purchase events from its store (App Store Connect or Google Play, sent straight to Superwall) and from RevenueCat. Both keep arriving and being stored. The revenue provider decides which of them every revenue figure in the dashboard counts: ```bash superwall apps get # what is counted, and what each source sent in the last 30 days superwall apps update --revenue-provider open_revenue # count the store's own events superwall apps update --revenue-provider revenue_cat # count RevenueCat's events ``` A change moves your revenue numbers, so the CLI asks first. In a terminal it prompts; anywhere else it changes nothing and exits non-zero unless you pass `--yes`. `--dry-run` says what would change. Setting the value the app already has does nothing. Changing the provider changes no key, no notification URL, and no stored event, and you can switch back. See [Choosing a revenue provider](/docs/dashboard/dashboard-settings/overview-settings-revenue-tracking#choosing-a-revenue-provider). Your own SQL counts revenue the same way when you pass `--app`, see [Query your analytics data](#query-your-analytics-data). ## Apple Search Ads The entire Apple Ads Campaign Management API (v5), proxied by Superwall, with no client secret, OAuth token, or org id to manage locally. The CLI uses the credentials you connect in the dashboard (open the app → Integrations → Apple Search Ads → Advanced) and finds the connected app on its own, or takes `--app `. It works with a `superwall login` session or an API key with the `apple_search_ads:proxy` scope (see [API access](/docs/integrations/apple-search-ads#api-access)). ```bash superwall asa campaigns list superwall asa campaigns find --field status --op EQUALS --values ENABLED --all superwall asa keywords create --campaign 123 --adgroup 456 \ --text "grammar checker" --match-type EXACT --bid 1.25 superwall asa reports campaigns --start 2025-01-01 --end 2025-01-31 --group-by countryOrRegion ``` Every resource follows the same shape, `asa [id]`, scoped with `--campaign`, `--adgroup`, or `--adam-id`. The catalog is the documentation: ```bash superwall asa docs # every endpoint, grouped superwall asa docs keywords # one resource: usage, flags, Apple links superwall asa docs campaigns create # Apple's own page: fields, enums, examples ``` Writes take typed flags (money flags pick up the account's currency), `-d key=value` for any other field, or `--body` for the whole payload. Anything not covered is `asa get|post|put|delete /path`, sent straight to Apple with your access token and org context attached. ## Install agent skills Logging in installs the [Superwall agent skills](/docs/agents/skills) into your coding agents automatically and keeps them updated. To reinstall them (or a subset) manually: ```bash npx superwall skills ``` `superwall upgrade` also brings the skills up to date, so you don't need to run this after upgrading. 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 ``` ## Upgrading from 1.x CLI 2.0 makes every command follow the API, with one way to do each thing. A removed command is an unknown command, so a script that still uses one fails loudly instead of doing something else. The table below maps each one to its replacement. | 1.x | 2.0 | | --------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | `orgs list`, `orgs use` | Not needed: `apps list` shows every app by organization, and commands take `--app ` | | `apps create "My App" --platform ios --bundle ` | `apps create --name "My App" --platform ios --bundle-id ` | | `apps bundle-id --app ` | `apps get ` | | `apps bundle-id --app ` | `apps update --bundle-id ` | | `revenue-provider [get] --app ` | `apps get ` | | `revenue-provider set --app ` | `apps update --revenue-provider `; `query --app` passes it to SQL | | `products create ` | `products create --identifier ` | | `entitlements create ` | `entitlements create --identifier ` | | `campaigns create "" ` | `campaigns create --description "" --placement ` | | `campaigns placement ` | `campaigns placements create --event-name ` | | `asc keys --app ` | `asc keys list --app ` | | `asc keys set` | `asc keys create --key-file ...`; a team's organization key is `asc keys update --team ...` | | `asc keys copy --from ` | `asc keys import --from ` | | `asc keys rm` | `asc keys delete` | | `asc notification-url [get] --app ` | `apps get ` | | `asc /v1/...` | `asc get /v1/...` | | `asc docs refresh` | `asc docs --refresh` | | `asc subscriptions ` | `asc subscriptions list ` | | `asc iaps ` | `asc iaps list ` | `asc apps`, `asc products `, `asc notification-url check` and `set`, `asc keys create`, `import` and `sources`, `setup apple`, `asa`, `query`, and the raw `get`, `post`, `patch` and `delete` keep their 1.x syntax, though their flags may have changed: check `--help`. Coding agents pick up the new syntax from the 2.0 agent skills. The 1.x `upgrade` command doesn't update them, so run `superwall skills` once after upgrading to 2.0. From 2.4.0 on, `superwall upgrade` updates the skills itself. ## 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 * [Skills](/docs/agents/skills): Give your coding agent live Superwall docs and this CLI. * [Superwall MCP](/docs/agents/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/agents/editor-mcp): Connect an agent to the paywall open in your editor. * [Framework CLI reference](/docs/framework/cli): The `create`, `dev`, `push`, `promote`, and `publish` commands for building paywalls as code. * [Use Superwall with AI](/docs/agents): Every AI tool for Superwall, and which one to pick. # 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 # Docs for AI Give these docs to any AI tool with llms.txt files, Markdown versions of every page, and the Copy Markdown and Open in buttons. Every page in these docs is available in formats AI tools can read. Use them to give an assistant up-to-date Superwall context, even one without the [plugin](/docs/agents/plugins) or [skills](/docs/agents/skills). ## Page actions At the top of each page: * **Copy Markdown** copies the page as Markdown. * The **Open** menu lets you **View as Markdown**, open the page's source on **GitHub**, or open **ChatGPT**, **Claude**, **Cursor**, or **Scira AI** with a prompt to read the page. ## Markdown URLs Add `.md` to the end of any docs URL to get that page as Markdown. For example, `https://superwall.com/docs/ios/quickstart/install.md`. ## llms.txt The docs have `llms.txt` and `llms-full.txt` files for the whole site and for each section: * `llms.txt` is a summary of the docs with a link to each page. * `llms-full.txt` is the full text of every page. | Section | Summary | Full text | | ------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | All | [`llms.txt`](https://superwall.com/docs/llms.txt) | [`llms-full.txt`](https://superwall.com/docs/llms-full.txt) | | Dashboard | [`dashboard/llms.txt`](https://superwall.com/docs/dashboard/llms.txt) | [`dashboard/llms-full.txt`](https://superwall.com/docs/dashboard/llms-full.txt) | | Framework | [`framework/llms.txt`](https://superwall.com/docs/framework/llms.txt) | [`framework/llms-full.txt`](https://superwall.com/docs/framework/llms-full.txt) | | Agents | [`agents/llms.txt`](https://superwall.com/docs/agents/llms.txt) | [`agents/llms-full.txt`](https://superwall.com/docs/agents/llms-full.txt) | | iOS | [`ios/llms.txt`](https://superwall.com/docs/ios/llms.txt) | [`ios/llms-full.txt`](https://superwall.com/docs/ios/llms-full.txt) | | Android | [`android/llms.txt`](https://superwall.com/docs/android/llms.txt) | [`android/llms-full.txt`](https://superwall.com/docs/android/llms-full.txt) | | Flutter | [`flutter/llms.txt`](https://superwall.com/docs/flutter/llms.txt) | [`flutter/llms-full.txt`](https://superwall.com/docs/flutter/llms-full.txt) | | Expo | [`expo/llms.txt`](https://superwall.com/docs/expo/llms.txt) | [`expo/llms-full.txt`](https://superwall.com/docs/expo/llms-full.txt) | | KMP (Beta) | [`kmp/llms.txt`](https://superwall.com/docs/kmp/llms.txt) | [`kmp/llms-full.txt`](https://superwall.com/docs/kmp/llms-full.txt) | | Unity (Beta) | [`unity/llms.txt`](https://superwall.com/docs/unity/llms.txt) | [`unity/llms-full.txt`](https://superwall.com/docs/unity/llms-full.txt) | | Web (Beta) | [`web/llms.txt`](https://superwall.com/docs/web/llms.txt) | [`web/llms-full.txt`](https://superwall.com/docs/web/llms-full.txt) | | React Native (Deprecated) | [`react-native/llms.txt`](https://superwall.com/docs/react-native/llms.txt) | [`react-native/llms-full.txt`](https://superwall.com/docs/react-native/llms-full.txt) | | Integrations | [`integrations/llms.txt`](https://superwall.com/docs/integrations/llms.txt) | [`integrations/llms-full.txt`](https://superwall.com/docs/integrations/llms-full.txt) | | Web Checkout | [`web-checkout/llms.txt`](https://superwall.com/docs/web-checkout/llms.txt) | [`web-checkout/llms-full.txt`](https://superwall.com/docs/web-checkout/llms-full.txt) | To use fewer tokens, give your tool the files for the section you're working in. # 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 # Connect an Agent with MCP Connect Claude Code, Codex, Cursor, or another MCP-compatible agent to the paywall currently open in the Superwall editor. Editor MCP lets an external AI agent control the paywall currently open in your browser. Use it when you want to keep working in Claude Code, Codex, Cursor, or another MCP-compatible agent while giving that agent live access to the editor. ![Editor MCP connection panel showing install options and a pairing code](/docs/images/paywall-editor-agent-connect.jpg) > **Note:** Editor MCP is different from the [Superwall MCP](/docs/agents/mcp). The Superwall MCP manages account resources such as apps, campaigns, products, and paywalls. Editor MCP controls the one paywall editor session open in your browser. ## Connect an agent 1. Open the paywall you want the agent to edit. 2. Open **AI Chat** in the editor sidebar. 3. Click the agent connection pill. 4. Choose **Skill** or **MCP**. 5. Copy the install command shown in the editor. 6. Paste the pairing prompt into your agent. If you choose **Skill**, the editor shows: ```bash npx skills add superwall/skills ``` Then paste the generated prompt into your agent: ```txt Connect to the Superwall editor using the skill with pairing code: XXXX-XXXX-XXXX ``` If you choose **MCP**, select your client first. The editor generates the right command or configuration for Claude Code, Codex, Cursor, or another MCP client. Use the command shown in the editor because it includes the correct Editor MCP URL for your environment. The MCP prompt looks like this: ```txt Connect to the superwall-editor MCP with pairing code: XXXX-XXXX-XXXX ``` ## Connected state After the agent attaches, the connection pill shows the connected client and tool activity. For example, this is what it looks like when an agent uses the pairing code to connect to the editor: ![Example agent connecting to the Superwall editor over MCP](/docs/images/ai_mcp_claude_connecting.jpg) After the connection completes, the editor shows the attached client and recent tool activity. ![Editor MCP connection panel showing a connected agent and tool activity](/docs/images/paywall-editor-agent-connected.jpg) The editor keeps the browser session open while the page is open. From the connection panel you can: * **Disconnect Agent:** Release the current agent while keeping the editor session available for another pairing. * **End Session:** Close the browser editor session and invalidate the pairing code. Only one external controller can be attached to an editor session at a time. Disconnect the current agent before attaching a different one. ## What agents can do Attached agents receive the editor's live tool list. The exact list can change as the editor evolves, but today agents can: * **Inspect and edit the paywall:** Agents can read the current paywall, selected elements, children, navigation pages, computed styles, and screenshots. They can then update text, styles, names, node order, hierarchy, or write native paywall HTML directly into the editor. * **Work with content and resources:** Agents can upload image and video assets, create and edit products, manage style tokens, and update variables, variable values, and dynamic values. They can also add localization languages, run AI localization, and configure trial-started notifications. * **Configure behavior and advanced flows:** Agents can add or clear tap behaviors such as purchase, restore, close, open URL, set state, select product, navigate page, request permission, request callback, scroll, focus input, delay, animation, and haptics. They can also edit routes, transitions, branches, advanced native elements, and use search or find/replace to make broader changes. ## Session limits Editor MCP uses pairing codes and session tokens rather than your account-level MCP OAuth flow. | Limit | Behavior | | ----------------------- | -------------------------------------------------------------------------------------- | | Pairing code lifetime | Pairing codes expire after 10 minutes. | | Editor session lifetime | Browser editor sessions expire after 24 hours. | | Tool timeout | Tool calls time out after 30 seconds. | | Browser reconnect | The browser has a short reconnect window if the page refreshes or briefly disconnects. | | Failed pair attempts | Too many wrong pairing codes end the session. | If a pairing code expires, open the connection panel again and use the new code. ## Troubleshooting ### The agent cannot attach Check that the paywall editor tab is still open, the pairing code has not expired, and the agent is using the prompt from the current connection panel. ### The session says another controller is connected Only one controller can be attached. Click **Disconnect Agent**, then attach the new agent with the latest pairing code. ### Tool calls fail after a browser refresh Wait a moment for the editor to reconnect. If calls still fail, end the session and create a new connection from the editor. ### The agent edited the wrong thing Use the editor's undo and history tools to review or roll back changes. Select the exact element you want changed before sending the next prompt so the agent receives that selection as context. ## Related * [AI Chat Builder](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-ai-chat): Use Superwall's built-in chat builder inside the editor. * [Superwall MCP](/docs/agents/mcp): Manage account resources from external AI tools. * [Skills](/docs/agents/skills): Give coding agents Superwall docs, API helpers, and SDK integration guidance. * [Build a Paywall](/docs/agents/build-a-paywall): Every way to build a paywall with AI. # 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 # Use Superwall with AI Every way to use Superwall with an AI agent, from the assistant in the dashboard to Claude, ChatGPT, Codex, and Cursor, and which one to pick. Superwall works with the AI tools you already use. An agent can set up the SDK in your app, build and edit paywalls, review your integration, answer questions about your data, and manage your account. ## Pick your path | You want to | Use | Setup | | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- | | Ask a question about Superwall, your account, or your data | [Superwall AI](/docs/agents/superwall-ai), the chat bubble in the dashboard | None | | Work with Superwall in Claude, ChatGPT, Codex, or Cursor | The [Superwall plugin](/docs/agents/plugins) in Claude, ChatGPT, and Codex, or the [MCP](/docs/agents/mcp) and [skills](/docs/agents/skills) elsewhere | A few clicks | | Set up the SDK in your app with a coding agent | The [Superwall CLI](/docs/agents/cli): `npx superwall integrate` | One command | | Build paywalls with an agent | The [Superwall Framework](/docs/framework): paywalls as code, previewed in the studio | The [CLI](/docs/agents/cli) | | Run longer analysis, scheduled reports, or webhook-driven work | [Superwall Agents](/docs/agents/superwall-agents) at superwall.ai | Log in | If you're not sure, start with **Superwall AI** for questions and the **plugin** for anything in your coding agent. ## Recommended setup ### In the dashboard Click the chat bubble in the bottom-right corner of the dashboard. [Superwall AI](/docs/agents/superwall-ai) reads the docs and SDK source, looks at your account, and queries your analytics data. There's nothing to install. ### In Claude, ChatGPT, Codex, or Cursor In Claude, add the Superwall connector and plugin. Together they connect Claude to your Superwall account and add Superwall's skills. See [Install in Claude](/docs/agents/plugins#install-in-claude). In ChatGPT or Codex, install the Superwall plugin from ChatGPT's plugin directory. See [Install in ChatGPT and Codex](/docs/agents/plugins#install-in-chatgpt-and-codex). In Cursor or another agent, add the [Superwall MCP](/docs/agents/mcp) and the [skills](/docs/agents/skills) until the plugin is listed there. ### In your app's code From your app's folder, run: ```bash npx superwall integrate ``` It signs you up if you don't have an account, connects your app, and runs the coding agent on your machine (Claude Code or Codex) to install and configure the SDK. See [Integrate the SDK](/docs/agents/integrate-the-sdk). ## Use cases ## Integrate the SDK /docs/agents/integrate-the-sdk Have an agent install and configure Superwall in your app. ## Build a paywall /docs/agents/build-a-paywall Describe a paywall and have an agent build it with the Superwall Framework. ## Review your setup /docs/agents/review-your-setup Audit an integration and fix what's wrong. ## Analyze your data /docs/agents/analyze-your-data Ask questions about conversion, revenue, and experiments. ## Manage your account /docs/agents/manage-your-account Create products, campaigns, and paywalls without the dashboard. ## All tools Each tool is a separate way in. Most people only need one or two. | Tool | What it is | | ------------------------------------------------- | -------------------------------------------------------------------------------------- | | [Superwall AI](/docs/agents/superwall-ai) | The assistant built into the dashboard, the docs, and superwall.com | | [Superwall Agents](/docs/agents/superwall-agents) | A hosted AI workspace at superwall.ai with automations, webhooks, and a hosted machine | | [Plugins](/docs/agents/plugins) | The MCP and the skills packaged together, available in Claude | | [Superwall MCP](/docs/agents/mcp) | The connector that gives an agent access to your Superwall account | | [Superwall CLI](/docs/agents/cli) | Superwall in your terminal, for you and your coding agent | | [Skills](/docs/agents/skills) | Instructions that teach a coding agent how to work with Superwall | | [Editor MCP](/docs/agents/editor-mcp) | Connect an agent to the paywall open in the visual editor | | [Superwall API](/docs/agents/api) | The REST API behind all of the above | | [Docs for AI](/docs/agents/docs-for-ai) | `llms.txt`, Markdown pages, and Copy Markdown for giving these docs to any AI tool | # 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 # Integrate the SDK Have an AI agent install and configure the Superwall SDK in your app, or move your app over from RevenueCat, Adapty, or Qonversion. An agent can add Superwall to your app end to end: install the SDK, configure it with your API key, set up purchases, and register your first placement. ## Recommended: `superwall integrate` From your app's folder, run: ```bash npx superwall integrate ``` This works even before you have a Superwall account. It: 1. Signs you up, or logs you in, from the terminal. 2. Works out what kind of app it's looking at and connects it to your Superwall account. 3. Runs the coding agent already on your machine (Claude Code or Codex) to install and configure the SDK. 4. Walks you through products, campaigns, placements, paywalls, and testing on a real device. See [Set up your app](/docs/agents/cli#set-up-your-app) in the CLI guide for details. ## With your own agent If you work in Cursor, Gemini CLI, or another agent, or you'd rather watch every step: * **With the [plugin](/docs/agents/plugins) or [skills](/docs/agents/skills) installed,** ask your agent: "Integrate Superwall into this app." The skills walk it through the same steps for your platform. * **With just the CLI,** run `superwall integrate --skill`. It prints the exact instructions instead of running anything, so you can paste them into any agent. See [Drive the agent yourself](/docs/agents/cli#drive-the-agent-yourself). ## Switching from another provider To move from RevenueCat, Adapty, or Qonversion, run: ```bash superwall migrate ``` It follows the same steps as `integrate`, starting from your existing setup. ## After the integration * Check your setup with [Review your setup](/docs/agents/review-your-setup). * Follow your platform's quickstart to understand what the agent added: [iOS](/docs/ios), [Android](/docs/android), [Flutter](/docs/flutter), or [Expo](/docs/expo). # 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 # Manage Your Account Create and update Superwall apps, products, entitlements, campaigns, and paywalls from an AI agent instead of the dashboard. An agent can do most of what you'd normally click through in the dashboard: create apps, products, and entitlements, set up campaigns, and manage webhooks. | You want to | Use | | ---------------------------------------------------------- | ----------------------------------------------------------------------- | | Manage your account from Claude, ChatGPT, Codex, or Cursor | The [plugin](/docs/agents/plugins) or [Superwall MCP](/docs/agents/mcp) | | Manage your account from the terminal or a script | The [Superwall CLI](/docs/agents/cli) | | Build your own integration | The [Superwall API](/docs/agents/api) | ## From your agent With the [plugin](/docs/agents/plugins) or [Superwall MCP](/docs/agents/mcp) connected, describe what you want. For example: * "Create a `pro` entitlement and monthly and annual products for my iOS app." * "Set up a campaign that shows my onboarding paywall on the `onboarding_complete` placement." * "List the webhook endpoints for my app and retry any failed deliveries." You can go from nothing to a working paywall this way. Give the agent your app name, platform, bundle ID, and store product IDs, and it can create the app, products, paywall, and campaign. When it creates the app, it returns the API key you pass to `Superwall.configure()` in your app. The agent acts with your account's permissions. To limit what it can change, use a teammate account with a narrower [role](/docs/dashboard/dashboard-settings/overview-settings-access-controls). ## From the terminal The [Superwall CLI](/docs/agents/cli#manage-your-account) has commands for apps, products, entitlements, campaigns, and paywalls: ```bash superwall entitlements create --identifier pro --app superwall products create --identifier pro_monthly --price 9.99 --period month --entitlement pro --app superwall campaigns create --description "Onboarding upsell" --placement onboarding_complete --app ``` ## Through the API For scripts and your own tools, use the [Superwall API](/docs/agents/api) with an organization API key. # 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 MCP Manage your Superwall apps, products, campaigns, paywalls, analytics, App Store Connect and Apple Search Ads from AI tools like Claude, Claude Code, Codex and Cursor using the Superwall MCP. The Superwall MCP lets AI agents manage your Superwall account through the [Model Context Protocol](https://modelcontextprotocol.io). Instead of clicking through the dashboard, you can manage apps, products, campaigns, paywalls, and more, query your analytics, and work with App Store Connect and Apple Search Ads directly from tools like Claude, Claude Code, Cursor, and Codex. > **Note:** This is different from [Superwall Agents](/docs/agents/superwall-agents), which is the Superwall Agents workspace for chats, analysis, automations, webhooks, and hosted machine work. The Superwall MCP is focused on giving external AI tools access to your Superwall account to create and manage resources. If you also want live docs and SDK integration guidance, use the [skills](/docs/agents/skills), or the [plugin](/docs/agents/plugins), which bundles both. > **Tip:** If you want an agent to edit the paywall currently open in the visual editor, use [Editor MCP](/docs/agents/editor-mcp) instead. Editor MCP uses a pairing code from the open paywall editor and exposes live editor tools for that single browser session. ## Installation In Claude, you can add the MCP from Claude's connector directory instead, along with a plugin that adds Superwall's skills. See [Install in Claude](/docs/agents/plugins#install-in-claude). The steps below add the MCP by URL. Add the Superwall MCP to your platform of choice using the URL `https://mcp.superwall.com/mcp`. You'll be prompted to log in to your Superwall account on first use. ### Claude.ai Go to [Settings → Connectors](https://claude.ai/settings/connectors), click **Add Custom Connector**, and enter `https://mcp.superwall.com/mcp`: ![Adding the Superwall MCP as a custom connector in Claude.ai](/docs/images/sw_mcp_claude_connect.jpg) ### Cursor Add the following to your `~/.cursor/mcp.json` file: ```json { "mcpServers": { "superwall": { "url": "https://mcp.superwall.com/mcp" } } } ``` ### Claude Code ```bash claude mcp add superwall --transport http https://mcp.superwall.com/mcp ``` ### Codex ```bash codex mcp add superwall --url https://mcp.superwall.com/mcp ``` To get the MCP and Superwall's skills together, install the [Superwall plugin](/docs/agents/plugins#in-the-codex-cli) instead. When you add the MCP via a CLI tool (Claude Code, Codex, or Cursor), a browser window will open to complete authentication. Log in to your Superwall account, and it will authenticate automatically. To check the connection, ask the agent something like "list my Superwall apps". ![An example of using the Superwall MCP to manage your account from an AI agent](/docs/images/sw_mcp_example.jpg) ## How it works Every tool is a command of the [Superwall CLI](/docs/agents/cli). The MCP serves the CLI's own commands, generated from the same definitions, so a tool takes the command's arguments and flags as input, runs the command's code, and answers with exactly what the command prints with `--json`, errors included. A command and its tool can't drift apart: a new CLI release brings its commands to the MCP too. * **Tool names** are the command's words joined by `_`, with dashes turned into `_` as well: `superwall apps get` is `apps_get`, `superwall campaigns audiences readout` is `campaigns_audiences_readout`, and `superwall asc subscription-groups create` is `asc_subscription_groups_create`. * **Inputs** are the command's arguments and flags, in `snake_case`: `--event-name` is `event_name`. Each tool's description ends with the CLI command it runs. * **`app`** takes an app's id, its name, or its dashboard link, the way `--app` does in the CLI. There are no organizations or projects to pick first. ## What you can do There are 214 tools: | Area | Tools | | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Superwall's guide | `skill`: the [Superwall skill](/docs/agents/skills), Superwall's guide for agents, which the MCP tells your agent to read first | | Everything at once | `bootstrap`: every app you can open, with its campaigns, placements, paywalls, products, and entitlements | | Apps | `apps_list`, `apps_get`, `apps_create`, `apps_update`, plus `apps_statistics`, `apps_transactions`, and `apps_notices` for the dashboard's overview | | Products and entitlements | `products_*`, `entitlements_*`, and `entitlements_grants_*` | | Campaigns | `campaigns_*`, with `campaigns_placements_*`, `campaigns_audiences_*` (including `campaigns_audiences_readout` for each variant's conversion and revenue), and `campaigns_variants_*` | | Paywalls | `paywalls_list`, `paywalls_get`, `paywalls_create`, `paywalls_duplicate`, `paywalls_publish`, `paywalls_archive`, `paywalls_unarchive`, and `paywalls_versions` | | Users | `users_*`: a user's subscriptions, entitlements, attributes, aliases, and events | | Webhooks | `webhooks_*` and `events_*`: endpoints, deliveries, and retries | | Analytics | `query`: SQL over your organization's [ClickHouse data](/docs/dashboard/guides/query-clickhouse), for any question about revenue, conversion, retention, or behavior | | Feedback | `feedback`: report a bug, a wrong or missing doc, or a missing capability to the Superwall team | | Any API endpoint | `api_docs` to find an endpoint and its body, then `get`, `post`, `patch`, or `delete` to call it | | App Store Connect | `asc_*`: your apps at Apple, subscription groups, subscriptions, in-app purchases, localizations, prices, offers, availability, submissions, versions, builds, metadata, releases, the app's Apple keys and notification URL, and any App Store Connect endpoint through `asc_get`, `asc_post`, `asc_patch`, `asc_delete`, and `asc_docs` | | Apple Search Ads | `asa_*`: campaigns, ad groups, keywords, ads, creatives, reports, and any Apple Search Ads endpoint | App Store Connect and Apple Search Ads tools reach Apple through Superwall, with the keys and credentials already connected to your apps, so your agent never handles an Apple key. See the [CLI reference](/docs/agents/cli#app-store-connect) for what each command does. It does not control the live paywall editor canvas. For live design edits, use [AI Chat Builder](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-ai-chat) inside the editor or connect an external agent with [Editor MCP](/docs/agents/editor-mcp). ### The Superwall skill The MCP serves the `superwall` [skill](/docs/agents/skills) too, so your agent knows how to approach each kind of task without installing anything. Clients that read MCP resources find every file of it at `skill://superwall/SKILL.md` and the references and workflows it links to; for the rest, the `skill` tool returns `SKILL.md` or any of those files by name. It is the same skill the CLI installs, as of the CLI release the MCP runs. The framework skill isn't served: building paywalls as code needs the CLI on your machine. ### Permissions Each call reaches the Superwall API as the person who signed in, so the tools can do exactly what your [dashboard role](/docs/dashboard/dashboard-settings/overview-settings-access-controls) allows, and nothing more. To limit what an agent can change, connect it with a teammate account that has a narrower role. Every tool says what kind of change it makes, so your client knows when to ask you first: | Kind | Examples | Hint | | ----------- | --------------------------------------------------------------------------------------- | --------------------------------- | | Read | `apps_get`, `query`, `campaigns_audiences_readout` | Read-only | | Write | `products_create`, `campaigns_update`, `asc_subscriptions_create` | Neither read-only nor destructive | | Destructive | `products_delete`, `campaigns_archive`, `webhooks_rotate_secret`, `asc_release_release` | Destructive | The CLI asks before deleting, archiving, or anything else that can't be undone. A tool doesn't ask: your MCP client's approval prompt is the confirmation, so keep approvals on for destructive tools. ### CLI-only commands Some commands need your machine: they read your code, write files, open a browser, or sign in to Apple with your password. They have no tool, and the MCP tells your agent to ask you to run them in a terminal with `npx superwall `, after `npx superwall login`: | Command | What it does | | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | | `integrate`, `review`, `migrate` | Set up the SDK in your app, review an existing setup, or migrate from RevenueCat, Adapty, or Qonversion | | `create`, `dev`, `build`, `push`, `promote`, `publish` | Build [paywalls as code](/docs/framework) and ship them | | `setup apple`, `asc keys create`, `asc keys update` | Sign in to Apple and create keys, or save a key file from your machine | | `asc screenshots upload` | Upload an App Review screenshot from your machine | | `products storekit`, `apps use` | Write a StoreKit configuration file, or set the CLI's default app | | `login`, `logout`, `whoami` | The CLI's own session | | `doctor`, `skills`, `upgrade` | Check your setup, install the agent skills, and update the CLI | ## Quick setup You can use the Superwall MCP to go from zero to a fully working paywall setup without ever opening the dashboard. Just ask your AI agent to set up Superwall for your app. You can give it your app name, platform, bundle ID, and store product IDs, and it can create the app, products, entitlements, paywall, and campaign for you. When the agent creates an app, it returns its public API key (`pk_…`). That's what you pass to `Superwall.configure()` in your app. From there, fire a placement event with `register` and your paywall will show. ## Upgrading from the first version The first Superwall MCP had its own, smaller set of tools. Its tools are gone, and agents pick up the new ones on their own. If you wrote prompts or automations around the old names: | Before | Now | | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `whoami` | No tool: ask for your apps (`apps_list`) to check the connection | | `list_organizations`, `list_projects`, `get_project` | `apps_list` and `bootstrap`; apps are found by id, name, or dashboard link | | `create_project`, `create_application_in_project` | `apps_create`, which creates a project for the app when you don't name one | | `update_application`, `update_application_settings` | `apps_update` | | `list_*`, `get_*`, `create_*`, `update_*`, `delete_*` | `_list`, `_get`, `_create`, `_update`, `_delete`, such as `products_create` | | `list_webhook_endpoints`, `rotate_webhook_secret` | `webhooks_list`, `webhooks_rotate_secret` | | `list_events`, `get_event`, `list_event_attempts`, `retry_event` | `events_list`, `events_get`, `events_attempts`, `events_retry` | | `run_clickhouse_query` | `query` | | `get_chart_definitions`, `get_chart_data`, `get_acquisition_cohort_report` | `query` for your own analysis; `api_docs`, then `get` or `post`, for a chart endpoint such as the [acquisition cohort report](/docs/dashboard/guides/acquisition-cohort-report) | | `list_templates`, `get_template` | `api_docs` and `get` on `/v2/paywalls/templates`; `paywalls_create` takes a `template` | | `setup_campaign` | `campaigns_create`, then `campaigns_variants_*` and `campaigns_audiences_*` | | `run_doctor` | The CLI's `superwall doctor`, which checks your machine | ## Related * [Superwall CLI](/docs/agents/cli): The same commands in your terminal, plus the ones that need your machine. * [Plugins](/docs/agents/plugins): The MCP and the skills in one install for Claude, ChatGPT, and Codex. * [Skills](/docs/agents/skills): Docs access, guided SDK integration, and account management through the CLI. * [Superwall Agents](/docs/agents/superwall-agents): AI workspace for Superwall analysis with connected tooling, automations, webhooks, and hosted machines. * [Editor MCP](/docs/agents/editor-mcp): Connect an external agent to the paywall currently open in the editor. * [AI Chat Builder](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-ai-chat): Build and refine paywalls with Superwall's built-in editor chat. * [Use Superwall with AI](/docs/agents): Every AI tool for Superwall, and which one to pick. # 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 # AI Agent Plugins Install the Superwall plugin in Claude, ChatGPT, or Codex to connect your agent to your Superwall account and add Superwall's skills in one step. The Superwall plugin is the quickest way to use Superwall from an AI agent. It gives your agent two things: * **The [Superwall MCP](/docs/agents/mcp):** a connector to your Superwall account. Your agent can inspect and manage apps, products, entitlements, campaigns, paywalls, users, webhooks, and events, query your analytics, and work with App Store Connect and Apple Search Ads. It signs in with your Superwall account and acts with your permissions. * **Superwall's [skills](/docs/agents/skills):** instructions that teach your agent how to integrate the SDK, use the [Superwall CLI](/docs/agents/cli), and edit paywalls live. ## Availability | Client | Status | | ------- | ------------------------------------------------------------------------ | | Claude | Available: the connector and the plugin are both in Claude's directories | | ChatGPT | Available in ChatGPT's plugin directory | | Codex | Available: the same plugin as ChatGPT, also in the Codex CLI | | Cursor | Not listed yet | Until the plugin is listed for your agent, you can get the same setup by installing the [Superwall MCP](/docs/agents/mcp) and the [skills](/docs/agents/skills) separately. ## Install in Claude In Claude, Superwall comes in two parts: a **connector**, which is the MCP, and a companion **plugin**, which adds the skills. **1. Connect your account** 1. In Claude, open **Settings › Connectors**. 2. Search for **Superwall**. 3. Click **Connect to Claude**, then sign in to your Superwall account. ![The Superwall connector in Claude](/docs/images/agents-claude-connector.jpg) Claude lists Superwall as a **Community** connector. Superwall built it, and it passed Claude's automated review. **2. Add the skills** Open the [Superwall plugin](https://claude.ai/new#customize/plugins/id/bf9a44b9-8cfb-4381-9023-4028934b482d%40anthropic-plugin-directory) in Claude's plugin directory, under **Customize › Plugins**, and add it. To check the connection, ask Claude something like "List my Superwall apps." ## Install in ChatGPT and Codex ChatGPT and Codex use the same app and the same plugin directory, so you install the Superwall plugin once. It includes the MCP and the `superwall` and `superwall-editor` skills. Plugins also work in the Codex CLI. 1. Click **Plugins** in the sidebar. 2. Search for **Superwall**, then click **+** to install it, or click the plugin to open its page first. Either way, sign in to your Superwall account when asked. You can also go straight to the [Superwall plugin](https://chatgpt.com/plugins/plugin_asdk_app_6ad84abc6a448191a58b6c021d3c0533). ![Searching the Plugins page for superwall, with the Superwall plugin and its install button](/docs/images/agents-codex-plugin-search.jpg) 3. On the plugin's page, click **Install plugin**. The page lists what the plugin includes: the Superwall app and the `superwall` and `superwall-editor` skills. ![The Superwall plugin page, with the Install plugin button, example prompts, and the Superwall app and two skills it includes](/docs/images/agents-codex-plugin-install.jpg) 4. Start a new chat, then ask something like "Show the Superwall projects I can access." ### In the Codex CLI 1. Run `codex` in your terminal. 2. Enter `/plugins`, find **Superwall**, and install it. 3. Start a new session. The skills load when a session starts. ## What works where The plugin behaves a little differently depending on where your agent runs: | Where | What you get | | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | | Hosted chat, such as Claude on the web or in the desktop app, or ChatGPT | Account work through the MCP: inspecting your setup, comparing performance, explaining campaigns, and preparing changes for your review | | A local coding agent, such as Claude Code or the Codex CLI | Everything above, plus SDK integration, CLI commands, and live paywall editing through the skills | Work that needs your machine goes through the [Superwall CLI](/docs/agents/cli) instead of the MCP: setting up the SDK, building paywalls as code, and anything that signs in to Apple (see [CLI-only commands](/docs/agents/mcp#cli-only-commands)). The plugin uses the CLI if it's installed, but never installs it for you. To set it up once: ```bash npm install --global superwall superwall login ``` ## Data and privacy The MCP sends requests to Superwall on behalf of the signed-in user, using that user's permissions. The plugin has no background processes or automatic hooks. See the [privacy policy](https://superwall.com/legal/privacy-policy) and [terms](https://superwall.com/legal/terms-of-service/). ## Related * [Superwall MCP](/docs/agents/mcp): Install the MCP on its own, in any MCP-compatible client. * [Skills](/docs/agents/skills): Install the skills on their own. * [Superwall CLI](/docs/agents/cli): The command-line tool the skills use. # 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 # Review Your Setup Have an AI agent audit your Superwall integration and dashboard configuration, explain what's wrong, and fix it. An agent can check that your app and your dashboard are set up correctly, and help you find out why something isn't working. ## Recommended: `superwall review` From your app's folder, run: ```bash superwall review ``` The CLI runs the coding agent on your machine to audit your integration. It ranks what it finds by severity and writes proposed fixes to a plan file. Nothing changes without your say-so. To apply verified, safe fixes, add `--fix`: ```bash superwall review --fix ``` For a quick health check of your CLI login and project, run `superwall doctor`. See [Set up your app](/docs/agents/cli#set-up-your-app) in the CLI guide. ## With your own agent * **With the [plugin](/docs/agents/plugins) or [skills](/docs/agents/skills) installed,** ask your agent: "Review my Superwall integration and tell me what to fix." * **With just the CLI,** run `superwall review --skill` to print the review instructions for any agent. ## Debugging a specific problem For questions like "why isn't my paywall showing?", ask [Superwall AI](/docs/agents/superwall-ai) in the dashboard. It can read your campaigns, placements, and audiences and explain what it finds. With the [plugin](/docs/agents/plugins) or [Superwall MCP](/docs/agents/mcp) connected, your coding agent can do the same while it looks at your code. When an agent needs to trace how the SDK behaves, the [skills](/docs/agents/skills) let it clone the SDK source and read it. # 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 # AI Agent Skills Give AI coding agents up-to-date Superwall docs, authenticated API access, and hands-on control of the paywall editor using the Superwall Skills. The [Superwall Skills](https://github.com/superwall/skills) are a set of [Agent Skills](https://agentskills.io) that give AI coding agents everything they need to work with Superwall: live documentation, authenticated access to your account through the [Superwall CLI](/docs/agents/cli), guided SDK integration flows for every platform, and hands-on control of the paywall editor. > **Note:** This is different from [Superwall Agents](/docs/agents/superwall-agents), which is the Superwall Agents workspace for chats, analysis, automations, webhooks, and hosted machine work. The Superwall Skill is for giving AI coding agents Superwall docs, API access, and SDK guidance. The Skill can perform all of the tasks the [Superwall MCP](/docs/agents/mcp) can, and is recommended when you are working in an external coding agent. ## Installation In Claude, ChatGPT, and Codex, the [Superwall plugin](/docs/agents/plugins) installs the `superwall` and `superwall-editor` skills together with the [Superwall MCP](/docs/agents/mcp). Use the steps below to install the skills on their own, in any agent. Install with one command: ```bash npx superwall skills ``` The CLI shows a picker with every skill pre-selected. Press **Enter** and the skills install globally for every coding agent detected on your machine: Claude Code, Cursor, Codex, Gemini CLI, Copilot, Windsurf, and 70+ more. Run the same command again any time to update; it checks whether your installed skills are out of date first. To install specific skills, or force a reinstall: ```bash npx superwall skills --skill superwall # just one skill npx superwall skills --force # reinstall even if up to date ``` If you use the [Superwall CLI](/docs/agents/cli), you don't need to run this at all: `superwall login` installs the skills automatically and keeps them updated. You can also install straight from the repo with the [skills.sh](https://skills.sh) CLI, which is what `superwall skills` uses under the hood: `npx skills add superwall/skills`. ## What's included Three skills, each covering a different job: | Skill | What it does | | ------------------ | ---------------------------------------------------------------------------------------------- | | `superwall` | The Superwall expert: docs, account resources, analytics, App Store Connect, and SDK workflows | | `superwall-editor` | Hands-on control of the paywall editor session open in your browser | | `wwdc` | WWDC session lookup, comparison, transcripts, and timestamped citations | ### superwall The general-purpose skill teaches your agent to work through the [Superwall CLI](/docs/agents/cli), so everything runs against your real account: * **Live documentation**: fetched on demand from `llms.txt` and per-page markdown endpoints, so the agent always works from today's docs instead of training-data memory. * **Account resources**: apps, products, entitlements, campaigns, paywalls, users, and webhooks, listed and created via the CLI. * **SQL analytics**: ad hoc queries over your organization's ClickHouse analytics data with `superwall query`. * **App Store Connect workflows**: the full ASC API through Superwall's signed proxy, with schema lookup and local validation. * **SDK integration**: step-by-step integration flows for iOS, Android, Flutter, and Expo. * **Migration and review**: guided migration off RevenueCat, Adapty, or Qonversion, and integration audits before you ship. * **Dashboard links**: URL patterns for every dashboard page, so the agent can link you to the right place. * **SDK source cloning**: the agent can clone SDK repos locally to trace internal behavior when debugging. ### superwall-editor Attaches your agent to the paywall editor session open in your browser, using a pairing code. Once attached, the agent can build and restyle paywalls from a prompt, and edit onboarding and web2app flows live, while you watch the changes land in the editor. To pair: open **AI Chat** in the paywall editor, expand the agent connection panel, choose **Skill**, and paste the pairing prompt into your agent. See [Editor MCP](/docs/agents/editor-mcp) for the full flow. ### wwdc WWDC on tap: find and compare WWDC sessions, navigate full session transcripts, cite sessions with timestamps, and summarize what changed platform to platform. Powered by [wwdc.ai](https://wwdc.ai). ### Framework skills `superwall login` and `superwall skills` also install `superwall-framework`, the skill for building paywalls and other screens as code with the [Superwall Framework](/docs/framework), plus a few supporting design skills. See the [framework quickstart](/docs/framework/quickstart). ## Authentication The `superwall` skill authenticates through the official CLI, so resource and data commands run against your real account: ```bash npm install --global superwall superwall login ``` The session lives in `~/.superwall` and every command shares it. In CI, authenticate with an API key instead of a browser: `superwall login --api-key `. See the [Superwall CLI guide](/docs/agents/cli) for the full command reference. ## Quick start Ask your AI agent to integrate Superwall into your app. The agent will: 1. Detect your platform from the project structure (e.g., `Package.swift` → iOS, `pubspec.yaml` → Flutter). 2. Determine your purchase controller path, whether you're using Superwall's default purchase handling, RevenueCat, or a custom setup. 3. Walk through the integration steps, implementing each one in your codebase. Want the fully automated version? `npx superwall integrate` signs you up and integrates the SDK in one shot, driven by the Claude Code or Codex on your machine. See [Set up your app](/docs/agents/cli#set-up-your-app) in the CLI guide. ## Related * [Plugins](/docs/agents/plugins): The skills and the MCP in one install for Claude, ChatGPT, and Codex. * [Superwall CLI](/docs/agents/cli): The command line tool the `superwall` skill drives. * [Superwall Agents](/docs/agents/superwall-agents): For experiment analysis with connected Superwall tooling, automations, webhooks, and hosted machines. * [Superwall MCP](/docs/agents/mcp): For managing your Superwall account from AI tools. * [Editor MCP](/docs/agents/editor-mcp): For connecting external agents to the paywall currently open in the editor. * [AI Chat Builder](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-ai-chat): For using Superwall's built-in editor chat to build and refine paywalls. * [Use Superwall with AI](/docs/agents): Every AI tool for Superwall, and which one to pick. # 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 # Agent Automations Schedule recurring Superwall Agents prompts for experiment readouts, campaign checks, and reports, and write prompts that run unattended in the right timezone. Automations send a saved prompt to a chat on a schedule. Use them for recurring analysis and operational checks that should happen without someone remembering to ask. **Click** on **+ Create Automation** to get started: The Superwall Agents new automation dialog for scheduling a recurring prompt Set the prompt and schedule, and the agent will run the prompt at that time, and you can visit the results once they do in your chat history. Automations themselves are attached to chats. The scheduled prompt is sent back into that chat, so the result stays with the surrounding context. Some common automation requests might be: * Weekly experiment readout. * Daily campaign anomaly check. * Monday paywall opportunity report. * Trial conversion and billing issue review. * Weekly SDK integration health check. * Webhook delivery summary. * Churn or cancellation timing report. ### Create an automation from chat You can also ask the agent to schedule a recurring prompt: ```text Every Monday at 9 AM America/Chicago, analyze the previous week's experiment results and suggest the next three paywall tests. ``` The agent can configure the chat automation for you when the schedule is clear. ### Write automation prompts carefully Automated prompts should include enough context to run unattended: ```text Analyze the previous 7 days of onboarding campaign performance for the selected Superwall organization. Compare paywall conversion, trial conversion, paid conversion, and ARPU to the prior 7 days. Create charts, summarize notable changes, and recommend three experiments for the next week. ``` Avoid prompts that depend on follow-up questions: ```text Analyze the experiment we talked about. ``` ### Timezones Automations use the timezone saved with the schedule. If the exact business timezone matters, name it in the prompt and verify it in the automation dialog. ### Limitations Automations run without a person present. During automated turns, the agent cannot use interactive question or form tools. If the agent needs credentials, organization context, files, or a connected integration, configure those before the automation runs. ### Billing Scheduled chats require an active Superwall Agents subscription when they run through the hosted control plane. If billing is required, Superwall Agents will show a billing message instead of running the scheduled turn. # 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 # Billing and Usage Review Superwall Agents usage, subscription state, provider costs, and billing controls. Superwall Agents uses model providers, web search, hosted infrastructure, automations, and webhooks. Superwall Agents includes usage and billing pages so you can see activity and manage your subscription. The Settings Billing page for managing the Superwall Agents subscription ### Usage Open **Settings -> Usage** to review usage for the last 30 days. Usage updates periodically and is grouped by series, such as model and web search usage. Use this page to understand: * Which capabilities are driving usage. * How usage changed over time. * Which series contributed most in the last 30 days. ### Billing Open **Settings -> Billing** to manage your Superwall Agents subscription. The Billing page shows: * Current subscription state. * Current plan price. * Included monthly usage. * Overage terms. * Stripe billing controls. Use the billing page as the source of truth for current pricing and terms. ### When billing is required Billing may be required for hosted provider usage and unattended workflows, including: * Managed model provider usage. * Managed web search usage. * Scheduled chats. * Incoming webhooks. If billing is required, the agent will show a billing message instead of continuing the turn. ### Usage by chat Some usage views are scoped to chats. Use chat-level usage when you want to understand the cost of a specific analysis, automation, or investigation. # 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 # Start a Chat Start a Superwall Agents chat, attach files, and understand where chat state lives. The main unit of work in Superwall Agents is a chat. A chat keeps its own messages, model and reasoning settings, selected Superwall organization, automation, webhook configuration, attachments, generated files, and transcript history. The Superwall Agents welcome page with the composer, organization selector, model selector, reasoning selector, integrations, and suggested prompts ### Chat about focused actions, results, or experiments It helps to create one chat per coherent workflow, such as: * One experiment readout. * One SDK integration review. * One paywall iteration. * One weekly KPI report. * One webhook or automation investigation. Try to avoid mixing unrelated investigations in the same chat. However, the agent *can* use prior chat history as context, so focused threads produce better answers and analysis. ### Charts and other data visualizations Often, the agent will create charts to demonstrate its findings: A Superwall Agents chat showing generated charts and analysis output You can download the charts and expand them fullscreen by using the buttons in the top right of each chart or data visualization. ### Attach files The chat composer supports file attachments. Use attachments when you want the agent to analyze exports, screenshots, CSV files, logs, or design references. To attach them, simply drag and drop them on top of the chat. Examples: * Upload an experiment export and ask for a readout. * Upload a screenshot of a paywall and ask for copy or layout experiments. * Upload logs and ask the agent to find SDK integration issues. You can attach up to 10 files at a time. Uploaded files are made available to the hosted machine so the agent can use them during the turn. ### Queuing and steering If you send a message while the agent is already running, the message is queued. Use this when you want to add follow-up context without waiting. If the running turn is going in the wrong direction, steer it with a new instruction. Steering interrupts the current turn and restarts with your updated direction. ### Generated files Agents can generate files, show charts, and display artifacts in Superwall Agents. Use this for reports, CSV summaries, markdown writeups, scripts, implementation patches, segment comparisons, time series, experiment variants, revenue breakdowns, and outlier analysis. Ask for a specific artifact: ```text Create a markdown report summarizing the latest experiment, including charts, interpretation, and the next three tests we should run. ``` Generated files are available from **Files** in the left sidebar, so you can reopen or download them after the chat finishes. The Superwall Agents Files tab showing a generated file ready to open or download ### Transcripts The chat keeps transcript history so later turns can use earlier context. When you need prior decisions or historical context, ask the agent to search its transcripts: ```text Search our prior transcripts for decisions about onboarding paywall experiments, then summarize what we already tried and what we should do next. ``` # 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 Agents Files Browse, preview, and download files on your Superwall Agents hosted machine, including images, PDFs, markdown, JSON, code, and tables created in chats. The **Files** page shows files available on the active hosted machine. Use **Files** when you want to inspect your agent's hosted environment's files you've created through chats. The Superwall Agents Files tab showing a generated file ready to open or download All files created are listed, and can be opened in-place. The navigator includes options to refresh all files, and in some cases — files will have their own folder and directory. You can navigate through each of them here. ### Previews File previews use the same attachment preview system as chat. Images, videos, text, markdown, PDFs, JSON, code, and common tabular files can be inspected from the UI when the hosted machine can serve them. The Superwall Agents file preview view showing a generated file opened from Files If a file cannot be previewed inline, Superwall Agents opens it in a new tab. In the preview, you can download the file or view the raw source response that generated it. > **Warning:** Treat Files as a hosted machine file browser. Do not place secrets in files you ask the agent to inspect unless the agent truly needs them. Prefer [Settings -> Environment](/docs/agents/superwall-agents/settings#environment) for secret values. # 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 Agents Use Superwall Agents to analyze experiments, inspect your setup, automate reports, and turn Superwall data into growth work. Superwall Agents gives you an AI workspace for the growth work that usually takes the most digging: reading experiment results, finding patterns in your data, checking implementation details, and turning what it finds into the next thing to try. Use Superwall Agents from [superwall.ai](https://superwall.ai). Log in with your existing Superwall account to access all of your organizations and apps. A Superwall Agents workspace showing a chat analyzing experiment results, a chart, and suggested next experiments ### What you can do * **Analyze experiment results**: Ask what changed, which variant is winning, what segments are driving the result, and what the next test should be when your connected Superwall tooling exposes that data. * **Turn analysis into action**: Ask for concrete experiment ideas, paywall changes, campaign adjustments, or implementation checks. * **Inspect available code**: Connect GitHub, upload files, or clone a repo onto the hosted machine, then ask the agent to read files, run commands, and help debug SDK integration issues. * **Automate recurring work**: Schedule a prompt for a chat, such as a weekly experiment readout or a daily anomaly check. * **Connect external systems**: Use webhooks to trigger a chat from another service, and send chat events back to your own tooling. * **Generate artifacts**: Create charts, summaries, files, and reports that can be shared with your team. ### Start here 1. **[Workspace tour](/docs/agents/superwall-agents/workspace-tour):** Learn what the sidebar, composer, selectors, integrations, suggested prompts, and selected UI states do. 2. **[Create an agent chat](/docs/agents/superwall-agents/create-an-agent):** Start a focused chat, attach context, review generated artifacts, steer running work, and share useful conversations. ### Using agents 3. **[Automation](/docs/agents/superwall-agents/automations):** Schedule recurring prompts for reports, monitoring, experiment review, and other work that should happen on a cadence. 4. **[Webhooks](/docs/agents/superwall-agents/webhooks):** Trigger chats from external systems and send chat events back to your own tooling. 5. **[Sharing Chats](/docs/agents/superwall-agents/sharing-chats):** Share a completed conversation with teammates and manage the shared link. 6. **[Integrations](/docs/agents/superwall-agents/integrations):** Connect GitHub, Slack, skills, web search, models, and hosted machine environment variables. 7. **[Files](/docs/agents/superwall-agents/files):** Browse files available on the active hosted machine, open generated reports, and inspect uploaded or cloned context. 8. **[Terminal](/docs/agents/superwall-agents/terminal):** Run commands on the same hosted machine the agent can use. 9. **[Settings](/docs/agents/superwall-agents/settings):** Configure defaults, environment variables, machines, usage, billing, webhooks, keybindings, and account controls. ### Misc 10. **[Billing and usage](/docs/agents/superwall-agents/billing-and-usage):** Review usage, understand how work is counted, and manage the subscription attached to your account. 11. **[Troubleshooting](/docs/agents/superwall-agents/troubleshooting):** Resolve common setup, machine, integration, file, webhook, billing, and chat issues. 12. **[Recipes](/docs/agents/superwall-agents/recipes):** Try prompts for experiment analysis, campaign review, implementation checks, recurring reports, and follow-up ideas. # 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 # Agent Integrations Connect Superwall Agents to Superwall, GitHub, Slack, provider tools, skills, and hosted machine environment variables. Integrations give agents more useful tools. Some are preconfigured in Superwall Agents. Others require you to connect an account or add environment variables. The Superwall Agents Integrations page showing available connections and installed skills ### Preconfigured integrations Agents have these integrations preconfigured: * **Superwall**: Provides the selected organization ID and managed API key to new turns when you select an organization. * **Exa**: Enables web search and web fetch tools when available. * **OpenRouter**: Powers the model provider connection when available. If an agent reports that provider access is missing, check [Billing and Usage](/docs/agents/superwall-agents/billing-and-usage) or add your own provider keys in the environment. ### GitHub Connect GitHub when agents need to: * Receive GitHub credentials on the hosted machine. * Work with repositories through the installed machine tooling. * Use GitHub-aware skills or command-line tools when those are available. Open **Integrations**, then choose **GitHub**. After OAuth completes, Superwall Agents makes GitHub credentials available to new agent turns on the hosted machine. ### Slack Connect Slack when agents need to: * Receive a Slack bot token on the hosted machine. * Send channel updates or direct messages through Slack-aware tooling. * Reference Slack context when installed tooling supports it. Open **Integrations**, then choose **Slack**. After OAuth completes, Superwall Agents makes Slack credentials available to new agent turns on the hosted machine. ### Skills Skills add specialized instructions and tools for agents. The Integrations page lets you search, install, and uninstall global skills. Use the search field to find skills by name or workflow. When you find the one you want, click **Get** to install it for future agent work. The Superwall Agents Integrations page showing the skills search field and install controls Install skills when you want repeatable workflows, such as: * Superwall SDK integration guidance. * Platform-specific implementation steps. * Internal company workflows. * Code review or release processes. The [Superwall Skill](/docs/agents/skills) is recommended when you want an agent to use live Superwall docs, API helpers, and SDK quickstarts. # 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 # Agent Prompt Recipes Try prompts for experiment analysis, campaign review, implementation checks, recurring reports, and next-test planning. Recipes are prompts you can use as a starting point. Copy one into Superwall Agents, then swap in your app, campaign, placement, date range, or segment. Good prompts name the business question and the decision you want to make. Ask for the analysis, the evidence, and the next step. ### Experiment analysis Use these when you want to understand what changed and what to test next. ```text Analyze the latest experiment results for our onboarding paywall. Tell me what changed, which variant is winning, which segments look different, and what experiment we should run next. ``` ```text Analyze the latest paywall experiment. Which variant is winning, what segment differences matter, and what should we test next? ``` ```text Compare paywall conversion, trial conversion, and ARPU over the last 30 days by country and demand score bucket. Show charts and call out the biggest opportunities. ``` ### Campaign and placement review Use these when you want to find weak spots in campaign performance. ```text Find campaigns with strong traffic but weak paywall conversion. Group by placement and suggest the highest-leverage changes. ``` ```text Compare trial conversion and ARPU by country over the last 30 days. Show charts and recommend where we should run localized paywall tests. ``` ```text Look at users who saw paywalls multiple times but did not convert. What patterns do they share, and what experiment could address them? ``` ### Implementation checks Use these when your app repo is available and you want the agent to compare implementation details against your Superwall setup. ```text Inspect the iOS repo connected through GitHub and verify that our Superwall SDK integration correctly identifies users, resets on logout, registers placements, and handles subscription status. ``` ```text Inspect the connected iOS repo and verify that the Superwall SDK integration matches our selected application. Check configuration, identify/reset behavior, placement registration, and subscription status handling. ``` ```text Find every placement registered in that repo and compare it to our campaign setup. Call out missing, unused, or inconsistently named placements. ``` ### Recurring reports Use these when the same analysis should happen on a schedule. ```text Every Monday at 9 AM America/Chicago, review the previous week's experiment results and suggest three next tests with expected impact and risks. ``` ```text Analyze the previous 7 days of onboarding campaign performance. Compare paywall conversion, trial conversion, paid conversion, and ARPU to the prior 7 days. Create charts, summarize notable changes, and recommend three experiments for the next week. ``` ### Multi-app or multi-project work If you work across multiple apps or organizations, name the target directly in the prompt. ```text For the Acme Fitness iOS project, analyze onboarding campaign performance for the last 14 days and suggest the next experiment. ``` # 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 Agents Settings Configure Superwall Agents defaults, environment variables, machines, usage, billing, webhooks, keybindings, and account actions. Open **Settings** from the bottom of the sidebar. Settings is where you configure defaults and account-level behavior after the basic chat workflow is working. The Settings page showing the settings tabs for General, Environment, Machine, Usage, Billing, Webhooks, Keybindings, and Account ### General Use **General** for app-level defaults. * **Theme**: Choose light, dark, or system appearance. * **Agent Defaults model selector**: Sets the default model for new chats. * **Agent Defaults reasoning selector**: Sets the default reasoning effort for new chats. * **Stream Responses switch**: Shows assistant text as it is generated. When disabled, responses appear after the turn finishes. Changing a default does not rewrite old messages. It affects new chats and future turns that inherit the default. ### Environment The Settings Environment page for adding and saving environment variables Use **Environment** for variables that tools on the hosted machine can read. * **Variable name field**: Enter a shell-safe variable name such as `OPENROUTER_API_KEY`. * **Value field**: Enter the value to make available to new agent turns. * **Remove variable**: Deletes that variable row. * **Add Variable**: Adds another name/value row. * **Save**: Persists unsaved environment changes. Some integration variables are reserved. `SUPERWALL_API_KEY` comes from the organization selector. `GH_TOKEN`, `GITHUB_TOKEN`, and `SLACK_BOT_TOKEN` come from the GitHub and Slack connection flows. > **Note:** **Need a Superwall API key?** In Superwall Agents, select your organization in > the chat header. Agents provides a managed organization API key to new turns, > so you usually do not add `SUPERWALL_API_KEY` here. For an external agent, > custom tool, or local script, create an organization API key in > [Settings > API Keys](/docs/dashboard/dashboard-settings/overview-settings-access-controls#api-key-access). > Do not use the public `pk_` SDK key for server or API access. > **Warning:** Do not paste secret values into chat. Store them in Environment so tools can > use them without adding the secret to conversation history. ### Machine The Settings Machine page for managing hosted machines Use **Machine** to manage the hosted machine where agent tools run. * **Add Machine**: Creates a hosted machine. * **Activate machine**: Makes a machine active for chat, Files, Terminal, automations, and webhooks. * **Current machine**: Indicates the active hosted machine. * **Rename**: Renames a hosted machine. * **Reconnect**: Reconnects the active machine. * **Update**: Updates the active hosted machine when available. * **Delete**: Deletes a hosted machine. The hosted machine has its own filesystem and environment. To work with code or private files, connect GitHub, clone a repo from Terminal, upload files in chat, or add the needed environment variables before asking the agent to use them. ### Usage The Settings Usage page showing recent Superwall Agents usage Use **Usage** to understand recent usage. * **Series chips**: Toggle individual usage series on or off in the chart. * **Usage chart**: Shows usage over the last 30 days. * **Totals table**: Shows last-30-days totals by series. Usage updates periodically, so treat it as operational visibility rather than a real-time meter. ### Billing The Settings Billing page for managing the Superwall Agents subscription Use **Billing** to manage the Superwall Agents subscription. * **Manage**: Opens the billing portal. * **Subscribe**: Starts subscription checkout. * **Subscribed**: Indicates the subscription is already active. See [Billing and Usage](/docs/agents/superwall-agents/billing-and-usage) for more detail. ### Webhooks The Settings Webhooks page showing existing webhook configurations Use **Webhooks** to connect chats with external systems. See [Webhooks](/docs/agents/superwall-agents/webhooks) for payload examples and more. ### Keybindings The Settings Keybindings page for customizing Superwall Agents shortcuts Use **Keybindings** to customize global app shortcuts. Keybindings are stored in the active keybindings file shown by the hosted machine. ### Account The Settings Account page showing signed-in account details and account actions Use **Account** for browser-session and account actions. * **Signed In**: Shows the current browser session email. * **Name**: Shows the signed-in user and authorization scope. * **Delete**: Deletes Superwall AI account data for the current browser session, including hosted machine records and sandboxes, hosted chats and files, Superwall organization selection, GitHub and Slack integrations, shared chat data, process history, and the current auth session. * **Sign out**: Ends the current hosted frontend browser session. > **Warning:** Deleting an account is destructive. Managed provider keys and Superwall > organization API keys are preserved. # 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 # Sharing Chats Share completed Superwall Agents conversations with teammates and manage shared links. Use sharing when you want teammates to review a completed analysis. Shared transcripts are handled by Superwall Agents and should be treated like any other business artifact that may contain customer, product, or account context. The Superwall Agents share dialog with controls for sharing and copying a conversation link ### Share dialog controls * **Re-share**: Makes the conversation available through a share link. * **Copy link**: Copies the share URL so you can send it to teammates. * **Open**: Opens the shared version in a new tab. * **Remove**: Turns off access to the shared conversation. ### When to share Share conversations after the agent has produced something useful enough for another person to inspect, such as an experiment readout, a generated report, or a list of recommended tests. If the conversation changes after you share it, update the shared version before sending the link again. # 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 # Agent Terminal Open a shell on your Superwall Agents hosted machine to run commands, work inside a cloned repo, check generated files, and debug environment variables. The **Terminal** page gives you a shell connected to the active hosted machine. Use it to inspect the environment, change into a repo, run commands, verify generated files, or debug files the agent can use. The Terminal page showing a shell connected to the active hosted machine with split terminal controls ### How to use Terminal Use Terminal when you want direct control over the hosted machine. You can check or change the current directory, run commands the agent suggested, or debug environment variables, auth, or network access. The agent can also use shell tools during a chat. In addition, you can open multiple terminals at once: The Superwall Agents Terminal page showing multiple terminal panes ### Machine context Commands run on the active hosted machine. The global Terminal page starts from the machine's home context. Use `cd` when you want to work inside a specific repository. Remember to work safely. The terminal is powerful because it can mutate files, start servers, install packages, and run project scripts. Use it for verification and debugging, but be explicit when asking the agent to run destructive commands. If a command needs a secret, put the value in [Settings -> Environment](/docs/agents/superwall-agents/settings#environment) instead of pasting it into chat. # 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 Agents Troubleshooting Fix common Superwall Agents problems: machines that aren't ready, missing files, automations or webhooks that don't run, and disconnected GitHub or Slack. Use this page when Superwall Agents cannot connect, an agent turn fails, or a scheduled or webhook workflow does not run. ### The hosted machine is not ready Open **Settings -> Machine** and check the active machine status. If there is no machine, click **Add Machine**. If the machine is provisioning or reconnecting, wait for it to become ready, then refresh [superwall.ai](https://superwall.ai). ### The agent cannot see my files Hosted machines cannot see files on your laptop unless you upload them through chat, clone a repository, connect GitHub, or otherwise make them available to that machine. If the file is in a repository, connect GitHub or clone the repo from Terminal. If it is a one-off file, attach it in the composer. ### An automation did not run Check: * The automation is enabled. * The schedule has the correct days, time, and timezone. * The chat still exists. * The selected machine is reachable. * Required environment variables and integrations are configured. * Billing is active if required. ### An incoming webhook did not trigger a chat Check: * The webhook still exists in **Settings -> Webhooks**. * You are posting to the incoming URL for the correct chat. * The payload includes a `text` field. * The selected machine is reachable. * Billing is active if required. ### An outgoing webhook is not received Check: * The outgoing URL is a valid `http` or `https` URL. * Your endpoint accepts `POST` requests. * Your endpoint accepts JSON. * Your endpoint validates `X-Superwall-Webhook-Secret` only if you configured a secret. * The webhook row does not show a `lastError`. ### GitHub or Slack is disconnected Open **Integrations**, reconnect the service, and start a new agent turn. Existing running turns will not automatically inherit newly connected credentials. ### Environment variables are not available Open **Settings -> Environment**, confirm the variable name follows shell naming rules, and save the settings. New agent turns inherit the updated environment. # 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 # Agent Webhooks Trigger Superwall Agents chats from external systems with incoming webhooks, and send turn_start, message, tool_result, and turn_end events to your endpoint. Webhooks connect a chat to other systems. Create a webhook from the chat you want to connect, then manage all of your webhook configurations from **Settings -> Webhooks**. When you create a webhook from an existing chat, Superwall Agents preselects that chat for the webhook under the hood: The Superwall Agents webhook dialog for configuring incoming and outgoing webhook URLs When you create one from **Settings -> Webhooks**, you can choose any of your previous chats to associate the webhook to. Use incoming webhooks to send a message into a chat from an external service. Use outgoing webhooks to receive events as the agent works. ### Incoming webhooks An incoming webhook sends a new message to a chat. Use it when an external system should trigger analysis: * A data pipeline finishes an experiment export. * A campaign metric crosses a threshold. * A support issue references a billing or paywall problem. * A deployment finishes and needs a Superwall integration check. * A scheduled external job wants the agent to summarize new data. Example request: ```bash curl -X POST "$INCOMING_WEBHOOK_URL" \ -H "Content-Type: application/json" \ -d '{ "text": "Analyze this experiment export and recommend the next three tests.", "attachments": [ { "url": "https://example.com/experiment-results.csv" } ] }' ``` The `text` field is required. Attachments are optional. > **Warning:** Incoming webhook turns are unattended. The agent cannot ask follow-up > questions or show forms during those turns, so include the organization, > project, time range, and expected output in the webhook message. ### Outgoing webhooks An outgoing webhook sends chat events to your endpoint. Configure it when another system should receive agent progress or results. Outgoing events include: * `turn_start` * `message` * `tool_result` * `turn_end` Example event shape: ```json { "id": "evt_...", "type": "turn_end", "chatId": "chat_...", "turnId": "turn_...", "source": "user", "timestamp": 1760000000000, "turn": { "status": "success", "durationMs": 42000 } } ``` If you configure a secret, Superwall Agents sends it in the `X-Superwall-Webhook-Secret` header. ### Create a webhook from a chat 1. Open the chat you want to connect. 2. Click the webhook control in the chat header. 3. Copy the incoming URL if another service should send messages into the chat. 4. Add an outgoing URL if your service should receive chat events. 5. Optionally add an outgoing secret. 6. Save the webhook. Creating the webhook from the chat keeps the configuration attached to the right conversation from the start. ### Manage webhooks from settings The Settings Webhooks page showing existing webhook configurations Open **Settings -> Webhooks** when you want to review or edit every webhook in one place. From there, you can create a webhook for any eligible chat, copy URLs, edit outgoing settings, or delete a webhook. > **Note:** Incoming webhooks can attach up to 10 files by URL. ### Useful patterns ### Experiment export pipeline Send an incoming webhook when an export is ready: ```json { "text": "Analyze the attached experiment export. Create a readout with charts, conclusion, and next experiments.", "attachments": [ { "url": "https://example.com/exports/onboarding-experiment.csv" } ] } ``` ### Incident or anomaly triage Send a webhook when a metric falls outside an expected range: ```json { "text": "Paywall conversion dropped below the alert threshold for the onboarding campaign. Investigate likely causes and recommend next steps." } ``` ### Internal reporting Use outgoing webhooks to send completed agent messages or turn-end events into your reporting pipeline. ### Billing Incoming webhooks require an active Superwall Agents subscription when they run through the hosted control plane. # 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 # Workspace Tour Learn what every primary Superwall Agents control does before moving into deeper workflows. Superwall Agents starts with one simple action: send a prompt. The rest of the workspace adds context, tools, files, schedules, and account settings around that prompt. The Superwall Agents home screen with numbered callouts for the sidebar, composer, organization selector, model selector, reasoning selector, integrations, and example prompts ### Start screen The annotated controls above are the ones you will use most often during a chat: 1. **Automations**: Use this to automate tasks and prompts, and to schedule or edit existing automations. 2. **Webhooks**: Open the webhook settings for the current chat so external systems can trigger it or receive updates from it. 3. **Share**: Share the current conversation when you want someone else to review the transcript or output. 4. **Prompt box**: Type the work you want the agent to do. Use it for analysis, implementation checks, reports, or experiment ideas. 5. **Send arrow**: Start the next turn. If the agent is already working, this control changes state so you can stop or steer the turn. 6. **Organization selector**: Choose which Superwall organization the agent should use for the conversation. 7. **Model selector**: Choose the model for this chat. Use stronger models for ambiguous analysis and debugging. 8. **Reasoning selector**: Choose how much reasoning effort the model should use. Higher effort is useful for experiment analysis, architecture work, and multi-step debugging. ### Sidebar The Superwall Agents sidebar with navigation items for New Chat, Integrations, Files, Automations, Terminal, chats, and Settings The sidebar is the main navigation for the workspace. * **Collapse sidebar**: Hides the sidebar on desktop. Use the matching expand control to bring it back. * **Top New Chat icon**: Returns to the new chat screen. * **New Chat**: Opens the new chat screen and makes it the active sidebar item. * **Integrations**: Opens account and tool connections, including GitHub, Slack, and Skills. See [Integrations](/docs/agents/superwall-agents/integrations). * **Files**: Opens the file browser for the active hosted machine. See [Files](/docs/agents/superwall-agents/files). * **Automations**: Opens scheduled prompts for chats. See [Automations](/docs/agents/superwall-agents/automations). * **Terminal**: Opens a terminal connected to the active hosted machine. See [Terminal](/docs/agents/superwall-agents/terminal). * **Chats**: Shows saved chats for the active workspace. Select a row to reopen a chat. * **Settings**: Opens account, model defaults, environment variables, machines, usage, billing, webhooks, keybindings, and account controls. See [Settings](/docs/agents/superwall-agents/settings). # 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 AI Ask questions about Superwall, your account, and your data with Superwall AI, the assistant built into the dashboard, the docs, and superwall.com. Superwall AI is the assistant built into the dashboard. Ask it how anything in Superwall works, what's in your account, or what your data says, and it goes and finds out: it reads the docs, checks SDK source code, calls the Superwall API for your organization, and runs analytics queries, then answers with links so you can keep exploring. It's also useful for more than troubleshooting: ask how a paywall is performing or where conversion dropped, and it will pull the data, chart it, and point out what stands out. > **Note:** Superwall AI is different than [Superwall Agents](/docs/agents/superwall-agents). This is built-in, with no setup or limits, and it's automatically aware of your context. You can use both services. Superwall Agents is great for more capabilities, while Superwall AI is perfect for in-context answers right in the moment. ## Opening it Click the chat bubble in the bottom-right corner of the dashboard: ![The Superwall dashboard with the Superwall AI launcher bubble in the bottom-right corner.](/docs/images/ai_dash_button_bottom_right.jpg) The assistant opens in a panel docked to the right, pushing the dashboard aside rather than covering it. Drag the panel's left edge to resize it; it stays with you as you move around the dashboard, and the ✕ in its top bar closes it. ![The Superwall AI panel open in the dashboard, showing the page-context chip, the composer, the model picker, and suggested prompts.](/docs/images/ai_dash_expanded.jpg) ## What you can ask * **How Superwall works**: Concepts, setup, best practices, and SDK behavior. Answers are grounded in the live docs and the SDK source code, and include links to the pages it used. * **Your account**: Projects, apps, campaigns, paywalls, products, and entitlements. The assistant reads them through the Superwall API, scoped to your organization. * **Your data**: Plain-English analytics questions. It writes and runs queries against your organization's analytics data, the same data behind [Query ClickHouse](/docs/dashboard/guides/query-clickhouse). The suggested prompts in the panel are good starting points: ARPU by user attributes, cancellation timing, converters versus non-converters. It can also link you directly to the right dashboard page, and search the web when a question needs outside information. ## Page context The chip above the composer shows the page you're currently viewing: ![The Superwall AI panel on the Quickstart page, with the page-context chip reading Quickstart.](/docs/images/ai_dash_context_aware_url_1.jpg) Move somewhere else, like Products & Entitlements, and notice the chip updates on its own. The assistant is always looking at what you're looking at: ![After navigating to Products & Entitlements, the page-context chip now reads Products.](/docs/images/ai_dash_context_aware_url_2.jpg) It uses that context to tailor answers to where you are, so "why is this empty?" means something. Remove the chip with its ✕ when you want a question answered without it. On the docs site it goes a step further and reads the content of the page you're viewing, so you can ask directly about whatever is on screen. ## Choosing a model The composer's model picker switches the underlying AI model: Sonnet is the default, with Opus, GPT, Grok, and Kimi available, plus a reasoning-effort setting for harder questions. Superwall keeps each option pointed at the latest version of that model family automatically. ## Chats Conversations persist: reopen the panel and your last chat is right where you left it. The list icon in the top bar shows your chat history, and the pencil starts a fresh chat. Chats are private to you and stored per browser: teammates never see them, and a different browser or device starts with a fresh history. You can also share conversations with colleagues. Click the share icon to generate a public link: ![The Superwall AI panel with the share icon in the top bar, generating a public link to the conversation.](/docs/images/ai_dash_share.jpg) ## On the docs site and superwall.com The same assistant is available outside the dashboard: the floating bubble in the bottom-right of the [docs](https://superwall.com/docs) and superwall.com, and the **Ask AI** button in the docs search dialog, which hands your search straight to it. Outside the dashboard it answers Superwall questions from the docs and SDK source; connect from the dashboard when you want it working with your account and analytics data. ## Related * [Superwall Agents](/docs/agents/superwall-agents): The separate superwall.ai workspace for hosted machines, automations, and webhook-driven work. * [Query ClickHouse](/docs/dashboard/guides/query-clickhouse): Direct SQL access to the same analytics data Superwall AI queries for you. * [Plugins](/docs/agents/plugins): Give Claude, ChatGPT, or Codex the same Superwall knowledge and account access. * [Superwall MCP](/docs/agents/mcp): Manage your account from MCP-compatible AI tools. * [Use Superwall with AI](/docs/agents): Every AI tool for Superwall, and which one to pick. # 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 # Changelog Release notes for the Superwall Android SDK ## 2.10.1 ## Fixes * Fixes a paywall saved again under the same identifier as the one on screen, after that one was removed or replaced, being treated as the paywall on screen. It could then survive a cache reset that should have cleared it. * Fixes test mode leaving out entitlements bought during the session when the tester had also chosen an active entitlement in the test mode modal. * Keeps paywall content clear of side navigation bars in landscape by applying horizontal system-bar insets to drawer, modal and fullscreen presentations. Insets update when the device rotates back to portrait. * Fixes a `:sw-none` product being bought with a free trial when its base plan had a trial offer. The paywall showed the full price, but the SDK's purchase flow picked the longest trial, as it does for `:sw-auto`. This affected apps without a `PurchaseController` since 2.7.0. One-time products with `:sw-none` were also bought with a discount offer when their purchase option had one. If you use a `PurchaseController`, a `null` `offerId` means the base plan with no offer; don't pick a trial or other offer yourself. ## 2.10.0 ## Breaking changes * The constructors of SDK-internal classes are now `internal`, because `Superwall.configure` builds them: `AutomaticPurchaseController`, `TransactionManager`, `StoreManager`, `DeviceHelper`, `IdentityManager`, `LocalStorage`, `AppSessionManager`, `PaywallRequestManager`, `DeepLinkRouter`, `DebugManager`, `DebugView`, `TestMode` and `SWWebView`. The public overload of `SurveyManager.presentSurveyIfAvailable` is removed, and `ApiFactory.track` no longer has a default body. None of these were documented API; configure the SDK with `Superwall.configure` and use `Superwall.instance`. ## Enhancements * Adds `LogScope.billing` for the SDK's Google Play Billing logs. `LogScope.storeKitManager` is deprecated; setting it in `SuperwallOptions.logging.scopes` still enables the billing logs. ## Fixes * Fixes purchases of custom store products from a paywall doing nothing. The paywall was never told the custom products' ids, so its `purchase` message had no product identifier and the SDK dropped it. Custom products are now sent to the paywall with their product identifier, and a `purchase` message without an identifier is resolved from the product's name on the paywall. A paywall message the SDK can't parse no longer drops the other messages sent with it. * Fixes the entitlements of a custom store product purchase (`StoreProduct.isCustomProduct`) not reaching the app until its next launch. After a successful custom purchase the SDK now asks Superwall for the user's entitlements in the background, as it already does after a Google Play purchase, so the entitlements your server reported for the purchase are picked up. It doesn't delay the purchase result or the paywall's dismissal. A background entitlements request whose user changed while it was in flight, after `identify` or `reset`, is now discarded instead of being applied to the new user. * Fixes transaction events for custom store products (`StoreProduct.isCustomProduct`) reporting `store: "PLAY_STORE"`. They now report `CUSTOM`, so analytics no longer count purchases made through your own checkout as Google Play revenue. * Fixes no paywall opening for the rest of the session, with every `register()` failing with "Paywall Already Presented", after the paywall activity was finished while it was in the background. This happened when the app's task was cleared while the paywall was stopped, for example by opening a `singleTask` root activity from a deep link or notification. The paywall is now dismissed when its activity is finished in the background, and the handler gets `onDismiss`. * Fixes a misleading `Error Evaluating JS` error log, with `java.lang.Exception: null`, after every message the SDK posts to a paywall, such as a custom callback's result. Android reports a script's return value, and these scripts return nothing, so the log appeared even when the message was delivered. It is no longer logged in that case. * Fixes observer-mode purchases going untracked when `SuperwallOptions.shouldObservePurchases` is on and only one purchase is in progress. A completed purchase now tracks `transaction_complete` and refreshes the receipt, and a cancelled one tracks `transaction_abandon`; before, both were dropped with an error log. Observer-mode charts can show more transactions after this release. * Fixes observer-mode tracking stopping for the rest of the session when `SuperwallOptions.shouldObservePurchases` is on and Play reported a cancelled or failed purchase while no purchase was being observed. The purchase listener crashed on it; such results are now ignored. * Fixes trial reminders and other paywall notifications never being scheduled for a paywall embedded in the app's own Activity, such as one shown with `PaywallComposable`. Notifications were only scheduled when the paywall was shown in a `SuperwallPaywallActivity` or in-window; the SDK now asks the embedding Activity for the notification permission and schedules them there. * Fixes preloaded paywalls continuing to animate while off screen. A cached paywall's webview reported its page as visible, so its animations (Lottie, CSS, `requestAnimationFrame`) kept running unseen on the renderer thread every webview in the app shares, slowing the paywall on screen and the host app. A paywall is now paused once it has loaded while off screen, and resumed when it is presented. * Fixes `CustomerInfo` and entitlements naming the first configured base plan, with an expiry based on that plan's period, when a Google Play subscription has several base plans. The SDK now saves the product that was bought against its purchase token. When it can't know the plan, such as after a reinstall or for a purchase made before this fix, `productId` and `latestProductId` are the Play subscription ID and the expiry dates are `null`. Those users keep their access, and a plan that was recorded now also decides which entitlements the purchase unlocks. ## Deprecations * Deprecates `LogScope.storeKitManager` in favour of `LogScope.billing`. Billing logs are now reported with the scope `billing`, so a `SuperwallDelegate.handleLog` implementation that matches the scope string `"storeKitManager"` should match `"billing"` instead. * Deprecates the unused iOS-port types `com.superwall.sdk.billing.StoreProductType`, `StoreKit`, `StoreKitManagerInterface`, `ProductPurchaser`, `TransactionRestorer`, `Purchasing` and `TransactionVerifierFactory`. They will be removed in a future release. `GetProductsResponse` is unchanged. ## 2.9.0 ## Enhancements * Adds install attribution matching. If the app has performance marketing integrations set up on the Superwall dashboard, the SDK matches the install to the ad click that led to it and tracks an `attribution_match` event. The resulting `acquisition_*` attributes are added to user attributes, so they can be used as breakdowns and filters in charts and audiences, and they carry over to new users after `identify` or `reset`. The match runs once per install, within 7 days of install, only when the dashboard has turned it on for the app, and never blocks startup. It uses the Play install referrer's click id when present. It is skipped while `eventTrackingBehavior` is `NONE` and runs if tracking is turned back on. On the first launch, a paywall whose audiences use `acquisition_*` attributes waits up to 2 seconds for a match that's still running. * Adds best-effort public IPv4 and IPv6 device attributes for apps using the Superwall MMP, and the IPv4 attribute for apps that set an AppsFlyer ID. Apps that use the MMP or set an AppsFlyer ID should declare IP address collection in their Play Console data safety form. * Adds `SuperwallOptions.adConsent` and `Superwall.instance.adConsent` for reporting the user's ad measurement consent (`AdConsent.Custom(adUserData, adPersonalization)`, each an `AdConsentStatus` of `Granted` or `Denied`). It is sent as the `adUserDataConsent` and `adPersonalizationConsent` device attributes and forwarded with the conversions Superwall uploads to Google Ads and Meta. While `adConsent` is `AdConsent.Unspecified`, the default, the SDK uses the consent stored by an IAB TCF consent banner when GDPR applies, and otherwise defaults to granted; apps with users in the EEA, UK or Switzerland that don't use a TCF banner should set it from their consent flow. Where the values came from is reported in the new `adConsentSource` device attribute (`developer`, `tcf` or `default`). Both are reported as denied when `eventTrackingBehavior` is `NONE`. * Adds subscription replacement. When a paywall's Purchase action is set to replace an existing subscription, the purchase upgrades, downgrades or switches the user's active Google Play subscription that shares an entitlement with the new product, instead of buying a second one. The replacement mode (store default, charge the prorated difference now, or charge the full price now) maps to Google Play's `SubscriptionUpdateParams`. Users without such a subscription make a normal purchase. * Adds `PurchaseController.purchase(activity, product, basePlanId, offerId, replacement)`. Its `ProductReplacement` carries the mode and the old product's ID and purchase token, so a custom `PurchaseController` can perform the replacement. The default implementation ignores it and calls the existing `purchase` method. * Adds `Superwall.instance.setPushToken(token)` to register the device's Firebase Cloud Messaging token with Superwall, so Superwall can send it push notifications. Call it from your `FirebaseMessagingService.onNewToken` and with `FirebaseMessaging.getInstance().token` at startup, after `Superwall.configure`: `Superwall.instance` throws before it, so if `onNewToken` can run before your app configures Superwall, keep the token and pass it in once you have. It's safe to call on every launch: an unchanged token is only sent again once a day. The SDK has no Firebase dependency and doesn't request notification permission itself. Along with the token, Superwall receives whether the app can post notifications, which is checked again whenever the app comes to the foreground. The token only travels to Superwall's servers: it doesn't appear in `SuperwallDelegate.handleSuperwallEvent`, `SuperwallDelegate.handleLog`, user attributes or audience filters. Nothing is sent until Superwall notifications are turned on for your app, and nothing is sent while `eventTrackingBehavior` is `NONE`. * Adds `Superwall.instance.optOutOfNotifications()` and `optInToNotifications()` to stop and resume Superwall push notifications for the device. The choice is remembered across launches, `reset()` and `identify(userId)`. * Adds `Superwall.instance.handleNotificationOpen(intent)` and `handleNotificationOpen(data)` to measure opens of the notifications Superwall sends. Call them only when the user taps a notification, never from `onMessageReceived` for a delivery, which would count deliveries as opens. Pass the intent that opened your activity from the tap, or the tapped notification's data map; notifications Superwall didn't send are ignored. The intent works as is for notifications FCM displays itself, whose tap intent carries the data keys as extras; if your app builds the notification in `onMessageReceived`, copy the `sw` data value into the extras of the tap `PendingIntent`. ## Fixes * Fix a failed `/events` request logging every queued event's parameters to `SuperwallDelegate.handleLog`. It now logs the event count and names only. A cache entry that can't be decoded no longer logs its stored contents either. * Fix web checkout codes passed through the Play install referrer never being redeemed. A code is now redeemed once, on the first launch after install. * Fixes a band of the host window showing beside the display cutout around a Fullscreen, Push or no-animation paywall shown with `PresentationHost.IN_WINDOW`. The in-window host padded the paywall for the cutout as well as the system bars; it now pads for the system bars only, as `SuperwallPaywallActivity` does, and the paywall clears the cutout with its CSS safe-area insets. * Fixes paywalls not running post-purchase actions (e.g. navigating to a thank-you page) after a one-time product purchase, because `transaction_complete` was only sent to the paywall for subscriptions. * Fixes `getProducts()` (and other network-backed suspend APIs) not being main-safe: network requests now always run on `Dispatchers.IO`, so the `/products` fallback no longer fails with `NetworkOnMainThreadException` when called from the main thread. * Fixes `reset()` and switching users deleting every top-level file in the host app's cache directory. Reset now only clears Superwall's own user-scoped storage. * Fixes the previous user's experiment assignments, paywall view counts, customer info, transaction history and survey assignment carrying over to the next user after `reset()` or `identify()` with a different user. The cached config and enrichment are kept. * Fixes storage writes not being atomic: a process kill mid-write could empty a stored value (e.g. the user's alias or seed). Writes now go through `AtomicFile`, and the in-memory cache is thread-safe. * Fixes config retries waiting forever on devices connected over Ethernet, a VPN or any network other than Wi-Fi or cellular. Any network with internet access now counts, and the wait is capped at 30 seconds. * Fixes one product ID that Google Play doesn't return (e.g. not live yet) making every later product load fail until the app was restarted. Missing products are left out of the result and asked for again after 5 minutes. * Fixes renewing subscribers being reported with an `EXPIRED` `latestSubscriptionState` and a wrong expiry date (the first period's end) after their first renewal. Google Play doesn't give the client an expiry date, grace period or account hold, so the device no longer guesses them: a purchased subscription is `SUBSCRIBED`, and a pending purchase is no longer reported as revoked or in a grace period. * Fixes observer mode dropping successful purchases and, after a cancelled or failed purchase it wasn't tracking, ignoring every later purchase. Each observed purchase is handled once, whether it's reported by Google Play or through `Superwall.instance.observe`. * Fixes a failed Google Play read (e.g. billing still connecting at launch) being treated as "no purchases": stored receipts and customer info are no longer overwritten, and `latestSubscriptionState` is no longer set to `EXPIRED`. Play subscribers stay active through a failed read for up to one subscription period after Play last confirmed their purchase. * After `reset()` or switching users, the new user's purchase history and device customer info are rebuilt from Google Play straight away instead of staying empty until the next purchase or restore. * Fixes the SDK connecting two Google Play billing clients when no `PurchaseController` is set, which processed every purchase twice. `AutomaticPurchaseController` now uses the SDK's single billing connection. * Fixes a blank screen when the app's process is recreated with a paywall on top and Superwall is configured after `Application.onCreate`. The paywall activity now closes. * Fixes `PaywallComposable` not loading a new paywall when its `placement` changes, and crashing when it isn't hosted in an `Activity`. * The restore-failed alert and `PaywallComposable`'s default error are now localized. Text you set on `PaywallOptions.restoreFailed` is shown as is. ## Deprecations * Deprecates `PaywallOptions.useCachedTemplates`. It has no effect: on-device caching is configured per paywall in the Superwall dashboard. It will be removed in the next major version. ## Breaking changes * `AutomaticPurchaseController`'s constructor now takes the SDK's `Billing` instead of a `Context` and a billing client factory. Apps that don't construct it themselves are unaffected. ## 2.8.8 ## Enhancements * Adds `AIRBRIDGE_ID` as an `AttributionProvider` (`airbridgeId`), for the Airbridge Device ID from `Airbridge.fetchDeviceUUID`. ## 2.8.7 ## Fixes * Fix prioritized preloading having no effect. The first preload batch contained every paywall the device was assigned to instead of only the prioritized campaign's paywalls, so those paywalls loaded alongside everything else at launch. The first batch now holds only the prioritized campaign's paywalls, and the batch that follows holds only the rest. ## 2.8.6 ## Enhancements * Adds `PaywallOptions.presentationHost`. Set it to `PresentationHost.IN_WINDOW` to show paywalls as an overlay in the presenting activity's own window instead of launching `SuperwallPaywallActivity`. Fullscreen, Drawer, Modal, Popup and Push styles, back handling, surveys, trial reminder notifications, permission requests and web checkout all work in this mode. It is meant for hosts that stop running while another activity covers them, such as Unity games, where a purchase controller written in the game's code could otherwise never answer. The default stays `PresentationHost.ACTIVITY`. ## 2.8.5 ## Enhancements * Adds the Customer Center, a self-service screen where users can view and restore their purchases, cancel or change a Google Play subscription, request a refund, manage a web subscription and contact support. Present it with `Superwall.instance.presentCustomerCenter()`, dismiss it with `Superwall.instance.dismissCustomerCenter()`, and configure it with `SuperwallOptions.customerCenter`. * Adds `CustomerCenterDelegate` and the `customerCenter_open`, `customerCenter_close`, `customerCenter_action`, `customerCenter_surveyResponse` and `customerCenter_refundRequest` events. ## Fixes * Fix subscribers with an unexpired subscription being reported as inactive when Google Play fails to answer a purchase query, for example when the billing client isn't ready at launch. A query that succeeds and reports no purchases still deactivates straight away. * Fix subscribers being reported as inactive when Google Play returns an active purchase whose product no longer maps to an entitlement in config. A lost mapping is no longer treated as the subscription ending. * Fix purchases being refunded by Google Play for not being acknowledged when they did not complete through the billing flow callback, for example a pending purchase that settled while the app was closed, the app being killed mid-purchase, or a Play Store promo code. The `AutomaticPurchaseController` now acknowledges any unacknowledged purchase whenever it syncs the subscription status, including on launch, and retries acknowledgements that fail. * Fix `register()` never calling its handler, and every later placement stalling behind it, when a Google Play product query at launch was dropped. A request that found the billing client disconnected between being queued and running was discarded without a callback, leaving its products loading forever. Such requests are now re-queued until the client reconnects, a product query that Google Play never answers times out after 15 seconds, a disconnect with queued requests reconnects, and a second `startConnection` is no longer issued while one is in flight. * A paywall whose webview can't load, because every URL and retry has been used up or `paywalls.timeoutAfter` passed, is now dismissed as declined with the `webViewFailedToLoad` close reason, matching iOS. The register handler gets `onDismiss` and then the feature block for a non-gated placement, or `onError` for a gated one. Previously the paywall stayed on screen, and with `timeoutAfter` set the handler received `onPresent` followed by a bare `onError` while the paywall was still showing. A paywall that fails to load off-screen, for example during preload, reloads the next time it is presented. ## 2.8.4 ## Fixes * Fix bug where experiment ID would be stale among paywalls sharing experiments * Fix `presentation_id` changing mid-presentation when `getPaywall()` is called for a paywall that is already on screen. The id now rotates when a cached paywall is presented again, so every event between one `paywall_open` and the next carries the same id. * Fix trial reminder notifications being scheduled after a paywall purchase that did not start a free trial (for example a user who already used their trial and was charged immediately). Reminders are now only scheduled when a trial actually started, and the paywall receives the `freeTrial_start` message for every started trial, even when it has no trial reminders configured. ## 2.8.3 ## Fixes * Web purchase redemption now exposes the full checkout product in `didRedeemLink`, tracks `freeTrial_start` once per code, and schedules the active paywall's trial reminders from the checkout timestamp. Notification permission waits no longer block access or drop a late grant; ambiguous or already-elapsed reminders are skipped. * Fix multi-page paywalls only reporting the entry page view. `paywall_open` now waits for an in-flight `template_variables` send, so the runtime does not treat a late template payload as a fresh load and drop later `page_view`s. * Fix an active paywall not being reopened after its webview process crashes and is recreated. Recovery cancels template work for the old document and sends the open after the replacement loads, only if the same presentation is still active. * Fix prices not showing when product/offers are fetched from cache * Fix video loading and playing in the background on preloaded paywalls * Fix a JSON null in placement parameters or user attributes reaching audience filters as the text `"null"`, so a filter checking whether a field is null never matched. ## 2.8.2 ## Enhancements * Significantly improves paywall loading times, reducing memory and CPU footprint when preloading * Implicit placements that map to no campaign (e.g. `app_launch`, `session_start`) no longer occupy the presentation queue ahead of `register()` calls while waiting for entitlements. * Config refreshes now diff paywalls by cache key and only evict changed ones from the request cache, so unchanged preloaded paywalls stay warm across refreshes. * The loading shimmer no longer forces a software layer * Logs are now delivered on a dedicated background thread ## Fixes * The popup presentation style's entrance animation no longer stretches to the paywall's configured loading delay, and the delay no longer postpones hiding the spinner after a purchase completes. * `paywall_resourceLoad_fail` events now report the failing resource's URL. * A `SuperwallDelegate.handleLog` implementation that throws no longer propagates the exception into whatever SDK code produced the log. ## Potentially Breaking Changes * `SuperwallDelegate.handleLog` is now always called on a background thread. It could previously be called on any thread, including main, so implementations that touch UI directly must now dispatch to the main thread themselves. ## 2.8.1 ## Fixes * Paywalls with translations now render in the user's language on first paint instead of briefly showing the default language. * Paywall analytics events (`paywall_open`, `paywall_page_view`, `paywall_close`, etc.) now include a `presentation_id`, a unique identifier minted for each paywall presentation. Adds the previously-missing `close_reason`, `cache_key`, and `build_id` fields to these events, matching the data already sent by the iOS SDK. ## 2.8.0 ## Enhancements * ⚠️ Updates Google Play Billing Library from 8.0.0 to 9.1.0. See the [Play Billing Library 9 migration guide](https://developer.android.com/google/play/billing/migrate-gpblv9) for the full list of changes. ⚠️ * Adds support for custom store products. Products configured on a custom store in the Superwall dashboard (e.g. Stripe or your own payment backend) can now be attached to paywalls: their metadata (price, subscription period, trial) is fetched from the Superwall API instead of Google Play and templated into the paywall like any other product. Purchases are routed through your `PurchaseController`, bypassing Google Play Billing entirely — check `product.isCustomProduct` to fulfill them via your own payment flow, and grant their entitlements with `Superwall.instance.setSubscriptionStatus(...)` on success. Requires configuring the SDK with a `PurchaseController`. * Adds a unified `PurchaseController.purchase(activity, product: StoreProduct, basePlanId, offerId)` method that handles both Google Play and custom store products. For Play products, the underlying `ProductDetails` are available via `product.rawStoreProduct`. * Custom purchases produce full transaction analytics (`transaction_start`/`transaction_complete`, `subscriptionStart`/`freeTrialStart`) with an SDK-generated transaction identifier exposed as `StoreProduct.customTransactionId`, and free-trial eligibility for custom products is derived from the customer's entitlement history. * Adds `ApiStoreProduct`, a product backed by Superwall API data, used for custom store products. ## Breaking Changes * System back presses are now forwarded into the paywall as a `back_button_input` message instead of dismissing it directly: multi-page flows navigate back one page, and paywalls with nowhere to go back (root page, single page) close themselves through the standard manual-close path (`Declined`/`ManualClose`) — so single-page paywalls dismiss the same as before, from the app's perspective. When `reroute_back_button` is enabled in Paywall settings, the `PaywallOptions.onBackPressed` app callback keeps first refusal before the press is forwarded. Paywalls built on runtimes that predate `back_button_input` will ignore the press; this means that previously existing Multi-page paywalls, if republished, will now navigate back inside the paywall once republished. * Removes the deprecated `SuperwallBillingFlowParams.Builder.setSkuDetails(SkuDetails)`. Billing Library 9 removes `SkuDetails` entirely, so this method can no longer exist. Use `setProductDetailsParamsList(...)` with `ProductDetails` instead. * Removes the unused internal `com.superwall.sdk.billing.SWProduct`, which wrapped the now-removed `SkuDetails`. * Internal purchase-history queries now resolve current purchases via `QueryPurchasesParams` — Billing Library 9 removes the purchase-history APIs (`queryPurchaseHistoryAsync`, `QueryPurchaseHistoryParams`). * **Impact:** if your app still calls the removed Billing Library APIs (`SkuDetails`, `SkuDetailsParams`, `querySkuDetailsAsync`, `queryPurchaseHistoryAsync`, `BillingClient.SkuType`, or the no-arg `enablePendingPurchases()`), it will no longer compile once it picks up Billing 9 through this SDK. Migrate those call sites to the `ProductDetails` APIs before upgrading; the [migration guide](https://developer.android.com/google/play/billing/migrate-gpblv9) has a mapping of every removed API to its replacement. * **Please test your billing and purchasing flows before shipping this upgrade.** Because the Billing Library is resolved to a single version across your app, upgrading Superwall also upgrades Billing for everything else that depends on it. If you use Google Play Billing directly, or another subscription provider such as RevenueCat, Adapty or Purchasely, make sure that provider's SDK supports Billing 9 and run through purchase, restore and subscription-status flows end to end. * **If you use other subscription management libraries (RC, Purchasely, Adapty) and they do not support Play Billing 9:** you can pin the Billing Client version to 8 in the following way. Add this to your app module's `build.gradle.kts`, outside the `android { }` block: ```kotlin configurations.all { resolutionStrategy.force("com.android.billingclient:billing:8.3.0") } ``` Or in Groovy (`build.gradle`): ```groovy configurations.all { resolutionStrategy.force 'com.android.billingclient:billing:8.3.0' } ``` You can confirm which version you end up with via `./gradlew :app:dependencies --configuration releaseRuntimeClasspath` — look for `com.android.billingclient:billing:9.1.0 -> 8.3.0`. Billing 8 still satisfies Google's August 31, 2026 requirement, so this is a safe interim state, and no Superwall functionality is lost: the SDK works on both 8.x and 9.x. Note that a `-dontwarn com.android.billingclient.api.QueryPurchaseHistoryParams` ProGuard rule is **not** a fix. It silences the R8 error and lets the build through, but then throws at runtime. ## ⚠️ Minimum SDK version raised to 23 Google Play Billing Library 9 requires Android 6.0 (API 23), so the SDK's `minSdk` is now **23** (previously 21). If your app's `minSdk` is below 23, you'll need to raise it to pick up this release — devices on Android 5.x will no longer receive app updates that include this SDK version. ## Deprecations * Deprecates `PurchaseController.purchase(activity, productDetails, basePlanId, offerId)` in favor of the `StoreProduct`-based method above. Existing implementations keep working unchanged — the new method's default implementation routes Google Play purchases to the deprecated one — but purchasing custom store products requires implementing the new method. ## 2.7.23 ## Fixes * Fix paywall inputs silently dropping all non-Latin keyboard text (Cyrillic, Korean, Thai, emoji, etc.). The webview no longer replaces Chromium's `InputConnection` with a dummy one unless `isGameControllerEnabled` is set, restoring the full IME pipeline (composition, autocorrect, swipe typing, autofill) for everyone else. * Ensure that errors thrown when user lacks billing do not propagate to the app ## 2.7.22 ## Enhancements * Always notify backend of purchased entitlements * Adds a 5 second timeout to resolving latest purchases, allowing non-play store purchases to resolve ## Fixes * Fix a dead buy button when re-presenting a cached paywall in the same session after a purchase, for both `register()` and embedded paywalls (`getPaywall`/`getPaywallView`). Per-presentation transient state (loading spinner and presentation-prepared flag) is now reset on each new presentation, so it no longer leaks from a previous presentation that was stopped without a finishing teardown. ## 2.7.21 ## Enhancements * Adds `fontScale` and `fontSize` device attributes for the system text size. * Memoizes the device template used for audience-filter evaluation and paywall templating. The template is now rebuilt only when one of its mutable inputs (identity, entitlements, subscription status, interface style, platform wrapper, etc.) changes, while time-derived fields are recomputed on every read. This removes a full JSON round trip and repeated system lookups from every `register()` call. ## Fixes * Fix a bug causing paywall destroying on backgrounding * Ensures that paywall instances no longer overwrite each other's instance experiment ID ## 2.7.20 ## Enhancements * Adds `storeFrontCountryCode` property * Adds `PaywallOptions.loadingColor` to options enabling you to theme the circular progress bar * Adds `fontScale` and `fontSize` device attributes for the system text size. ## Fixes * Fix a bug causing web redemption entitlements to be ignored in restoration tracking logic for users of purchase controller * Fix paywall presentation being fully torn down when the app was backgrounded without the paywall being dismissed, while keeping `paywall_close`/`paywall_open` dispatched when the paywall leaves and returns to the screen ## 2.7.19 ## Enhancements * Added `EventTrackingBehavior` enum and `SuperwallOptions.eventTrackingBehavior` property for GDPR-compliant event collection control. Use `ALL` (default) to track everything, `SUPERWALL_ONLY` to suppress user-initiated tracking, trigger fires, and user-attribute updates while keeping internal SDK events, or `NONE` to stop all event collection entirely. The behavior can also be changed at runtime via `Superwall.instance.eventTrackingBehavior`. * Deprecated `SuperwallOptions.isExternalDataCollectionEnabled`. Setting it to `false` now maps to `SUPERWALL_ONLY`; setting it back to `true` maps to `ALL`. ## 2.7.18 ## Enhancements * Adds `singularDeviceId` as an `AttributionProvider`. ## 2.7.17 ## Fixes * Fix paywall not dismissing after web redemption ## 2.7.16 ## Enhancements * Improves resilience in cases where configuration is not yet retrieved * Exposes Transaction abandon events to paywalls ## Fixes * Fixes issue with popups displaying wrong on older API versions ## 2.7.15 ## Enhancements * Improves preloading logic to reduce number of preloaded paywalls for certain campaign types * Improve display of periodic price in some cases ## Fixes * Fix dropping delegate events when an error occurs * Fix overenthusiastic delivery of `subscriptionStatus_didChange` events on minor changes ## 2.7.14 ## Fixes * Fixes test mode products not being loaded properly in PW * Improve exponential backoff retry for Play Service unavailable * Fix Custom Info date serialization issues ## 2.7.13 ## Fixes * Fix `device.appVersionPadded` and `device.sdkVersionPadded` emitting non-ASCII digits on devices whose default locale uses a non-Latin numbering system (e.g. `ar-EG`, `fa-IR`, `bn-BD`), which caused audience-rule version comparisons to misbucket affected users. * Ensures timeout applies to HttpUrlConnection for enrichment and subscription API's * Remove unnecessary sync access causing ANR lock in React Native ## 2.7.12 ## Enhancements * Add customer info to paywall info and tracked events * Add stripe/paddle intro offer eligibility ## Fixes * Fix dismiss animation for bottom sheets and modals on newer Samsung devices ## 2.7.11 ## Enhancements * Improved startup performance and reduced blockage of caller threads * Add `PaywallOptions.preloadDeviceOverrides` - this allows you to override `shouldPreload` for different device tiers, i.e. disable it for low-end devices. For more details, see KDoc. ## Fixes * Reduce CookieManager ANR potential * Fix concurrency issues with double onFinished calls being invoked ## 2.7.10 ## Potentially impactful changes * Billing errors on register are now wrapped in `SubscriptionStatusTimeout` errors * This is used to clarify that the status is timing out due to billing errors. If you are depending on the `NoPaywallView` to distinguish between these, ensure you are checking for the proper status. ## Enhancements * Adds onboarding analytics * Adds prioritized preloading support * Improved error handling ## Fixes * Prevents paywalls from dismissing on return from deep link * Fixes deadlock in `SerialTaskManager` * Fix issues with bottom sheet on certain Samsung devices ## 2.7.9 ## Fixes * Fix review dialog closing paywall ## 2.7.8 ### Fixes * Fix serialization issue with R8 and dates * Fix scope cancellation for test mode ## 2.7.7 ### Enhancements * Adds support for local resource loading in paywalls via `Superwall.instance.localResources` ### Fixes * Fix issues with stripe period types failing to deserialize ## 2.7.6 ### Fixes * Fix concurrency issue with early paywall displays and product loading * Improve edge case handling in billing * Improve paywall timeout cases and failAt stamping * Fix issue with param templating in re-presentation * Fix race issue with test mode ## 2.7.5 ### Enhancements * Add appstack integration attribute identifier ### Fixes * Ensure test mode does not interfere with expo * Ensure isActive is properly returned and not calculated via expiration date * Fix potential memory leak when webview crashes * Ensure O(n) cleanup doesn't run multiple times ## 2.7.4 ### Enhancements * Adds support for "Test Mode", which allows you to simulate in-app purchases without involving Google Play. Test Mode can be enabled through the Superwall dashboard by marking specific users as test store users, or activates automatically when a an application ID mismatch is detected or behavior is set to `ALWAYS`. When active, a configuration modal lets you select starting entitlements and override free trial availability. Purchases are simulated with a UI that lets users complete, abandon, or fail transactions, with all purchase events firing normally for end-to-end paywall testing. * Improved logging in web entitlement and entitlement redeeming for easier debugging * Adds active entitlements to subscription status change event * Ensures purchases are always queried with connected clients and retried in background * Adds `expirationDate`, `subscriptionGroupId` and `offerId` to `StoreTransactionType` ### Fixes * Improve rounding to match editor's pricing consistently ## 2.7.3 ### Enhancements * Adds state and params to `PaywallInfo` for `PaywallClose` events ## 2.7.2 ### Fixes * Fixes issue with `enableExperimentalDeviceVariables` option causing subscription status sync to fail ## 2.7.1 ### Enhancements * Adds improved constructors for `SuperwallOptions`,`PaywallOptions` and `PaywallPresentationHandler`, allowing a DSL like usage,i.e. ` PaywallPresentationHandler { onPresent { ... } }` * Adds haptic feedback action support ### Fixes * Ensures poster is always visible on video preview * Fix bug with loading not dismissing post purchase if user remains in paywall * Fix warning about old edge-to-edge API usages * Fix shimmerview theme warnings and memory leak ## 2.7.0 ### Enhancements * Enables paywall post-purchase action execution instead of dismissing * Enables triggering custom callback requests from paywall * Adds a new method to PaywallPresentationHandler called onCustomCallback that allows user to handle custom callback requests * Adds retrieving of paywall state inside paywall info * Adds support for new one time purchases with purchase options and offers * Update Superscript to version 1.0.13, find more in the [Superscript changelog](https://github.com/superwall/superscript/releases/tag/1.0.13) ### Deprecations * Deprecated `paywallWebviewLoad_timeout` - this event was causing confusion due to its naming, leading to it being deprecated ### Fixes * Fixes late initialization authorization issue for Stripe checkouts * Improves how Shimmer duration is measured * Fixes wrong redemption type being displayed due to integration attributes ## 2.6.8 ### Enhancements * Adds microphone permission ### Fixes * Fixes error when redeeming external purchases ## 2.6.7 ### Enhancements * Adds permission granting and callbacks to/from paywalls * Adds `PaywallPreloadStart` and `PaywallPreloadComplete` events ### Fixes * Fix handling of deep links when paywall is detached * Enables permission granting from paywall and callbacks * Fix crash when handling drawer style paywalls with 100% height ## 2.6.6 ## Enhancements * Add dynamic notification support and scheduling enabling deeper personalization of notifications * Provides a `CustomerInfo` class API, allowing you to observe the customer's purchases and subscription lifecycle via `Superwall.instance.customerInfo` flow * Provides a new delegate method to observe customer info changes - `fun customerInfoDidChange(from: CustomerInfo, to: CustomerInfo)` * Provides a `CustomerInfoDidChange` event to track customer info changes * Overrides `Collection.plus`and `.toSet` methods to ensure our merging methods are used. * Provides a `userAttributesDidChange(newAttributes: Map)` method in Superwall Delegate to track external (i.e. paywall) attribute changesg * Allows triggering a `transaction_abandon` offer on a `paywall_decline` offer and vice-versa, whereas previously it would trigger a presentation error. * Add a `Superwall.teardown` method and `Superwall.instance.refreshConfiguration()` for development with hot-reload based frameworks ## ⚠️ Warning ⚠️ If you are using a Purchase Controller and web2app or app2web purchases, you will have to update your purchase controller to listen to `Superwall.instance.customerInfo` which will provide you with the relevant web entitlements and call `setSubscriptionStatus` accordingly. ## 2.6.5 ## Dependencies * Reverts `androidx.lifecycle:lifecycle-runtime-ktx` to 2.8.4 to ensure old Compose BOM compatiblity ## Enhancements * Improves error messaging in play store errors ## Fixes * Fixes edge case bug with wrong entitlement being matched in cases where product ID's match and base plans differentiate by suffix only * Fixes issue with composable paywall state updates not firing in onAttach ## 2.6.4 ## Enhancements * Improves error and timeout handling * Hardens paywall recreation in case of render process crash ## 2.6.3 ## Enhancements * Adds `productIdentifier` to RedemptionResult's `PaywallInfo` object ## Fixes * Fixes nested scrolling issue in Modal webviews * Removes node removal for `com.google.android.gms.permission.AD_ID` from Manifest * Ensures remote entitlements in the background refresh without feature flags ## 2.6.2 ## Enhancements * Adds `Superwall.instance.consume(purchaseToken)` method to help easily consume in-app purchases ## Fixes * Fixes issue with deeplink params not being handled properly in some cases * Fixes issue with Drawer and Modal displays on Android 14 Samsung devices * Fixes selection issue with some OTP, ensures after consuming the Status is synced ## 2.6.1 ## Enhancements * Enables Stripe and Paddle checkout via in-app payment sheets * Improves product handling and redemption for Stripe and Paddle ## Fixes * Fixes issue with Google's Play Billing library auto-reconnection ## 2.6.0 ⚠️ [Deprecated] ## Notes * This version is deprecated due to discovery of an issue in Play Billing library which could cause runtime issues * Please use version 2.6.1 ## 2.5.8 ## Fixes * Fix lifetime purchase entitlements not being discovered in some cases on purchase * Fix potential ANR issues where some animations would end up looping over on main thread * Fix webview client not behaving properly when using a resetted paywall ## 2.6.0-alpha * Add app2web support, allowing users to purchase Stripe or Paddle products without leaving your app * Add `PaymentSheet` purchase type enabling quick bottom sheet purchases * Add support for Android app links purchase redeeming ## 2.5.7 ## Fixes * Fix `demandScore` and `demandTier` getting removed from some events * Fixes paywall navigation resetting after backgrounding * Removes webview flags which can cause off-screen render issues ## 2.5.6 ## Enhancements * Add support for rerouting back button if enabled in paywall settings * Handled by `SuperwallOptions.PaywallOptions.onBackPressed`, which enables you to consume the back press or let the SDK consume it * Add support for redeeming web entitlements with Paddle ## Fixes * Fix binary .so file regression to ensure 16kb page size compatibility * Fix potential issue with paywall not dismissing due to paywall\_decline concurrency issue ## 2.5.5 ## Enhancements * Expose `signature` on `StoreTransaction` ## Fixes * ⚠️ Important - in the recent versions we have added usage of Google AppSetId and AdID to enable automatic attribution with Google's ad networks. * Due to issues with Google's detection of the usage, they have been removed temporarily and will be added back once the issue is resolved. * As an alternative, you can set those attribution identifiers using `AttributionProvider.GOOGLE_APP_SET | AttributionProvider.GOOGLE_ADS` ## 2.5.4 ## Enhancements * `PaywallComposable` now reapplies theme on system change and `PaywallView` now exposes an `onThemeChanged()` method * `DeepLink` event now exposes query params ## 2.5.3 ## Enhancements * Adds ability to specify a custom height and corner radius for the drawer presentation style. * Adds ability to display a `Popup` presentation style * Adds ability to request reviews from paywall actions, including: * Value `device.reviewRequestCount` that returns total request counts * Method `device.reviewRequestsInHour|Day|Week|Year|reviewRequestsSinceInstall` computed methods for granular targeting * Adds `Superwall.instance.setIntegrationAttributes` method enabling you to set integration identifiers for the users from different platforms (Adjust, Mixpanel, Meta, etc.) * Adds `Superwall.instance.showAlert` method enabling you to easily show an alert over the current paywall * Adds `PaywallOptions.timeoutAfter` to easily control timeout of paywalls when not using fallback loading * Adds `Superwall.instance.setIntegrationAttributes` and `Superwall.instance.integrationAttributes` to set integration identifiers (i.e. Mixpanel, Appsflyer, etc) * Adds user attributes to `TransactionComplete` and `PaywallOpen` events * Adds device ID to device attributes ## Fixes * Fixes memory leak issues in `PaywallBuilder` would keep the paywall view alive in some cases * Fixes issue where some events would be missing properties ## 2.5.1 ## Enhancements * Improves subscribed user experience in cases with slow configuration ## 2.5.0 ## Enhancements * Updates Google Play billing library to v8. Unfortunately, Google has broken backwards compatibility with previous versions, so if you're using the standalone library too ensure it is compatible with v8. * Adds kotlin version to device variables ## Fixes * Reduces noisy logging when product is missing an offer * Ensures that getting experimental properties works for consumable products ## 2.4.1 ## Fixes * Google Play Billing integration with newer libraries (such as RC 9.\*) * Reduces noisy logging when product is missing an offer * Ensures that getting experimental properties works for consumable products ## 2.4.0 ## Enhancements * Increases superscript version to 1.0.2 with improved type and null safety ## 2.3.3 ## Fixes * Ensure properties are always properly serialized ## 2.3.2 ## Enhancements * Adds new properties to count placement occurrences in specific time: `placementsInHours`, `placementsInDay`, `placementsInWeek`, `placementsInMonth`, `placementsSinceInstall` ## Fixes * Fixes an issue where a redemption could succeed but throw an error * Fixes an issue with receipt manager when there is no purchases and experimental properties are enabled ## 2.3.1 ## Fixes * Fixes an issue where entitlements would not be reset on time * Ensures `redeem` is only done on initial config not on config refresh ## Enhancements * Adds `overrideProductsByName` property to allow globally overriding products on paywalls. This property accepts a map of product names to product identifiers (strings). Local overrides provided via `PaywallOverrides` take precedence over global overrides. * Adds `ProductOverride` sealed class to provide flexible product override handling with support for both product IDs and `StoreProduct` objects. ## 2.3.0 ## Enhancements * Deprecated `Superwall.instance.handleDeepLink` in favor of static `Superwall.handleDeepLink` to ensure links received before `configure` completion are handled properly * Adds `externalAcountId`, provided to Google Play billing upon purchase as a SHA256 of the userId or the userId itself if `passIdentifiersToPlayStore` option is provided. * Adds a `SuperwallOption` named `enableExperimentalDeviceVariables`. When set to true, this enables additional device-level variables: `latestSubscriptionPeriodType`, `latestSubscriptionState`, and `latestSubscriptionWillAutoRenew`. These properties provide information about the most recent Google Play subscription on the device and can be used in audience filters. Note that due to their experimental nature, they are subject to change in future updates. * Update `com.android.billingclient` to version 7.1.1 to align with Google's latest requirements ## Fixes * Fixes issues with paywall destruction when activity performs a hot reload (i.e. during update) * Fixes issue where the feature block would be triggered on non-gated paywalls when the app is minimised ## 2.2.3 ## Fixes * Fix potential issue with device enrichment and attributes synchronisation causing a lock ## 2.2.2 ## Enhancements * Adds `demandScore` and `demandTier` to device attributes using an off-device advanced machine learning model. A user is assigned these based on a variety of factors to determine whether they're more or less likely to convert and can be used within audience filters. * Adds `deviceTier` to the device attributes using an on-device scoring system to place the device in a tier based on it's capabilities. This can be used in audience filters to display different paywalls based on the user's device capabilities. The value can be one of the following values `ultraLow`, `low`, `mid`, `high`, `ultra_high`, `unknown`. NOTE: This property is still experimental ## Fix * Fixes potential issue in `web2app` with subscription being overriden by the polling due to extra API calls ## 2.2.0 ## Enhancements * Updates binaries to work on 16kb page sizes ## 2.1.2 ## Fixes * Fix issue with deep link referrer throwing a DeadObjectException ## 2.1.1 ## Enhancements * Add optimisticLoading paywall option that hides the shimmer when HTML is loaded * Prevent stopping the paywall handler listening with onDismiss when reason is None * Improve PaywallBuilder API for non-kotlin and non-coroutine users * Expose `deviceAttributes()` function to retrieve session device attributes ## 2.1.0 ## Enhancements * Updates kotlin version to 2.0.21 * Updates `compileSDK` to 35 * Adds web checkout and redemption support * Adds SuperwallDelegate methods `willRedeemLink` and `didRedeemLink` ## Fixes * Removes lock while reading cache that could cause ANR on the main thread * Fixes issue where experiment and variant ID would be missing due to concurrency issues ## 2.1.0-beta.1 ## Enhancements * Updates kotlin version to 2.0.21 * Updates `compileSDK` to 35 * Adds web checkout and redemption support * Adds SuperwallDelegate methods `willRedeemLink` and `didRedeemLink` ## 2.0.8 ## Fixes * Fixes the serialization issue with Kotlin 2.0 ## 2.0.7 ## Enhancements * Improves how errors are handled when loading, improving the UX and reloading in real failure cases * Added `device.subscriptionStatus` to the device object ## Fixes * Fixes an issue where users of kotlin 2.0 would experience a `NoAudienceMatch` when evaluating rules ## 2.0.6 ## Fixes * Fix potential crash while setting render priority ## 2.0.5 ## Fixes * Fix issue with `original_transaction_id` missing when using a `PurchaseController` # 2.0.4 ## Enhancements * Provide overloads for Java interop * Provide utility functions for Java interop with `PurchaseController` # 2.0.3 ## Enhancements * Renames `SuperwallPlacement` back to `SuperwallEvent` # 2.0.2 ## Fixes * Fixes issue with `NoAudienceMatch` appearing on some devices and issues with certain campaign rules # 2.0.1 ## Enhancements * Changes back to `handleSuperwallEvent` naming with a deprecation notice and a typealias for previous methods ## Fixes * Removes extra failure logging when displaying alerts * Finds nearest activity instead of relying just on Context in `PaywallComposable` * Improves cleanup in `PaywallComposable` # 2.0.0 Our 2.0.0 release brings some major and minor changes to both our API's and core features. For more information, please look at our [migration docs](https://superwall.com/docs/migrating-to-v2-android) ## Enhancements * Adds `PaywallBuilder` class as an alternative to existing `getPaywallView` method. This provides a cleaner API and an ability to change purchase loading bar and shimmer view. * Ensure safety of static webview calls that are known to fail randomly due to Webview's internal issues * Adds `purchase` method to `Superwall` you can use to purchase products without having to resort on paywalls. To purchase a product you can pass it in one of the following objects: * Google Play's `ProductDetails` * Superwall's `StoreProduct` object * Or a string containing the product identifier, i.e. `Superwall.instance.purchase("product_id:base_plan:offer")` * Adds `restorePurchases` method to `Superwall` you can use to handle restoring purchases * Adds `getProducts` method to `Superwall` you can use to retrieve a list of `ProductDetails` given the product ID, i.e. i.e. `Superwall.instance.purchase("product_id:base_plan:offer")` * Adds support for observing purchases done outside of Superwall paywalls. You can now observe purchases done outside of Superwall paywalls by setting the `shouldObservePurchases` option to true and either: * Manually by calling `Superwall.instance.observe(PurchasingObserverState)` or utility methods `Superwall.instance.observePurchaseStart/observePurchaseError/observePurchaseResult` * Automatically by replacing `launchBillingFlow` with `launchBillingFlowWithSuperwall`. This will automatically observe purchases done outside of Superwall paywalls. * Adds consumer proguard rules to enable consumer minification * `Superwall.instance` now provides blocking or callback based version of multiple calls, suffixed with `*Sync` * Improves preloading performance and reduces impact on the main thread * Reduces minSDK to 22 ## Breaking Changes * `SuperwallPaywallActivity` and `PaywallView` have been moved into `com.superwall.sdk.paywall.view` package from `com.superwall.sdk.paywall.vc` package. * Removes `PaywallComposable` and Jetpack Compose support from the main SDK artifact in favor of `Superwall-Compose` module for Jetpack Compose support: * You can find it at `com.superwall.sdk:superwall-compose:2.0.0-alpha` * Usage remains the same as before, but now you need to include the `superwall-compose` module in your project. * Removed methods previously marked as Deprecated * `SubscriptionStatus.Active` now takes in a set of `Entitlements`, while `Inactive` and `Active` have been turned into objects. * `Superwall.instance.register` now uses `placement` instead of `event` as the argument name * `preloadPaywalls` now uses `placementNames` instead of `eventNames` as the argument name * `PaywallPresentationHandler.onDismiss` now has two arguments, `PaywallInfo` and `PaywallResult` * `PaywallComposable` now uses `placement` argument instead of `event` * `TriggerResult.NoRuleMatch` and `TriggerResult.EventNotFound` have been renamed to `TriggerResult.NoAudienceMatch` and `TriggerResult.PlacementNotFound` * `PresentationResult.NoRuleMatch` and `PresentationResult.EventNotFound` have been renamed to `PresentationResult.NoAudienceMatch` and `PresentationResult.PlacementNotFound` * `SuperwallEvent` has been renamed to `SuperwallPlacement`, belonging properties with `eventName` have been renamed to `placementName` * `SuperwallEventInfo` has been renamed to `SuperwallPlacementInfo` * `ComputedPropertyRequest.eventName` has been renamed to `ComputedPropertyRequest.placementName` * `Superwall.instance.events` has been renamed to `Superwall.instance.placements` * `LogScope.events` has been renamed to `LogScope.placements` * `PaywallPresentationRequestStatusReason.EventNotFound` has been renamed to `PaywallPresentationRequestStatusReason.PlacementNotFound` * `PaywallSkippedReason.EventNotFound` has been renamed to `PaywallSkippedReason.PlacementNotFound` * `SuperwallDelegate.handleSuperwallEvent` method has been renamed to `SuperwallDelegate.handleSuperwallPlacement` * Removed `PurchaseResult.Restored` # 2.0.0-beta.5 ## Breaking changes * `Superwall.instance.register` now uses `placement` instead of `event` as the argument name * `preloadPaywalls` now uses `placementNames` instead of `eventNames` as the argument name * Superwall's `PaywallPresentationHandler.onDismiss` now has two arguments, `PaywallInfo` and `PaywallResult` * `PaywallComposable` now uses `placement` argument instead of `event` * Remove `PurchaseResult.Restored` # 2.0.0-beta.4 ## Breaking changes * `SuperwallEvents.entitlementStatusDidChange` has been renamed to `SuperwallEvents.subscriptionStatusDidChange` * `SuperwallDelegate.entitlementStatusDidChange` has been renamed to `SuperwallEvents.entitlementStatusDidChange` * `TriggerResult.NoRuleMatch` and `TriggerResult.EventNotFound` have been renamed to `TriggerResult.NoAudienceMatch` and `TriggerResult.PlacementNotFound` * `PresentationResult.NoRuleMatch` and `PresentationResult.EventNotFound` have been renamed to `PresentationResult.NoAudienceMatch` and `PresentationResult.PlacementNotFound` ## 2.0.0-beta.3 ### Breaking changes * `SuperwallEvent` has been renamed to `SuperwallPlacement`, belonging properties with `eventName` have been renamed to `placementName` * `SuperwallEventInfo` has been renamed to `SuperwallPlacementInfo` * `ComputedPropertyRequest.eventName` has been renamed to `ComputedPropertyRequest.placementName` * `Superwall.instance.events` has been renamed to `Superwall.instance.placements` * `LogScope.events` has been renamed to `LogScope.placements` * `PaywallPresentationRequestStatusReason.EventNotFound` has been renamed to `PaywallPresentationRequestStatusReason.PlacementNotFound` * `PaywallSkippedReason.EventNotFound` has been renamed to `PaywallSkippedReason.PlacementNotFound` * `SuperwallDelegate.handleSuperwallEvent` method has been renamed to `SuperwallDelegate.handleSuperwallPlacement` ## 2.0.0-beta.2 ### Breaking Changes * API Changes: * Migration of `setEntitlementStatus` to `setSubscriptionStatus` * Exposing `Superwall.instance.entitlementsStatus` * Migration of `SuperwallDelegate.entitlementStatusDidChange` to `SuperwallDelegate.subscriptionStatusDidChange` ## 2.0.0-beta.1 ## Enhancements * Add `PaywallBuilder` class as an alternative to existing `getPaywallView` method. This provides a cleaner API and an ability to change purchase loading bar and shimmer view. * Add callback versions of new 2.0 methods * Ensure safety of static webview calls that are known to fail randomly due to Webview's internal issues ## 2.0.0-Alpha.1 ### Breaking Changes * `SuperwallPaywallActivity` and `PaywallView` have been moved into `com.superwall.sdk.paywall.view` package from `com.superwall.sdk.paywall.vc` package. * Removes `PaywallComposable` and Jetpack Compose support from the main SDK artifact in favor of `Superwall-Compose` module for Jetpack Compose support: * You can find it at `com.superwall.sdk:superwall-compose:2.0.0-alpha` * Usage remains the same as before, but now you need to include the `superwall-compose` module in your project. * Removed methods previously marked as Deprecated * Removes `SubscriptionStatus`, together with belonging update methods and `subscriptionStatusDidChange` callback. * These are replaced with `EntitlementStatus` and `entitlementStatusDidChange` callback. You can find more details on this migration in our docs. ### Enhancements * Adds `purchase` method to `Superwall` you can use to purchase products without having to resort on paywalls. To purchase a product you can pass it in one of the following objects: * Google Play's `ProductDetails` * Superwall's `StoreProduct` object * Or a string containing the product identifier, i.e. `Superwall.instance.purchase("product_id:base_plan:offer")` * Adds `restorePurchases` method to `Superwall` you can use to handle restoring purchases * Adds `getProducts` method to `Superwall` you can use to retrieve a list of `ProductDetails` given the product ID, i.e. i.e. `Superwall.instance.purchase("product_id:base_plan:offer")` * Adds support for observing purchases done outside of Superwall paywalls. You can now observe purchases done outside of Superwall paywalls by setting the `shouldObservePurchases` option to true and either: * Manually by calling `Superwall.instance.observe(PurchasingObserverState)` or utility methods `Superwall.instance.observePurchaseStart/observePurchaseError/observePurchaseResult` * Automatically by replacing `launchBillingFlow` with `launchBillingFlowWithSuperwall`. This will automatically observe purchases done outside of Superwall paywalls. * Adds consumer proguard rules to enable consumer minification * Reduces minSDK to 22 * Adds `purchaseToken` to purchase events * `Superwall.instance` now provides blocking or callback based version of multiple calls, suffixed with `*Sync` * Improves preloading performance and reduces impact on the main thread ## 1.5.5 ## Fixes * Fixes potential distribution issues for variant selection in edge cases * Fixes potential memory leaks of paywall calling activity ## 1.5.4 ## Fixes * Fixes issue when a paywall would dismiss with `ForNextPaywall` but next paywall could not be shown due to triggers or limits. Now it resolves into the proper dismiss status. ## 1.5.3 ### Enhancements * Add `purchaseToken` to TransactionComplete ## 1.5.2 ### Fixes * Fix chromium crashes caused by race conditions in webview's implementation ## 1.5.1 ### Enhancements * Updates superscript dependencies to reduce minSDK version ### Fixes * Adds consumer proguard rules to avoid minifying JNA classes during minification ## 1.5.0 ### Enhancements * Adds `shimmerView_start` and `shimmerView_complete` events to track the loading of the shimmer animation. * Makes `hasFreeTrial` match iOS SDK behavior by returning `true` for both free trials and non-free introductory offers * Adds `Superwall.instance.events` - A SharedFlow instance emitting all Superwall events as `SuperwallEventInfo`. This can be used as an alternative to a delegate for listening to events. * Adds a new shimmer animation * Adds support for SuperScript expression evaluator ### Fixes * Fixes concurrency issues with subscriptions triggered in Cordova apps ## 1.5.0-beta.2 ## Enhancements * Adds `shimmerView_start` and `shimmerView_complete` events to track the loading of the shimmer animation. * Makes `hasFreeTrial` match iOS SDK behavior by returning `true` for both free trials and non-free introductory offers ## 1.5.0-beta.1 ## Enhancements * Adds `Superwall.instance.events` - A SharedFlow instance emitting all Superwall events as `SuperwallEventInfo`. This can be used as an alternative to a delegate for listening to events. * Adds a new shimmer animation * Adds support for SuperScript expression evaluator ## 1.4.1 ### Enhancements * Adds `appVersionPadded` attribute ### Fixes * Fixes issue where `PaywallPresentationHandler.onError` would be skipped in case of `BillingError`s ## 1.4.0 ## Enhancements * Improves paywall loading and preloading performance * Reduces impact of preloading on render performance * Updates methods to return `kotlin.Result` instead of relying on throwing exceptions * This introduces some minor breaking changes: * `configure` completion block now provides a `Result` that can be used to check for success or failure * `handleDeepLink` now returns a `Result` * `getAssignments` now returns a `Result>` * `confirmAllAssignments` now returns a `Result>` * `getPresentationResult` now returns a `Result` * `getPaywallComponents` now returns a `Result` * Removes Gson dependency * Adds `isScrollEnabled` flag to enable remote control of Paywall scrollability * Adds `PaywallResourceLoadFail` event to enable tracking of failed resources in Paywall * Improves bottom navigation bar color handling ## Fixes * Fixes issue where paywalls without fallback would fail to load and missing resource would cause a failure event * Fixes issue with `trialPeriodDays` rounding to the higher value instead of lower, i.e. where `P4W2D` would return 28 days instead of 30, it now returns 30. * Fixes issue with system navigation bar not respecting paywall color * Fixes issues with cursor allocation in Room transaction * Improves handling of chromium render process crash ## 1.4.0-beta.3 * Fixes issue where paywalls without fallback would fail to load and missing resource would cause a failure event ## 1.4.0-beta.2 ## Enhancements * Removes Gson dependency * Adds `isScrollEnabled` flag to enable remote controll of Paywall scrollability ## Fixes * Fixes issue with `trialPeriodDays` rounding to the higher value instead of lower, i.e. where `P4W2D` would return 28 days instead of 30, it now returns 30. * Fixes issue with system navigation bar not respecting paywall color * Reduces impact of preloading on render performance * Fixes issues with cursor allocation in Room transaction ## 1.4.0-beta.1 * Updates methods to return `kotlin.Result` instead of relying on throwing exceptions * This introduces some minor breaking changes: * `configure` completion block now provides a `Result` that can be used to check for success or failure * `handleDeepLink` now returns a `Result` * `getAssignments` now returns a `Result>` * `confirmAllAssignments` now returns a `Result>` * `getPresentationResult` now returns a `Result` * `getPaywallComponents` now returns a `Result` ## 1.3.1 ### Fixes * Fixes issue when destroying activities during sleep would cause a background crash * Fixes issue when using Superwall with some SDK's would cause a crash (i.e. Smartlook SDK) ## 1.3.0 ### Enhancements * The existing `getPaywall` method has been deprecated and renamed to `getPaywallOrThrow`. The new `getPaywall` method now returns a `kotlin.Result` instead of throwing an exception. * Adds a new option to `SuperwallOptions` - `passIdentifiersToPlayStore` which allows you to pass the user's identifiers (from `Superwall.instance.identify(userId: String, ...)`) to the Play Store when making a purchase. Note: When passing in identifiers to use with the play store, please make sure to follow their \[guidelines]\([https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setObfuscatedAccountId(java.lang.String)](https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setObfuscatedAccountId\(java.lang.String\)). * Adds `Superwall.instance.confirmAllAssignments()`, which confirms assignments for all placements and returns an array of all confirmed experiment assignments. Note that the assignments may be different when a placement is registered due to changes in user, placement, or device parameters used in audience filters. ### Fixes * Fixes issues with Paywall sometimes not displaying when returning from background * Fixes issue with SDK crashing when WebView is not available * Fixes issue with `SuperwallPaywallActivity` NPE * Update visibility of internal `getPaywall` methods to `internal` to prevent misuse ## 1.2.9 ### Fixes * Fixes issues with `MODAL` presentation style and scrolling containers * Fixes issues with `FULLSCREEN` presentation style rendering behind navigation ## 1.2.8 ### Fixes * Fixes issues with Paywall presentation styles not being properly passed ## 1.2.7 ### Enhancements * Exposes current configuration status via `Superwall.instance.configurationStatus` ### Fixes * Fixes issues with Paywall previews not loading ## 1.2.6 ### Fixes * Fixes issue where the paywall would not show in some cases when using `minutes_since` * Fixes issue with wrong URL being logged when a paywall fails to load ## 1.2.5 ### Enhancements * Adds a `Modifier` to `PaywallComposable` to allow for more control * Adds a `PaywallView.setup(...)` method to allow for easy setup when using `PaywallView` directly * Adds support for `MODAL` presentation style ### Fixes * Fixes issue with displaying `PaywallComposable` * Resolves issue where users would get `UninitializedPropertyAccessException` when calling `Superwall.instance` ## 1.2.4 ### Enhancements * For users who are not able to upgrade their AGP or Gradle versions, we have added a new artifact `superwall-android-agp-7` which keeps compatibility. ### Enhancements * Fixes issue with decoding custom placements from paywalls. ## 1.2.3 ### Enhancements * Expose `placementName`, `paywallInfo` and `params` on a `custom_placement` event ## 1.2.2 ### Enhancements * Adds support for multiple paywall URLs, in case one CDN provider fails. * `ActivityEncapsulatable` now uses a WeakReference instead of a reference * SW-2900: Adds Superwall.instance.localeIdentifier as a convenience variable that you can use to dynamically update the locale used for evaluating rules and getting localized paywalls. * SW-2919: Adds a `custom_placement` event that you can attach to any element in the paywall with a dictionary of parameters. When the element is tapped, the event will be tracked. The name of the placement can be used to trigger a paywall and its params used in audience filters. * Adds support for bottom sheet presentation style (DRAWER), no animation style and default animation. * Adds `build_id` and `cache_key` to `PaywallInfo`. * SW-2917: Tracks a `config_attributes` event after calling `Superwall.configure`, which contains info about the configuration of the SDK. This gets tracked whenever you set the delegate. * Adds in device attributes tracking after setting the interface style override. * To comply with new Google Play Billing requirements we now avoid setting empty `offerToken` for one-time purchases ## 1.2.1 ### Enhancements * Adds the ability for the SDK to refresh the Superwall configuration every session start, subject to a feature flag. * Tracks a `config_refresh` Superwall event when the configuration is refreshed. * SW-2890: Adds `capabilities` to device attributes. This is a comma-separated list of capabilities the SDK has that you can target in audience filters. This release adds the `paywall_event_receiver` capability. This indicates that the paywall can receive transaction from the SDK. * SW-2902: Adds `abandoned_product_id` to a `transaction_abandon` event to use in audience filters. You can use this to show a paywall if a user abandons the transaction for a specific product. ## 1.2.0 ### Enhancements * Adds DSL methods for configuring the SDK. You can now use a configuration block: ```kotlin fun Application.configureSuperwall( apiKey: String, configure: SuperwallBuilder.() -> Unit, ) ``` This allows you to configure the SDK in a more idiomatic way: ```kotlin configureSuperwall(CONSTANT_API_KEY){ options { logging { level = LogLevel.debug } paywalls { shouldPreload = false } } } ``` ### Deprecations This release includes multiple deprecations that will be removed in upcoming versions. Most are internal and will not affect the public API, those that will are marked as such and a simple migration path is provided. The notable ones in the public API are as follows: * Deprecated `DebugViewControllerActivity` in favor of `DebugViewActivity` * Deprecated `PaywallViewController` in favor of `PaywallView` * Deprecated belonging methods: * `viewWillAppear` in favor of `beforeViewCreated` * `viewDidAppear` in favor of `onViewCreated` * `viewWillDisappear` in favor of `beforeOnDestroy` * `viewDidDisappear` in favor of `destroyed` * `presentAlert` in favor of `showAlert` * Deprecated `PaywallViewControllerDelegate` in favor of `PaywallViewCallback` * Deprecated belonging methods: * `didFinish` in favor of `onFinished` * Deprecated `PaywallViewControllerEventDelegate` in favor of `PaywallViewEventCallback` * Users might also note deprecation of `PaywallWebEvent.OpenedUrlInSafari` in favor of `PaywallWebEvent.OpenedUrlInChrome` * `didFinish` in favor of `onFinished` * In `Superwall`, the following methods were deprecated: * `Superwall.paywallViewController` in favor of `Superwall.paywallView` * `Superwall.eventDidOccur` argument `paywallViewController` in favor of `paywallView` * `Superwall.dismiss` in favor of \`Superwall.presentPaywallView * `Superwall.presentPaywallViewController` in favor of `Superwall.presentPaywallView` * Deprecated `Paywallmanager.getPaywallViewController` in favor of `PaywallManager.getPaywallView` * Deprecated `DebugManager.viewController` in favor of `DebugManager.view` * Deprecated `DebugViewController` in favor of `DebugView` * Deprecated `LogScope.debugViewController` in favor of `LogScope.debugView` * Deprecated `PaywallPresentationRequestStatus.NoPaywallViewController` in favor of `NoPaywallView` ## 1.1.9 ### Deprecations * Deprecated configuration method `Superwall.configure(applicationContext: Context, ...)` in favor of `Superwall.configure(applicationContext: Application, ...)` to enforce type safety. The rest of the method signature remains the same. ### Fixes * SW-2878: and it's related leaks. The `PaywallViewController` was not being properly detached when activity was stopped, causing memory leaks. * SW-2872: Fixes issue where `deviceAttributes` event and fetching would not await for IP geo to complete. * Fixes issues on tablet devices where the paywall would close after rotation/configuration change. ## 1.1.8 ### Enhancements * SW-2859: Adds error message to `paywallWebviewLoad_fail`. * SW-2866: Logs error when trying to purchase a product that has failed to load. * SW-2869: Add `Reset` event to track when `Superwall.instance.reset` is called. * SW-2867: Prevents Geo api from being called when app is in the background * SW-2431: Improves coroutine scope usages & threading limits * Toolchain and dependency updates ### Fixes * SW-2863: Fixed a `NullPointerException` some users on Android 12 & 13 would experience when calling `configure`. ## 1.1.7 ### Enhancements * SW-2805: Exposes a `presentation` property on the `PaywallInfo` object. This contains information about the presentation of the paywall. * SW-2855: Adds `restore_start`, `restore_complete`, and `restore_fail` events. ### Fixes * SW-2854: Fixed issue where abandoning the transaction by pressing back would prevent the user from restarting the transaction. ## 1.1.6 ### Enhancements * SW-2833: Adds support for dark mode paywall background color. * Adds ability to target devices based on their IP address location. Use `device.ipRegion`, `device.ipRegionCode`, `device.ipCountry`, `device.ipCity`, `device.ipContinent`, or `device.ipTimezone`. * Adds `event_name` to the event params for use with audience filters. ### Fixes * Fixes issue with products whose labels weren't primary/secondary/tertiary. ## 1.1.5 ### Fixes * Fixes thread safety crash when multiple threads attempted to initialize the `JavaScriptSandbox` internally. ## 1.1.3 ### Enhancements * Tracks an `identity_alias` event whenever identify is called to alias Superwall's anonymous ID with a developer provided id. * Adds `setInterfaceStyle(interfaceStyle:)` which can be used to override the system interface style. * Adds `device.interfaceStyleMode` to the device template, which can be `automatic` or `manual` if overriding the interface style. ### Fixes * Uses `JavascriptSandbox` when available for filter expression evaluation on a background thread instead of running code on the main thread in a webview. * Fixes crash where the loading spinner inside the `PaywallViewController` was being updated outside the main thread. ## 1.1.2 ### Enhancements * Updates build.gradle configuration which means we can now upload the SDK to maven central. You no longer need to specify our custom repo in your build.gradle to get our SDK and therefore installation should be easier. ### Fixes * Fixes `ConcurrentModificationException` crash that sometimes happened when identifying a user. * Fixes crash on purchasing a free trial when using `getPaywall`. ## 1.1.1 ### Fixes * Fixes an issue loading products with offers. ## 1.1.0 ### Enhancements * SW-2768: Adds `device.regionCode` and `device.preferredRegionCode`, which returns the `regionCode` of the locale. For example, if a locale is `en_GB`, the `regionCode` will be `GB`. You can use this in the filters of your campaign. * Adds support for unlimited products in a paywall. * SW-2785: Adds internal feature flag to disable verbose events like `paywallResponseLoad_start`. ### Fixes * SW-2732: User attributes weren't being sent on app open until identify was called. Now they are sent every time there's a new session. * SW-2733: Fixes issue where the spinner would still show on a paywall if a user had previously purchased on it. * SW-2744: Fixes issue where using the back button to dismiss a paywall presented via `getPaywall` would call `didFinish` in the `PaywallViewControllerDelegate` with the incorrect values. * Fixes issue where an invalid paywall background color would prevent the paywall from opening. If this happens, it will now default to white. * SW-2748: Exposes `viewWillAppear`, `viewDidAppear`, `viewWillDisappear` and `viewDidDisappear` methods of `PaywallViewController` which you must call when using `getPaywall`. * Stops `Superwall.configure` from being called multiple times. * `getPresentationResult` now confirms assignments for holdouts. * Gracefully handles unknown local notification types if new ones are added in the future. * SW-2761: Fixes issue where "other" responses in paywall surveys weren't showing in the dashboard. ## 1.0.2 ### Fixes * Prevents a paywall from opening in a separate activity inside a task manager when using `taskAffinity` within your app. ## 1.0.1 ### Fixes * Fixes serialization of `feature_gating` in `SuperwallEvents`. * Changes the product loading so that if preloading is enabled, it makes one API request to get all products available in paywalls. This results in fewer API requests. Also, it adds retry logic on failure. If billing isn't available on device, the `onError` handler will be called. ## 1.0.0 ### Breaking Changes * Changes the import path for the `LogScope`, and `LogLevel`. ### Fixes * Fixes rare thread-safety crash when sending events back to Superwall's servers. * Calls the `onError` presentation handler block when there's no activity to present a paywall on. * Fixes issue where the wrong product may be presented to purchase if a free trial had already been used and you were letting Superwall handle purchases. * Fixes `IllegalStateException` on Samsung devices when letting Superwall handle purchases. * Keeps the text zoom of paywalls to 100% rather than respecting the accessibility settings text zoom, which caused unexpected UI issues. * Fixes rare `UninitializedPropertyAccessException` crash caused by a threading issue. * Fixes crash when the user has disabled the Android System WebView. ## 1.0.0-alpha.45 ### Fixes * Fixes issue where the `paywallProductsLoad_fail` event wasn't correctly being logged. This is a "soft fail", meaning that even though it gets logged, your paywall will still show. The error message with the event has been updated to include all product subscription IDs that are failing to be retrieved. ## 1.0.0-alpha.44 ### Fixes * Fixes rare issue where paywall preloading was preventing paywalls from showing. ## 1.0.0-alpha.43 ### Enhancements * Adds `handleLog` to the `SuperwallDelegate`. ## 1.0.0-alpha.42 ### Fixes * Makes sure client apps use our proguard file. ## 1.0.0-alpha.41 ### Fixes * Removes need for `SCHEDULED_EXACT_ALARM` permission in manifest. ## 1.0.0-alpha.40 ### Fixes * Fixes issue presenting paywalls to users who had their device language set to Russian, Polish or Czech. ## 1.0.0-alpha.39 ### Fixes * Adds missing `presentationSourceType` to `PaywallInfo`. * Fixes issue where the status bar color was always dark regardless of paywall color. * Adds `TypeToken` to proguard rules to prevent r8 from 'optimizing' our code and causing a crash. ## 1.0.0-alpha.38 ### Enhancements * SW-2682: Adds `Superwall.instance.latestPaywallInfo`, which you can use to get the `PaywallInfo` of the most recently presented view controller. * SW-2683: Adds `Superwall.instance.isLoggedIn`, which you can use to check if the user is logged in. ### Fixes * Removes use of `USE_EXACT_ALARM` permission that was getting apps rejected. * Fixes issue with scheduling notifications. The paywall wasn't waiting to schedule notifications before dismissal so the permissions wasn't always showing. ## 1.0.0-alpha.37 ### Enhancements * SW-2684: Adds error logging if the `currentActivity` is `null` when trying to present a paywall. ### Fixes * Fixes bug where paywalls might not present on first app install. * Fixes bug where all `paywallResponseLoad_` events were being counted as `paywallResponseLoad_start`. * Adds ProGuard rule to prevent `DefaultLifecycleObserver` from being removed. ## 1.0.0-alpha.36 ### Enhancements * Adds `X-Subscription-Status` header to all requests. * Caches the last `subscriptionStatus`. * Adds `subscriptionStatus_didChange` event that is fired whenever the subscription status changes. * Calls the delegate method `subscriptionStatusDidChange` whenever the subscription status changes. * SW-2676: Adds a completion block to the `configure` method. ### Fixes * Fixes issue where the main thread was blocked when accessing some properties internally. * SW-2679: Fixes issue where the `subscription_start` event was being fired even if a non-recurring product was purchased. ## 1.0.0-alpha.35 ### Fixes * Fixes issue where `transaction_complete` events were being rejected by the server. ## 1.0.0-alpha.34 ### Breaking Changes * Changes `Superwall.instance.getUserAttributes()` to `Superwall.instance.userAttributes`. * `SuperwallOptions.logging.logLevel` is now non-optional. Set it to `LogLevel.none` to prevent logs from being printed to the console. ### Enhancements * SW-2663: Adds `preloadAllPaywalls()` and `preloadPaywalls(eventNames:)` to be able to manually preload paywalls. * SW-2665: Adds `Superwall.instance.userId` so you can access the current user's id. * SW-2668: Adds `preferredLocale` and `preferredLanguageLocale` to the device attributes for use in rules. * Adds `Superwall.instance.logLevel` as a convenience variable to set and get the log level. ### Fixes * SW-2664: Fixes race condition between resetting and presenting paywalls. ## 1.0.0-alpha.33 ### Fixes * Fixes issue where a user would be asked to enable notifications even if there weren't any attached to the paywall. ## 1.0.0-alpha.32 ### Enhancements * SW-2214: Adds ability to use free trial notifications with a paywall. * Adds `cancelAllScheduledNotifications()` to cancel any scheduled free trial notifications. * SW-2640: Adds `computedPropertyRequests` to `PaywallInfo`. * SW-2641: Makes `closeReason` in `PaywallInfo` non-optional. ### Fixes * Fixes issue where thrown exceptions weren't always being caught. ## 1.0.0-alpha.31 ### Enhancements * SW-2638: Adds `Restored` to `PurchaseResult`. * SW-2644: Adds `RestoreType` to `SuperwallEvent.TransactionRestore`. * SW-2643: Makes `storePayment` non-optional for a `StoreTransaction`. * SW-2642: Adds `productIdentifier` to `StorePayment`. ### Fixes * SW-2635: Fixes crash that sometimes occurred if an app was trying to get Superwall's paywall configuration in the background. ## 1.0.0-alpha.30 ### Enhancements * SW-2154: The SDK now includes a paywall debugger, meaning you can scan the QR code of any paywall in the editor to preview it on device. You can change its localization, view product attributes, and view the paywall with or without a trial. ### Fixes * More bug fixes relating to the loading of products. ## 1.0.0-alpha.29 ### Fixes * SW-2631: Fixes issue where paywalls weren't showing if the products within them had a base plan or offer ID set. ## 1.0.0-alpha.28 ### Fixes * SW-2615: Fixes crash on Android versions \< 8 when accessing the Android 8+ only class Period. * SW-2616: Fixes crash where the `PaywallViewController` was sometimes being added to a new parent view before being removed from it's existing parent view. ## 1.0.0-alpha.27 ### Breaking Changes * \#SW-2218: Changes the `PurchaseController` purchase function to `purchase(activity:productDetails:basePlanId:offerId:)`. This adds support for purchasing offers and base plans. ### Enhancements * \#SW-2600: Backport device attributes * Adds support for localized paywalls. * Paywalls are only preloaded if their associated rules can match. * Adds status bar to full screen paywalls. ### Fixes * Fixes issue where holdouts were still matching even if the limit set for their corresponding rules were exceeded. * \#SW-2584: Fixes issue where prices with non-terminating decimals were causing products to fail to load. ## 1.0.0-alpha.26 ### Fixes * Additional fixes to make Google billing more robust. * Fixes an issue that causes `transaction_complete` events to fail. ## 1.0.0-alpha.25 ### Fixes * Fixes [Google Billing Crash on Samsung devices](https://community.revenuecat.com/sdks-51/how-to-fix-crash-too-many-bind-requests-999-for-service-intent-inappbillingservice-3317). ## 1.0.0-alpha.24 ### Fixes * Fixes an issue that could cause "n/a" to be displayed on a paywall in place of the proper subscription period string. ## 1.0.0-alpha.23 ### Fixes * Fixes an issue where calling `identify` right after `configure` would hang b/c network requests need to access the user id to add to headers. * Fixes a potential crash when loading data from disk ## 1.0.0-alpha.22 ### Fixes * Fixes threading issue ## 1.0.0-alpha.21 ### Fixes * Changes Activity to AppCompatActivity ## 1.0.0-alpha.20 ### Enhancements ### Fixes * Fixes `app_open` race condition * Prevents calling purchase twice * Disables interactivity during purchase ## 1.0.0-alpha.19 ### Fixes * Fixes `app_launch` event not triggering ## 1.0.0-alpha.18 ### Enhancements * Adds the ability to provide an `ActivityProvider` when configuring the SDK. This is an interface containing the function `getCurrentActivity()`, which Superwall will use to present paywalls from. You would typically conform an `ActivityLifecycleTracker` to this interface. ### Fixes * Fixes a crash when storing a `List` to user attributes and if that List or a Map had a null value. ## 1.0.0-alpha.17 ### Enhancements * Adds automatic purchase controller * Improves memory handling for webviews * Hides the loading indicator on a paywall if transactionBackgroundView is set to NONE ## 1.0.0-alpha.14 ### Enhancements * Adds `trigger_session_id` to Superwall Events. * Resets the scroll position of the paywall on close. ### Fixes * Fixes issue where an invalid currency code on a device would crash the app when trying to retrieve products. ## 1.0.0-alpha.13 ### Fixes * Fixes concurrency issues when setting and retrieving values like the appUserId and seed. ## 1.0.0-alpha.11 ### Fixes * Can now use both non-recurring products and subscription products in paywalls. * Fixes a crash issue that was caused by a lazy variable being accessed before it was initialized. # 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 # Cohorting in 3rd Party Tools To easily view Superwall cohorts in 3rd party tools, we recommend you set user attributes based on the experiments that users are included in. You can also use custom placements for creating analytics events for actions such as interacting with an element on a paywall. :::android ```kotlin Kotlin override fun handleSuperwallEvent(eventInfo: SuperwallEventInfo) { when(eventInfo.event) { is SuperwallEvent.TriggerFire -> { MyAnalyticsService.shared.setUserAttributes( mapOf( "sw_experiment_${eventInfo.params.get("experiment_id").toString()}" to true, "sw_variant_${eventInfo.params.get("variant_id").toString()}" to true ) ) } else -> {} } } ``` ::: :::flutter ```dart Flutter @override void handleSuperwallEvent(SuperwallEventInfo eventInfo) async { final experimentId = eventInfo.params?['experiment_id']; final variantId = eventInfo.params?['variant_id']; switch (eventInfo.event.type) { case EventType.triggerFire: MyAnalyticsService.shared.setUserAttributes({ "sw_experiment_$experimentId": true, "sw_variant_$variantId": true }); break; default: break; } } ``` ::: :::expo ```typescript React Native handleSuperwallEvent(eventInfo: SuperwallEventInfo) { const experimentId = eventInfo.params?['experiment_id'] const variantId = eventInfo.params?['variant_id'] if (!experimentId || !variantId) { return } switch (eventInfo.event.type) { case EventType.triggerFire: MyAnalyticsService.shared.setUserAttributes({ `sw_experiment_${experimentId}`: true, `sw_variant_${variantId}`: true }); break; default: break; } } ``` ::: Once you've set this up, you can easily ask for all users who have an attribute `sw_experiment_1234` and breakdown by both variants to see how users in a Superwall experiment behave in other areas of your app. # 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 # Custom Paywall Analytics Learn how to log events from paywalls, such as a button tap or product change, to forward to your analytics service. You can create customized analytics tracking for any paywall event by using custom placements. With them, you can get callbacks for actions such as interacting with an element on a paywall sent to your [Superwall delegate](/docs/sdk/guides/using-superwall-delegate). This can be useful for tracking how users interact with your paywall and how that affects their behavior in other areas of your app. For example, in the paywall below, perhaps you're interested in tracking when people switch the plan from "Standard" and "Pro": ![](/docs/images/3pa_cp_2.jpeg) You could create a custom placement [tap behavior](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-styling-elements#tap-behaviors) which fires when a segment is tapped: ![](/docs/images/3pa_cp_1.jpeg) Then, you can listen for this placement and forward it to your analytics service: ```swift Swift extension SuperwallService: SuperwallDelegate { func handleSuperwallEvent(withInfo eventInfo: SuperwallEventInfo) { switch eventInfo.event { case let .customPlacement(name, params, paywallInfo): // Prints out didTapPro or didTapStandard print("\(name) - \(params) - \(paywallInfo)") MyAnalyticsService.shared.send(event: name, params: params) default: print("Default event: \(eventInfo.event.description)") } } } ``` For a walkthrough example, check out this [video on YouTube](https://youtu.be/4rM1rGRqDL0). # 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 # 3rd Party Analytics Forward Superwall events to your own analytics tool on Android by implementing handleSuperwallEvent in SuperwallDelegate, with typed cases for each event. ### Hooking up Superwall events to 3rd party tools SuperwallKit automatically tracks some internal events. You can [view the list of events here](/docs/sdk/guides/3rd-party-analytics/tracking-analytics). We encourage you to also track them in your own analytics by implementing the [Superwall delegate](/docs/sdk/guides/using-superwall-delegate). Using the `handleSuperwallEvent(withInfo:)` function, you can forward events to your analytics service: :::android ```kotlin override fun handleSuperwallEvent(eventInfo: SuperwallEventInfo) { println("analytics event: ${eventInfo.event.rawName}") MyAnalytics.shared.track(eventInfo.event.rawName, eventInfo.params) } ``` :::
> **Note:** You might also want to set user attribute to allow for > [Cohorting in 3rd Party Tools](/docs/sdk/guides/3rd-party-analytics/cohorting-in-3rd-party-tools). Alternatively, if you want typed versions of all these events with associated values, you can access them via `eventInfo.event`: :::android ```kotlin override fun handleSuperwallEvent(eventInfo: SuperwallEventInfo) { when(eventInfo.event) { is SuperwallPlacement.AppClose -> TODO() is SuperwallPlacement.AppInstall -> TODO() is SuperwallPlacement.AppLaunch -> TODO() is SuperwallPlacement.AppOpen -> TODO() is SuperwallPlacement.DeepLink -> TODO() is SuperwallPlacement.FirstSeen -> TODO() is SuperwallPlacement.FreeTrialStart -> TODO() is SuperwallPlacement.NonRecurringProductPurchase -> TODO() is SuperwallPlacement.PaywallClose -> TODO() is SuperwallPlacement.PaywallDecline -> TODO() is SuperwallPlacement.PaywallOpen -> TODO() is SuperwallPlacement.PaywallPresentationRequest -> TODO() is SuperwallPlacement.PaywallProductsLoadComplete -> TODO() is SuperwallPlacement.PaywallProductsLoadFail -> TODO() is SuperwallPlacement.PaywallProductsLoadStart -> TODO() is SuperwallPlacement.PaywallResponseLoadComplete -> TODO() is SuperwallPlacement.PaywallResponseLoadFail -> TODO() is SuperwallPlacement.PaywallResponseLoadNotFound -> TODO() is SuperwallPlacement.PaywallResponseLoadStart -> TODO() is SuperwallPlacement.PaywallWebviewLoadComplete -> TODO() is SuperwallPlacement.PaywallWebviewLoadFail -> TODO() is SuperwallPlacement.PaywallWebviewLoadStart -> TODO() is SuperwallPlacement.PaywallWebviewLoadTimeout -> TODO() is SuperwallPlacement.SessionStart -> TODO() is SuperwallPlacement.SubscriptionStart -> TODO() is SuperwallPlacement.SubscriptionStatusDidChange -> TODO() is SuperwallPlacement.SurveyClose -> TODO() is SuperwallPlacement.SurveyResponse -> TODO() is SuperwallPlacement.TransactionAbandon -> TODO() is SuperwallPlacement.TransactionComplete -> TODO() is SuperwallPlacement.TransactionFail -> TODO() is SuperwallPlacement.TransactionRestore -> TODO() is SuperwallPlacement.TransactionStart -> TODO() is SuperwallPlacement.TransactionTimeout -> TODO() is SuperwallPlacement.TriggerFire -> TODO() is SuperwallPlacement.UserAttributes -> TODO() } } ``` ::: > **Info:** Wanting to use events to see which product was purchased on a paywall? Check out this > [doc](/docs/sdk/guides/advanced/viewing-purchased-products). # 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 Events The SDK automatically tracks some events, which power the charts in the dashboard. We encourage you to track them in your own analytics as described in [3rd Party Analytics](..). The following Superwall events can be used as placements to present paywalls: * `app_install` * `app_launch` * `deepLink_open` * `session_start` * `paywall_decline` * `transaction_fail` * `transaction_abandon` * `survey_response` For more info about how to use these, check out [how to add them using a Placement](/docs/dashboard/dashboard-campaigns/campaigns-placements#adding-a-placement). The full list of events is as follows: | **Event Name** | **Action** | **Parameters** | | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `adServicesTokenRequest_complete` | When the AdServices token request finishes. | `["token": String]` | | `adServicesTokenRequest_fail` | When the AdServices token request fails. | `["error_message": String]` | | `adServicesTokenRequest_start` | When the AdServices token request starts. | None | | `app_close` | Anytime the app leaves the foreground. | Same as `app_install` | | `app_install` | When the SDK is configured for the first time. | `["is_superwall": true, "app_session_id": String, "using_purchase_controller": Bool]` | | `app_launch` | When the app is launched from a cold start. | Same as `app_install` | | `app_open` | Anytime the app enters the foreground. | Same as `app_install` | | `attribution_match` | When install attribution is resolved or fails to resolve. | `["provider": String, "matched": Bool, "source": String?, "confidence": String?, "match_score": Double?, "reason": String?]` | | `config_attributes` | When the attributes affecting Superwall's configuration are set or changed. | The SDK configuration options + `["using_purchase_controller": Bool, "has_delegate": Bool]` | | `config_fail` | When the Superwall configuration fails to be retrieved. | `["error_message": String]` | | `config_refresh` | When the Superwall configuration is refreshed. | `["config_build_id": String, "retry_count": Int, "cache_status": String, "fetch_duration": Double]` | | `confirm_all_assignments` | When all experiment assignments are confirmed. | None | | `custom_placement` | When the user taps on an element in the paywall that has a `custom_placement` action. | `["name": String, "params": [String: Any], "paywallInfo": PaywallInfo]` | | `customerInfo_didChange` | When the user's customer info changes. | `["from": String, "to": String]` (JSON snapshots of the entitlements before and after the change) | | [`deepLink_open`](/docs/dashboard/dashboard-campaigns/campaigns-standard-placements#using-the-deeplink-open-event) | When a user opens the app via a deep link. | `["url": String, "path": String", "pathExtension": String, "lastPathComponent": String, "host": String, "query": String, "fragment": String]` + any query parameters in the deep link URL | | `device_attributes` | When device attributes are sent to the backend every session. | Includes `app_session_id`, `app_version`, `os_version`, `device_model`, `device_locale`, and various hardware/software details. | | `enrichment_complete` | When the enrichment request completes. | `user_` and `device_` entries for each returned enrichment value | | `enrichment_fail` | When the enrichment request fails. | None | | `enrichment_start` | When the enrichment request starts. | None | | `first_seen` | When the user is first seen in the app, regardless of login status. | Same as `app_install` | | `freeTrial_start` | When a user completes a transaction for a subscription product with an introductory offer. | Same as `subscription_start` | | `identity_alias` | When the user's identity aliases after calling `identify`. | None | | `integration_attributes` | When the integration attributes are set. | The provided integration attributes | | `networkDecoding_fail` | When a response from the network fails to decode. | `["request_url": String, "response": String]` | | `nonRecurringProduct_purchase` | When the user purchases a non-recurring product. | Same as `subscription_start` | | `paywall_close` | When a paywall is closed (either manually or after a transaction succeeds). | \[“paywall\_webview\_load\_complete\_time”: String?, “paywall\_url”: String, “paywall\_response\_load\_start\_time”: String?, “paywall\_products\_load\_fail\_time”: String?, “secondary\_product\_id”: String, “feature\_gating”: Int, “paywall\_response\_load\_complete\_time”: String?, “is\_free\_trial\_available”: Bool, “is\_superwall”: true, “presented\_by”: String, “paywall\_name”: String, “paywall\_response\_load\_duration”: String?, “paywall\_identifier”: String, “paywall\_webview\_load\_start\_time”: String?, “paywall\_webview\_load\_duration”: String?, “paywall\_products\_load\_complete\_time”: String?, “paywall\_products\_load\_duration”: String?, “paywall\_product\_ids”: String, “tertiary\_product\_id”: String, “paywall\_id”: String, “app\_session\_id”: String, “paywall\_products\_load\_start\_time”: String?, “primary\_product\_id”: String, “survey\_attached”: Bool, “survey\_presentation”: String?, “presentation\_id”: String?, “close\_reason”: String, “cache\_key”: String, “build\_id”: String, “is\_scroll\_enabled”: Bool, “intro\_offer\_eligibility”: String, “shimmerView\_load\_start\_time”: String, “shimmerView\_load\_complete\_time”: String] | | [`paywall_decline`](/docs/dashboard/dashboard-campaigns/campaigns-standard-placements#using-the-paywall-decline-event) | When a user manually dismisses a paywall. | Same as `paywall_close` | | `paywall_open` | When a paywall is opened. | Same as `paywall_close` | | `paywall_page_view` | When a user views a page in a multi-page paywall (including the first page). | Same as `paywall_close` + `["page_node_id": String, "flow_position": Int, "page_name": String, "navigation_node_id": String, "navigation_type": String, "previous_page_node_id": String?, "previous_flow_position": Int?, "time_on_previous_page_ms": Int?]` | | `paywallPresentationRequest` | When something happened during the paywall presentation, whether a success or failure. | `[“source_event_name”: String, “status”: String, “is_superwall”: true, “app_session_id”: String, “pipeline_type”: String, “status_reason”: String]` | | `paywallPreload_complete` | When paywall preloading completes. | `["paywall_count": Int]` | | `paywallPreload_start` | When paywall preloading starts. | `["paywall_count": Int]` | | `paywallProductsLoad_complete` | When the request to load a paywall's products completes. | Same as `paywallResponseLoad_start` | | `paywallProductsLoad_fail` | When the request to load a paywall's products fails. | Same as `paywallResponseLoad_start` | | `paywallProductsLoad_missingProducts` | When some of the paywall's products are missing from the store. | Same as `paywallResponseLoad_start` | | `paywallProductsLoad_retry` | When the request to load a paywall's products fails and is being retried. | `["triggeredPlacementName": String?, "paywallInfo": PaywallInfo, "attempt": Int]` | | `paywallProductsLoad_start` | When the request to load a paywall's products starts. | Same as `paywallResponseLoad_start` | | `paywallResourceLoad_fail` | When a resource on the paywall's webpage fails to load (Android only). | `["url": String, "error": String]` | | `paywallResponseLoad_complete` | When a paywall request to Superwall's servers completes. | Same as `paywallResponseLoad_start` | | `paywallResponseLoad_fail` | When a paywall request to Superwall's servers fails. | Same as `paywallResponseLoad_start` | | `paywallResponseLoad_notFound` | When a paywall request returns a 404 error. | Same as `paywallResponseLoad_start` | | `paywallResponseLoad_start` | When a paywall request to Superwall's servers has started. | Same as `app_install` + `["is_triggered_from_event": Bool]` | | `paywallWebviewLoad_complete` | When a paywall's webpage completes loading. | Same as `paywall_close` | | `paywallWebviewLoad_fail` | When a paywall's webpage fails to load. | Same as `paywall_close` | | `paywallWebviewLoad_fallback` | When a paywall's webpage fails and loads a fallback version. | Same as `paywall_close` | | `paywallWebviewLoad_start` | When a paywall's webpage begins to load. | Same as `paywall_close` | | `paywallWebviewLoad_timeout` | When the loading of a paywall's webpage times out. | Same as `paywall_close` | | `paywallWebviewLoad_processTerminated` | When the paywall's web view content process terminates. | Same as `paywall_close` | | `permission_denied` | When a permission is denied after being requested from a paywall. | `["permission_name": String, "paywall_identifier": String]` | | `permission_granted` | When a permission is granted after being requested from a paywall. | `["permission_name": String, "paywall_identifier": String]` | | `permission_requested` | When a permission is requested from a paywall. | `["permission_name": String, "paywall_identifier": String]` | | `redemption_complete` | When the redemption of a code completes. | `["type": String, "code": String?]` | | `redemption_fail` | When the redemption of a code fails. | `["type": String, "code": String?]` | | `redemption_start` | When the redemption of a code is initiated. | `["type": String, "code": String?]` | | `reset` | When `Superwall.reset()` is called. | None | | `restore_complete` | When a restore completes successfully. | Same as `paywall_close` | | `restore_fail` | When a restore fails. | Same as `paywall_close` + `["error_message": String]` | | `restore_start` | When a restore is initiated. | Same as `paywall_close` | | `review_requested` | When a review is requested from the user. | `["count": Int, "type": String]` | | `session_start` | When the app is opened after at least 60 minutes since last `app_close`. | Same as `app_install` | | `shimmerView_complete` | When the shimmer view stops showing. | `["paywall_id": String, "visible_duration": Double]` | | `shimmerView_start` | When the shimmer view starts showing. | `["paywall_id": String]` | | `stripeCheckout_complete` | When a Stripe checkout session completes. | Same as `paywall_close` + `["store": "STRIPE", "product_identifier": String, "is_triggered_from_event": Bool]` | | `stripeCheckout_fail` | When a Stripe checkout session fails. | Same as `paywall_close` + `["store": "STRIPE", "product_identifier": String, "is_triggered_from_event": Bool]` | | `stripeCheckout_start` | When a Stripe checkout session starts. | Same as `paywall_close` + `["store": "STRIPE", "product_identifier": String, "is_triggered_from_event": Bool]` | | `stripeCheckout_submit` | When a Stripe checkout form is submitted. | Same as `paywall_close` + `["store": "STRIPE", "product_identifier": String, "is_triggered_from_event": Bool]` | | `subscription_start` | When a user completes a transaction for a subscription product without an introductory offer. | \[“product\_period\_days”: String, “product\_price”: String, “presentation\_source\_type”: String?, “paywall\_response\_load\_complete\_time”: String?, “product\_language\_code”: String, “product\_trial\_period\_monthly\_price”: String, “paywall\_products\_load\_duration”: String?, “product\_currency\_symbol”: String, “is\_superwall”: true, “app\_session\_id”: String, “product\_period\_months”: String, “presented\_by\_event\_id”: String?, “product\_id”: String, “trigger\_session\_id”: String, “paywall\_webview\_load\_complete\_time”: String?, “paywall\_response\_load\_start\_time”: String?, “product\_raw\_trial\_period\_price”: String, “feature\_gating”: Int, “paywall\_id”: String, “product\_trial\_period\_daily\_price”: String, “product\_period\_years”: String, “presented\_by”: String, “product\_period”: String, “paywall\_url”: String, “paywall\_name”: String, “paywall\_identifier”: String, “paywall\_products\_load\_start\_time”: String?, “product\_trial\_period\_months”: String, “product\_currency\_code”: String, “product\_period\_weeks”: String, “product\_periodly”: String, “product\_trial\_period\_text”: String, “paywall\_webview\_load\_start\_time”: String?, “paywall\_products\_load\_complete\_time”: String?, “primary\_product\_id”: String, “product\_trial\_period\_yearly\_price”: String, “paywalljs\_version”: String?, “product\_trial\_period\_years”: String, “tertiary\_product\_id”: String, “paywall\_products\_load\_fail\_time”: String?, “product\_trial\_period\_end\_date”: String, “product\_weekly\_price”: String, “variant\_id”: String, “presented\_by\_event\_timestamp”: String?, “paywall\_response\_load\_duration”: String?, “secondary\_product\_id”: String, “product\_trial\_period\_days”: String, “product\_monthly\_price”: String, “paywall\_product\_ids”: String, “product\_locale”: String, “product\_daily\_price”: String, “product\_raw\_price”: String, “product\_yearly\_price”: String, “product\_trial\_period\_price”: String, “product\_localized\_period”: String, “product\_identifier”: String, “experiment\_id”: String, “is\_free\_trial\_available”: Bool, “product\_trial\_period\_weeks”: String, “paywall\_webview\_load\_duration”: String?, “product\_period\_alt”: String, “product\_trial\_period\_weekly\_price”: String, “presented\_by\_event\_name”: String?] | | `subscriptionStatus_didChange` | When a user's subscription status changes. | `["is_superwall": true, "app_session_id": String, "subscription_status": String]` | | `survey_close` | When the user chooses to close a survey instead of responding. | None | | [`survey_response`](/docs/dashboard/dashboard-campaigns/campaigns-standard-placements#using-the-survey-response-event) | When a user responds to a paywall survey. | `["survey_selected_option_title": String, "survey_custom_response": String, "survey_id": String, "survey_assignment_key": String, "survey_selected_option_id": String]` | | `testModeModal_open` | When the test mode modal is opened. | None | | `testModeModal_close` | When the test mode modal is closed. | `["free_trial_override": String]` + `entitlement__state` and `entitlement__offer_type` for each entitlement | | `touches_began` | When the user touches the app's UIWindow for the first time (if tracked by a campaign). | Same as `app_install` | | `transaction_abandon` | When the user cancels a transaction. | Same as `subscription_start` | | `transaction_complete` | When the user completes checkout and any product is purchased. | Same as subscription\_start + \[“web\_order\_line\_item\_id”: String, “app\_bundle\_id”: String, “config\_request\_id”: String, “state”: String, “subscription\_group\_id”: String, “is\_upgraded”: String, “expiration\_date”: String, “trigger\_session\_id”: String, “original\_transaction\_identifier”: String, “id”: String, “transaction\_date”: String, “is\_superwall”: true, “store\_transaction\_id”: String, “original\_transaction\_date”: String, “app\_session\_id”: String] | | `transaction_fail` | When the payment sheet fails to complete a transaction (ignores user cancellation). | Same as `subscription_start` + `["message": String]` | | `transaction_restore` | When the user successfully restores their purchases. | Same as `subscription_start` | | `transaction_start` | When the payment sheet is displayed to the user. | Same as `subscription_start` | | `transaction_timeout` | When the transaction takes longer than 5 seconds to display the payment sheet. | `["paywallInfo": PaywallInfo]` | | `trigger_fire` | When a registered placement triggers a paywall. | `[“trigger_name”: String, “trigger_session_id”: String, “variant_id”: String?, “experiment_id”: String?, “paywall_identifier”: String?, “result”: String, “unmatched_rule_”: “”]. unmatched_rule_ indicates why a rule (with a specfiic experiment id) didn’t match. It will only exist if the result is no_rule_match. Its outcome will either be OCCURRENCE, referring to the limit applied to a rule, or EXPRESSION.` | | `user_attributes` | When the user attributes are set. | `[“aliasId”: String, “seed”: Int, “app_session_id”: String, “applicationInstalledAt”: String, “is_superwall”: true, “application_installed_at”: String] + provided attributes` | ## Install attribution (2.9.0+) When performance marketing integrations are configured and install attribution is enabled for your app in the Superwall dashboard, the SDK matches the install to the ad click that led to it. It uses the Play install referrer's click ID when available. No additional SDK call is required. If your app has the Google Advertising ID or App Set ID, provide them through `setIntegrationAttributes()` using `AttributionProvider.GOOGLE_ADS` and `AttributionProvider.GOOGLE_APP_SET`. The SDK forwards those identifiers for matching but does not collect them itself. Matching is intended for new installs, rather than backfilling users whose install was already recorded by an older SDK. It runs asynchronously within 7 days of install and never blocks startup. A successful response completes the request for that install, including when no match is found; a failed request can retry on a later launch while the install window is open. Matching is skipped while `eventTrackingBehavior` is `NONE` and can start when tracking is enabled again. On first launch, a paywall whose audiences use `acquisition_*` attributes waits up to 2 seconds for a pending match before evaluating those audiences. The resulting `acquisition_*` user attributes can be used in chart breakdowns, filters, and audiences. They are cached for the install and reapplied to new users after `identify()` or `reset()`. Forward [`SuperwallEvent.AttributionMatch`](/docs/android/sdk-reference/SuperwallEvent#install-attribution-290) through your delegate to observe the result in your own analytics. ### IP address collection Apps using the Superwall MMP collect best-effort public IPv4 and IPv6 device attributes. Apps that set an `AttributionProvider.APPSFLYER_ID` collect the public IPv4 attribute. These lookups are skipped while `eventTrackingBehavior` is `NONE`. If your app uses the MMP or sets an AppsFlyer ID, declare IP address collection in your Play Console data safety form. # 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 Purchasing If you need fine-grain control over the purchasing pipeline, use a purchase controller to manually handle purchases and subscription status. > **Warning:** Using a `PurchaseController` is only recommended for **advanced** use cases. By default, Superwall handles all > subscription-related logic and purchasing operations for you out of the box. By default, Superwall handles basic subscription-related logic for you: 1. **Purchasing**: When the user initiates a checkout on a paywall. 2. **Restoring**: When the user restores previously purchased products. 3. **Subscription Status**: When the user's subscription status changes to active or expired (by checking the local receipt). However, if you want more control, you can pass in a `PurchaseController` when configuring the SDK via `configure(apiKey:purchaseController:options:)` and manually set `Superwall.shared.subscriptionStatus` to take over this responsibility. On iOS, starting in `4.15.0`, a `PurchaseController` can handle custom products attached to Superwall paywalls. Those products are not purchased with StoreKit, so your controller must route them through your own billing system. In iOS SDK `4.19.0` and later, paywalls can instead run dashboard-configured custom store checkout without a purchase controller. When using a controller, pass `product.customTransactionId` to your checkout and have your server report it as `custom_transaction_id` for revenue attribution. See [Custom Store Products](/docs/ios/guides/custom-store-products) for the full iOS setup. ### Step 1: Creating a `PurchaseController` A `PurchaseController` handles purchasing and restoring via protocol methods that you implement. :::android ```kotlin Kotlin // MyPurchaseController.kt class MyPurchaseController(val context: Context): PurchaseController { // 1 override suspend fun purchase( activity: Activity, product: StoreProduct, basePlanId: String?, offerId: String? ): PurchaseResult { if (product.isCustomProduct) { // TODO: Purchase custom products with your own billing system, then // update Superwall.instance.setSubscriptionStatus(...). return PurchaseResult.Failed("Custom product handling is not implemented") } val productDetails = product.rawStoreProduct?.underlyingProductDetails ?: return PurchaseResult.Failed("Missing Google Play product details") // TODO // ---- // Purchase productDetails via GoogleBilling, RevenueCat, Qonversion or however // you like and return a valid PurchaseResult return PurchaseResult.Purchased() } // 2 override suspend fun restorePurchases(): RestorationResult { // TODO // ---- // Restore purchases and return RestorationResult.Restored() if successful. return RestorationResult.Restored() } } ``` ::: Here’s what each method is responsible for: 1. Purchasing a given product. In here, enter your code that you use to purchase a product. Then, return the result of the purchase as a `PurchaseResult`. For Flutter, this is separated into purchasing from the App Store and Google Play. This is an enum that contains the following cases, all of which must be handled: 1. `.cancelled`: The purchase was cancelled. 2. `.purchased`: The product was purchased. 3. `.pending`: The purchase is pending/deferred and requires action from the developer. 4. `.failed(Error)`: The purchase failed for a reason other than the user cancelling or the payment pending. 2. Restoring purchases. Here, you restore purchases and return a `RestorationResult` indicating whether the restoration was successful or not. If it was, return `.restore`, or `failed` along with the error reason. ### Step 2: Configuring the SDK With Your `PurchaseController` Pass your purchase controller to the `configure(apiKey:purchaseController:options:)` method: :::android ```kotlin Kotlin // MainApplication.kt class MainApplication : android.app.Application(), SuperwallDelegate { override fun onCreate() { super.onCreate() Superwall.configure(this, "MY_API_KEY", MyPurchaseController(this)) // OR using the DSL configureSuperwall("MY_API_KEY") { purchaseController = MyPurchaseController(this@MainApplication) } } } ``` ::: ### Step 3: Keeping `subscriptionStatus` Up-To-Date You **must** set `Superwall.shared.subscriptionStatus` every time the user's subscription status changes, otherwise the SDK won't know who to show a paywall to. This is an enum that has three possible cases: 1. **`.unknown`**: This is the default value. In this state, paywalls will not show and their presentation will be ***automatically delayed*** until `subscriptionStatus` changes to a different value. 2. **`.active(let entitlements)`**: Indicates that the user has an active entitlement. Paywalls will not show in this state unless you remotely set the paywall to ignore subscription status. A user can have one or more active entitlement. 3. **`.inactive`**: Indicates that the user doesn't have an active entitlement. Paywalls can show in this state. Here's how you might do this: :::android ```kotlin Kotlin // When a subscription is purchased, restored, validated, expired, etc... myService.subscriptionStatusDidChange { if (it.hasActiveSubscription) { Superwall.instance.setSubscriptionStatus(SubscriptionStatus.Active(entitlements)) } else { Superwall.instance.setSubscriptionStatus(SubscriptionStatus.Inactive) } } ``` :::
> **Note:** `subscriptionStatus` is cached between app launches ### Listening for subscription status changes If you need a simple way to observe when a user's subscription status changes, on iOS you can use the `Publisher` for it. Here's an example: :::android ```kotlin Kotlin Superwall.instance.subscriptionStatus.collect { status: SubscriptionStatus -> // React to changes } ``` ::: You can do similar tasks with the `SuperwallDelegate`, such as [viewing which product was purchased from a paywall](/docs/sdk/guides/3rd-party-analytics#using-events-to-see-purchased-products). ### Product Overrides > **Note:** Product overrides allow you to dynamically substitute products on paywalls without modifying the paywall design in the Superwall dashboard. When using a `PurchaseController`, you may want to override specific products shown on your paywalls. This is useful for: * A/B testing different subscription tiers * Showing region-specific products * Dynamically changing products based on user segments * Testing promotional pricing without modifying paywalls **How Product Overrides Work:** 1. Product names (e.g., "primary", "secondary") must match exactly as defined in the Superwall dashboard's Paywall Editor 2. The SDK substitutes the original product IDs with your override IDs before fetching from the App Store 3. The paywall maintains its visual design while showing the substituted products 4. Your `PurchaseController` will receive the overridden products when `purchase(product:)` is called > **Warning:** Product overrides only affect the products shown on paywalls. They don't change your subscription logic or entitlement validation. ## Replacing an existing subscription (2.9.0+) A paywall Purchase action can replace an active subscription that shares an entitlement with the new subscription. Superwall's built-in controller handles Google Play subscription updates automatically. When using your own purchase controller, implement the five-argument `purchase` overload and forward the supplied `ProductReplacement` to your billing provider. Existing four-argument implementations ignore replacement details. See [`PurchaseController` subscription replacement](/docs/android/sdk-reference/PurchaseController#subscription-replacement-290) for eligibility, replacement modes, and custom store handling. ## Offer selection In your purchase controller, honor the SDK's resolved `offerId`. A `null` value means the base plan without an offer, including a paywall product configured with `:sw-none`. Do not substitute a trial or default offer. See [Selecting the purchase offer](/docs/android/sdk-reference/PurchaseController#selecting-the-purchase-offer). ## Internal constructors (2.10.0+) Configure the SDK with `Superwall.configure` and use `Superwall.instance`. SDK-internal classes, including `AutomaticPurchaseController`, now have internal constructors. Apps that configure the SDK normally need no changes. See the [changelog](/docs/android/changelog) for the complete list of internal API changes and deprecated iOS-port types. # 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 # Custom callbacks Handle custom callback requests from paywalls to run app-side logic and return results. > **Info:** Available from Android SDK 2.7.0. ## Overview Custom callbacks let a paywall request arbitrary actions from your app and receive results that determine which branch (`onSuccess` / `onFailure`) executes inside the paywall. Common use cases include validating user input, fetching data, or running business logic that lives outside the paywall. ## How it works 1. In the paywall editor, attach a **Custom callback** action to an element (button, form submit, etc.) and give it a name (e.g. `validate_email`). 2. When the user triggers that element the SDK calls your `onCustomCallback` handler with a `CustomCallback` object. 3. Your handler runs whatever logic is needed and returns a `CustomCallbackResult` — either `.success()` or `.failure()` — with optional data. 4. The paywall receives the result and executes the matching `onSuccess` or `onFailure` branch. ## Setting up the handler Register the handler on a `PaywallPresentationHandler` before calling `register`: ```kotlin val handler = PaywallPresentationHandler() handler.onCustomCallback { callback -> when (callback.name) { "validate_email" -> { val email = callback.variables?.get("email") as? String if (isValidEmail(email)) { CustomCallbackResult.success(mapOf("validated" to true)) } else { CustomCallbackResult.failure(mapOf("error" to "Invalid email")) } } else -> CustomCallbackResult.failure() } } Superwall.instance.register(placement = "campaign_trigger", handler = handler) { // Feature launched } ``` ## CustomCallback The `CustomCallback` data class is passed to your handler: ## CustomCallbackResult Return one of the following from your handler to signal the outcome: ```kotlin // Success — the paywall's onSuccess branch runs CustomCallbackResult.success(data = mapOf("key" to "value")) // Failure — the paywall's onFailure branch runs CustomCallbackResult.failure(data = mapOf("error" to "Something went wrong")) ``` Both `success()` and `failure()` accept an optional `data` map whose values are sent back to the paywall and accessible as `callbacks..data.`. ## Callback behavior When configuring the custom callback action in the paywall editor you can choose between two behaviors: * **Blocking** — the paywall waits for your handler to return before continuing the tap-action chain. Use this when the next step depends on the result (e.g. form validation). * **Non-blocking** — the paywall continues immediately. The `onSuccess` / `onFailure` handlers still fire when the result arrives, but subsequent actions in the chain do not wait. ## Accessing returned data in the paywall Inside the paywall you can reference the returned data using the pattern `callbacks..data.`. For example, if the callback named `validate_email` returns `mapOf("validated" to true)`, the paywall can access `callbacks.validate_email.data.validated`. # 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 # Custom Paywall Actions Run your own Android code when a paywall button is tapped. Give the element a custom action in Superwall, then handle it in handleCustomPaywallAction. For example, adding a custom action called `help_center` to a button in your paywall gives you the opportunity to present a help center whenever that button is pressed. To set this up, implement `handleCustomPaywallAction(withName:)` in your `SuperwallDelegate`: :::android ```kotlin override fun handleCustomPaywallAction(name: String) { if (name == "help_center") { HelpCenterManager.present() } } ``` :::
> **Note:** Remember to set `Superwall.shared.delegate`! For implementation details, see the [Superwall Delegate](/docs/sdk/guides/using-superwall-delegate) guide. # 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 # Purchasing Products Outside of a Paywall Buy Google Play products outside a paywall with the Superwall Android SDK's purchase method, pick a base plan and offer, and read the PurchaseResult. If you're using Superwall for revenue tracking, but want a hand with making purchases in your implementation, you can use our `purchase` methods: :::android ```kotlin Android // Purchase product with first available baseplan Superwall.instance.purchase("my_product_id") // Purchase product with base plan and cheapest/free offer Superwall.instance.purchase("my_product_id:base_plan:sw-auto") // Purchase product with a specified offer Superwall.instance.purchase("my_product_id:base_plan:offer") // Purchase product with no offer Superwall.instance.purchase("my_product_id:base_plan:sw-none") ``` ::: For iOS, the `purchase()` method supports StoreKit 1, 2 and Superwall's abstraction over a product, `StoreProduct`. You can fetch the products you've added to Superwall via the `products(for:)` method. Similarly, in Android, you can fetch a product using a product identifier — and the first base plan will be selected: :::android ```kotlin Android val products = Superwall.instance.getProducts("id1", "id2") ``` ::: If you already have your own product fetching code, simply pass the product representation to these methods. For example, in StoreKit 1 — an `SKProduct` instance, in StoreKit 2, `Product`, etc. Each `purchase()` implementation returns a `PurchaseResult`, which informs you of the transaction's resolution: * `.cancelled`: The purchase was cancelled. * `.purchased`: The product was purchased. * `.pending`: The purchase is pending/deferred and requires action from the developer. * `.failed(Error)`: The purchase failed for a reason other than the user cancelling or the payment pending. # 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 # Game Controller Support Let players navigate Superwall paywalls with a game controller on Android. Set isGameControllerEnabled to true and the SDK forwards gamepad input for you. :::android First set the `SuperwallOption` `isGameControllerEnabled` to `true`: ```kotlin Superwall.instance.options.isGameControllerEnabled = true ``` Then Superwall will automatically listen for gamepad events and forward them to your paywall! ::: :::flutter First set the `SuperwallOption` `isGameControllerEnabled` to `true`: ```dart Superwall.instance.options.isGameControllerEnabled = true ``` Then Superwall will automatically listen for gamepad events and forward them to your paywall! ::: :::expo First set the `SuperwallOption` `isGameControllerEnabled` to `true`: ```typescript Superwall.instance.options.isGameControllerEnabled = true ``` Then Superwall will automatically listen for gamepad events and forward them to your paywall! ::: # 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 # Observer Mode Report Google Play Billing purchases made outside Superwall on Android with observer mode, so the transactions show up in your Superwall dashboard. If you wish to make purchases outside of Superwall's SDK and paywalls, you can use **observer mode** to report purchases that will appear in the Superwall dashboard, such as transactions: ![](/docs/images/om_transactions.png) This is useful if you are using Superwall solely for revenue tracking, and you're making purchases using frameworks like StoreKit or Google Play Billing Library directly. Observer mode will also properly link user identifiers to transactions. To enable observer mode, set it using `SuperwallOptions` when configuring the SDK: :::android ## Tab ```kotlin Android (Automatic) val options = SuperwallOptions() options.shouldObservePurchases = true Superwall.configure(this, "your_api_key", options = options) // In your purchase methods, replace Google's billing code with Superwall's proxy val productDetailsParams = SuperwallBillingFlowParams.ProductDetailsParams .newBuilder() .setOfferToken("test_offer_token") .setProductDetails(mockProductDetails) .build() val params = SuperwallBillingFlowParams .newBuilder() .setIsOfferPersonalized(true) .setObfuscatedAccountId(...) .setObfuscatedProfileId(...) .setProductDetailsParamsList(listOf(productDetailsParams)) .build() billingClient.launchBillingFlowWithSuperwall() ``` ## Tab ```kotlin Android (Manual) val options = SuperwallOptions() options.shouldObservePurchases = true Superwall.configure(this, "your_api_key", options = options) // In your purchase methods, begin by tracking the purchase start Superwall.instance.observePurchaseStart(productDetails) // On succesful purchase Superwall.instance.observePurchaseResult(billingResult, purchases) // On purchase error Superwall.instance.observePurchaseError(productDetails, error) ``` ::: There are a few things to keep in mind when using observer mode: 1. On iOS, if you're using StoreKit 2, then Superwall solely reports transaction completions. If you're using StoreKit 1, then Superwall will report transaction starts, abandons, and completions. 2. When using observer mode, you can't make purchases using our SDK — such as `Superwall.shared.purchase(aProduct)`. For more on setting up revenue tracking, check out this [doc](/docs/dashboard/dashboard-settings/overview-settings-revenue-tracking). # 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 # Retrieving and Presenting a Paywall Yourself Get a paywall yourself with getPaywall on Android and show it in your own Jetpack Compose or view layout, with skip handling and best practices. ::::android {/* The native iOS and Android text, shared by both. presenting.mdx includes it inside its :::ios and :::android blocks, because the SDK filter has no block that matches two SDKs. */} If you want complete control over the paywall presentation process, you can use `getPaywall(forPlacement:params:paywallOverrides:delegate:)`. This returns the `UIViewController` subclass `PaywallViewController`, which you can then present however you like. Or, you can use a SwiftUI `View` via `PaywallView`. The following is code is how you'd mimic [register](/docs/sdk/quickstart/feature-gating): ## Tab ```swift Swift final class MyViewController: UIViewController { private func presentPaywall() async { do { // 1 let paywallVc = try await Superwall.shared.getPaywall( forPlacement: "campaign_trigger", delegate: self ) self.present(paywallVc, animated: true) } catch let skippedReason as PaywallSkippedReason { // 2 switch skippedReason { case .holdout, .noAudienceMatch, .placementNotFound: break } } catch { // 3 print(error) } } private func launchFeature() { // Insert code to launch a feature that's behind your paywall. } } // 4 extension MyViewController: PaywallViewControllerDelegate { func paywall( _ paywall: PaywallViewController, didFinishWith result: PaywallResult, shouldDismiss: Bool ) { if shouldDismiss { paywall.dismiss(animated: true) } switch result { case .purchased, .restored: launchFeature() case .declined: let closeReason = paywall.info.closeReason let featureGating = paywall.info.featureGatingBehavior if closeReason != .forNextPaywall && featureGating == .nonGated { launchFeature() } } } } ``` ## Tab ```swift Objective-C @interface MyViewController : UIViewController - (void)presentPaywall; @end @interface MyViewController () @end @implementation MyViewController - (void)presentPaywall { // 1 [[Superwall sharedInstance] getPaywallForEvent:@"campaign_trigger" params:nil paywallOverrides:nil delegate:self completion:^(SWKGetPaywallResult * _Nonnull result) { if (result.paywall != nil) { [self presentViewController:result.paywall animated:YES completion:nil]; } else if (result.skippedReason != SWKPaywallSkippedReasonNone) { switch (result.skippedReason) { // 2 case SWKPaywallSkippedReasonHoldout: case SWKPaywallSkippedReasonUserIsSubscribed: case SWKPaywallSkippedReasonEventNotFound: case SWKPaywallSkippedReasonNoRuleMatch: case SWKPaywallSkippedReasonNone: break; }; } else if (result.error) { // 3 NSLog(@"%@", result.error); } }]; } -(void)launchFeature { // Insert code to launch a feature that's behind your paywall. } // 4 - (void)paywall:(SWKPaywallViewController *)paywall didFinishWithResult:(enum SWKPaywallResult)result shouldDismiss:(BOOL)shouldDismiss { if (shouldDismiss) { [paywall dismissViewControllerAnimated:true completion:nil]; } SWKPaywallCloseReason closeReason; SWKFeatureGatingBehavior featureGating; switch (result) { case SWKPaywallResultPurchased: case SWKPaywallResultRestored: [self launchFeature]; break; case SWKPaywallResultDeclined: closeReason = paywall.info.closeReason; featureGating = paywall.info.featureGatingBehavior; if (closeReason != SWKPaywallCloseReasonForNextPaywall && featureGating == SWKFeatureGatingBehaviorNonGated) { [self launchFeature]; } break; } } @end ``` ## Tab ```swift SwiftUI import SuperwallKit struct MyAwesomeApp: App { @State var store: AppStore = .init() init() { Superwall.configure(apiKey: "MyAPIKey") } var body: some Scene { WindowGroup { ContentView() .fullScreenCover(isPresented: $store.showPaywall) { // You can just use 'placement' at a minimum. The 'feature' // Closure fires if they convert PaywallView(placement: "a_placement", onSkippedView: { skip in switch skip { case .userIsSubscribed, .holdout(_), .noRuleMatch, .eventNotFound: MySkipView() } }, onErrorView: { error in MyErrorView() }, feature: { // User is subscribed as a result of the paywall purchase // Or they already were (which would happen in `onSkippedView`) }) } } } } ``` ## Tab ```kotlin Kotlin import androidx.compose.runtime.Composable import com.superwall.sdk.compose.PaywallComposable import com.superwall.sdk.paywall.view.delegate.PaywallViewCallback @Composable fun EmbeddedPaywall(placement: String, delegate: PaywallViewCallback) { PaywallComposable( placement = placement, delegate = delegate, ) } ``` This does the following: 1. Gets the paywall view controller. 2. Handles the cases where the paywall was skipped. 3. Catches any presentation errors. 4. Implements the delegate. This is called when the user is finished with the paywall. First, it checks `shouldDismiss`. If this is true then is dismissed the paywall from view before launching any features. This may depend on the `result` depending on how you first presented your view. Then, it switches over the `result`. If the result is `purchased` or `restored` the feature can be launched. However, if the result is `declined`, it checks that the the `featureGating` property of `paywall.info` is `nonGated` and that the `closeReason` isn't `.forNextPaywall`. :::android Use the SDK's `PaywallComposable` from the `com.superwall.sdk:superwall-compose` artifact, with the same version as `superwall-android`. In 2.10.0+, changing `placement` loads a new paywall and releases the previous view. Host it in an Activity; if none is available, it calls `errorComposable` rather than crashing. Its default error message is localized. Embedded paywalls can request notification permission and schedule trial reminders through the host Activity. ::: ### Best practices 1. **Make sure to prevent a paywall from being accessed after a purchase has occurred**. If a user purchases from a paywall, it is your responsibility to make sure that the user can't access that paywall again. For example, if after successful purchase you decide to push a new view on to the navigation stack, you should make sure that the user can't go back to access the paywall. 2. **Make sure the paywall view controller deallocates before presenting it elsewhere**. If you have a paywall view controller presented somewhere and you try to present the same view controller elsewhere, you will get a crash. For example, you may have a paywall in a tab bar controller, and then you also try to present it modally. We plan on improving this, but currently it's your responsibility to ensure this doesn't happen. :::ios 3. **Listening for Loading State Changes**. If you have logic that depends on the progress of the paywall's loading state, you can use the delegate function `paywall(_:loadingStateDidChange:)`. Or, if you have an instance of a `PaywallViewController`, you can use the published property: ```swift let stateSub = paywall.$loadingState.sink { state in print(state) } ``` ::: :::: :::expo The Expo SDK doesn't have `getPaywall`. To get a paywall and show it yourself, render the `` component. It retrieves the paywall for a placement and shows it inside your own layout: inline in a screen, as an overlay, or in your own React Native `Modal`. See [`PaywallView`](/docs/expo/sdk-reference/components/PaywallView) for all of its props. The following code shows a paywall in a `Modal` and mimics [register](/docs/sdk/quickstart/feature-gating): ```tsx import { useState } from "react"; import { Button, Modal, StyleSheet } from "react-native"; import { PaywallView } from "expo-superwall"; export function MyScreen() { const [showPaywall, setShowPaywall] = useState(false); const launchFeature = () => { // Insert code to launch a feature that's behind your paywall. }; return ( <>