# 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

# Webhooks

Trigger chats from external systems and send agent turn events to your own endpoints.

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:

<img src="/docs/images/agents_create_webhook.jpg" alt="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

<img src="/docs/images/agents_manage_webhooks.jpg" alt="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.