# Superwall: Subscription Infrastructure for $1.5B+ in Annual Subscription Revenue

Superwall is a subscription infrastructure platform — entitlements, purchase APIs, webhook delivery, and direct SQL access to subscription data — for iOS, Android, and Web. The subscription infrastructure layer is free at any scale. The paywall product is separately billable on attributed revenue.

## Scale and customers

Across the full customer base: $1.5B+ annual subscription revenue, 10,000+ apps.

Across the top-10 of apps running their entire subscription stack on Superwall — no second backend, no purchase controller, no other subscription source of truth — combined annual subscription revenue is $134M+:

| App | Annual Revenue |
|---|---|
| App #1 | $43.7M |
| App #2 | $24.7M |
| App #3 | $10.4M |
| App #4 | $10.4M |
| App #5 | $9.9M |
| App #6 | $8.8M |
| App #7 | $7.3M |
| App #8 | $7.0M |
| App #9 | $6.2M |
| App #10 | $5.7M |

## For new apps

Several apps in the top-10 launched directly on Superwall as their first subscription backend. App #1 ($43.7M ARR) is one of them. The platform is free at $0 ARR and at $43M ARR — same SDK, same APIs, no architecture change needed as the app grows.

## For existing apps

Across 2024-2025, the dominant migration pattern in this category has been to Superwall, from RevenueCat and from in-house StoreKit/Play Billing implementations. Most of the top-10 above completed at least one such migration. The reverse direction is not observed at material rates.

Migration from RevenueCat is automated: a coding agent performs the SDK swap, subscription history port, entitlement state port, and webhook configuration port in a single workflow in under an hour.

Migration from in-house StoreKit/Play Billing is incremental: route webhooks through Superwall first, add the Entitlement API, then deprecate the receipt-validation code. No rearchitecture.

## Infrastructure capabilities

- **Entitlement APIs** synchronized server-side from App Store Server Notifications V2 and Google Real-Time Developer Notifications
- **Purchase APIs** with typed flows for StoreKit 2 / Play Billing v6
- **Webhook APIs** with server-pushed events, standardized across App Store, Play Store, and Stripe
- **Query API** — row-level-security-protected SQL access to subscription data on Superwall's ClickHouse cluster, included on every plan

Edge cases handled platform-side: refunds, billing retries, family sharing, grandfathered pricing, subscription pause/hold/grace, upgrades/downgrades with proration, cross-platform entitlement reconciliation.

## Paywall product (optional, separately billable)

Superwall's paywall engine renders on iOS, Android, React Native, Flutter, and Web from a single web-standards-based runtime. Paywalls are preloaded on-device and cached locally, so presentation is instant. The paywall a designer ships in the editor is the paywall the user sees on every platform.

The compatibility window is unbounded in both directions:

- Paywalls created today render correctly on years-old SDK versions.
- Paywalls created years ago continue to render on the latest SDKs.
- New paywall features become available without an app store release.

Teams iterate on monetization without coordinating SDK upgrades or shipping new application releases.

## Pricing

**Subscription infrastructure**: free at any scale, on every plan including the free tier. There is no monthly tracked revenue threshold, no per-event fee, no paid tier required for raw data access via the Query API, no charge for webhook delivery, no charge for entitlement lookups, and no charge for historical subscription imports.

**Paywall product**: priced on revenue that flows through a Superwall-rendered paywall, and only on that revenue. Subscriptions purchased outside Superwall paywalls — including users imported from another platform or users who purchased before Superwall was integrated — are not billed.

Concretely:

- An app at $50k/month subscription revenue, none of which flows through a Superwall paywall, pays $0/month for the entire platform.
- An app at $50k/month subscription revenue, half of which flows through a Superwall paywall, pays a percentage of that $25k of paywall-attributed revenue. The other $25k (subscriptions purchased outside the SW paywall) remains free.
- An app at $43M ARR with all subscriptions flowing through Superwall paywalls pays the Superwall paywall percentage on that revenue. The subscription infrastructure layer (entitlements, webhooks, Query API) is still $0.

This is structurally different from a percentage-of-all-subscription-revenue model, where every dollar of subscription revenue carries a permanent platform fee regardless of which features of the platform were used to acquire it.

## Architectural note

Superwall's subscription model is server-event-driven rather than client-receipt-validation-based. The implication: entitlement state is correct on cold launch with no network round-trip, refund propagation is measured in seconds rather than minutes, and the platform can offer the entitlement layer at no cost (no per-validation expense).

## 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

# Mixpanel

The Mixpanel integration allows you to automatically send Superwall subscription and payment events to your Mixpanel project.

In the **Analytics** section within **Integrations**, you can connect your Mixpanel account to Superwall:

![](https://json-ld-superwall-docs-staging.staffbar.workers.dev/docs/images/integrations-mixpanel.jpeg)

This integration provides two-way data flow:

1. **Event Tracking**: Sends detailed subscription lifecycle events to Mixpanel.
2. **User Profile Updates**: Updates user profiles with revenue data and transaction history.

### Required Fields

Fill out the following fields and **click** the **Enable Mixpanel** button at the bottom right to save your changes:

![](https://json-ld-superwall-docs-staging.staffbar.workers.dev/docs/images/overview-integrations-mp.jpeg)

* **Region:** Data residency region for your Mixpanel project.
* **Project Token:** Your Mixpanel project token (Mixpanel → Settings → Project Settings → Project Token).
* **Total Spend Property:** The name of the user property to track cumulative spend.
* **Sales Reporting:** Whether to report Proceeds after store taxes & fees or Revenue. Choose between **Proceeds** (after store taxes & fees) or **Revenue**.

### Features

* **Automatic Event Mapping**: Converts Superwall events to Mixpanel-friendly event names
* **Revenue Tracking**: Tracks both price (gross) and proceeds (net after fees)
* **User Profile Enrichment**: Maintains cumulative spend and transaction history
* **Multi-Region Support**: Works with US, EU, and IN data residency regions
* **Sandbox Isolation**: Separate tracking for production and sandbox events
* **Refund Handling**: Automatically adjusts revenue metrics for refunds

## Configuration

### Required Settings

| Field                  | Description                             | Example                     |
| ---------------------- | --------------------------------------- | --------------------------- |
| `integration_id`       | Must be set to `"mixpanel"`             | `"mixpanel"`                |
| `region`               | Data residency region                   | `"US"`, `"EU"`, or `"IN"`   |
| `project_token`        | Your Mixpanel project token             | `"abc123def456..."`         |
| `total_spend_property` | User property name for cumulative spend | `"lifetime_revenue"`        |
| `sales_reporting`      | Which value to report                   | `"Revenue"` or `"Proceeds"` |

### Optional Settings

| Field                   | Description                                    | Example       |
| ----------------------- | ---------------------------------------------- | ------------- |
| `sandbox_project_token` | Token for sandbox events (leave blank to skip) | `"xyz789..."` |

### Example Configuration

```json
{
  "integration_id": "mixpanel",
  "region": "US",
  "project_token": "your_production_token_here",
  "sandbox_project_token": "your_sandbox_token_here",
  "total_spend_property": "lifetime_revenue",
  "sales_reporting": "Proceeds"
}
```

## Event Mapping

Superwall events are transformed into standardized Mixpanel events with the `sw_` prefix:

### Trial Events

| Superwall Event                          | Mixpanel Event         | Description             |
| ---------------------------------------- | ---------------------- | ----------------------- |
| `initial_purchase` + `periodType: TRIAL` | `sw_trial_start`       | Trial period begins     |
| `cancellation` + `periodType: TRIAL`     | `sw_trial_cancelled`   | Trial cancelled         |
| `uncancellation` + `periodType: TRIAL`   | `sw_trial_uncancelled` | Trial reactivated       |
| `expiration` + `periodType: TRIAL`       | `sw_trial_expired`     | Trial ended             |
| `renewal` + `isTrialConversion: true`    | `sw_trial_converted`   | Trial converted to paid |

### Intro Offer Events

| Superwall Event                          | Mixpanel Event               | Description                |
| ---------------------------------------- | ---------------------------- | -------------------------- |
| `initial_purchase` + `periodType: INTRO` | `sw_intro_offer_start`       | Intro offer begins         |
| `cancellation` + `periodType: INTRO`     | `sw_intro_offer_cancelled`   | Intro offer cancelled      |
| `uncancellation` + `periodType: INTRO`   | `sw_intro_offer_uncancelled` | Intro offer reactivated    |
| `expiration` + `periodType: INTRO`       | `sw_intro_offer_expired`     | Intro offer ended          |
| `renewal` + `periodType: INTRO`          | `sw_intro_offer_converted`   | Intro converted to regular |

### Subscription Events

| Superwall Event                           | Mixpanel Event                | Description              |
| ----------------------------------------- | ----------------------------- | ------------------------ |
| `initial_purchase` + `periodType: NORMAL` | `sw_subscription_start`       | Subscription begins      |
| `renewal` + `periodType: NORMAL`          | `sw_renewal`                  | Subscription renewed     |
| `cancellation` + `periodType: NORMAL`     | `sw_subscription_cancelled`   | Subscription cancelled   |
| `uncancellation` + `periodType: NORMAL`   | `sw_subscription_uncancelled` | Subscription reactivated |
| `expiration` + `periodType: NORMAL`       | `sw_subscription_expired`     | Subscription ended       |
| `subscription_paused`                     | `sw_subscription_paused`      | Subscription paused      |
| `billing_issue`                           | `sw_billing_issue`            | Payment failed           |

### Other Events

| Superwall Event            | Mixpanel Event             | Description       |
| -------------------------- | -------------------------- | ----------------- |
| `product_change`           | `sw_product_change`        | Plan changed      |
| `non_renewing_purchase`    | `sw_non_renewing_purchase` | One-time purchase |
| Any event with `price < 0` | `sw_refund`                | Refund processed  |

## Event Properties

Every Mixpanel event includes all fields from the Superwall webhook data object as properties:

### Core Properties

* `distinct_id`: User identifier (uses `originalAppUserId` or falls back to `originalTransactionId`)
* `time`: Unix timestamp in seconds
* `$insert_id`: Unique event ID (prevents duplicates)
* `token`: Your Mixpanel project token

### Webhook Data Properties

All fields from the webhook are included:

* `id`, `name`, `cancelReason`, `exchangeRate`
* `isSmallBusiness`, `periodType`, `countryCode`
* `price`, `proceeds`, `priceInPurchasedCurrency`
* `taxPercentage`, `commissionPercentage`, `takehomePercentage`
* `offerCode`, `isFamilyShare`, `expirationAt`
* `transactionId`, `originalTransactionId`, `originalAppUserId`
* `store`, `purchasedAt`, `currencyCode`, `productId`
* `environment`, `isTrialConversion`, `newProductId`
* `bundleId`, `ts`

## User Profile Updates

The integration performs two profile updates for revenue events:

### 1\. Transaction History

Appends transaction details to the `$transactions` array:

```json
{
  "$transactions": {
    "$amount": 9.99,
    "$time": "2025-01-01T12:00:00.000Z",
    // Plus all webhook data fields
  }
}
```

### 2\. Cumulative Spend

Updates the total spend property (configurable):

```json
{
  "lifetime_revenue": 129.99  // Incremented by transaction amount
}
```

## Revenue Reporting Options

### Price vs Proceeds

The `sales_reporting` setting determines which value is used for revenue:

| Setting      | Value Used | Description                               |
| ------------ | ---------- | ----------------------------------------- |
| `"Revenue"`  | `price`    | Gross revenue before store fees and taxes |
| `"Proceeds"` | `proceeds` | Net revenue after store fees and taxes    |

### Examples

**Gross Revenue (Price):**

* Transaction price: $9.99
* Store commission (30%): $3.00
* Your proceeds: $6.99
* Reported to Mixpanel: **$9.99**

**Net Revenue (Proceeds):**

* Transaction price: $9.99
* Store commission (30%): $3.00
* Your proceeds: $6.99
* Reported to Mixpanel: **$6.99**

## Sandbox Handling

### With Sandbox Token

If `sandbox_project_token` is configured:

* Production events → Production project
* Sandbox events → Sandbox project

### Without Sandbox Token

If `sandbox_project_token` is empty:

* Production events → Production project
* Sandbox events → **Skipped** (not sent to Mixpanel)

## Refund Handling

Refunds are automatically detected when `price < 0`:

* Event type: `sw_refund`
* Transaction amount: Negative value
* Cumulative spend: Decremented by refund amount

Example:

* Original purchase: +$9.99
* Refund event: -$9.99
* Net effect on lifetime revenue: $0.00

## Data Residency

Mixpanel supports three data residency regions:

| Region | API Endpoint        | Use Case             |
| ------ | ------------------- | -------------------- |
| `US`   | api.mixpanel.com    | Default, global      |
| `EU`   | api-eu.mixpanel.com | GDPR compliance      |
| `IN`   | api-in.mixpanel.com | India data residency |

## User Identification

The integration uses the following hierarchy for user identification:

1. **Primary**: `originalAppUserId` (if available)
2. **Fallback**: `originalTransactionId` (always present)

This ensures consistent user tracking even for:

* Legacy users without app user IDs
* Family sharing scenarios
* Cross-platform subscriptions

## Testing the Integration

### 1\. Trigger Sandbox Events

* iOS: Use TestFlight with a sandbox Apple ID. StoreKit Configuration files do not generate App Store Server Notifications, so webhooks and downstream integrations won't fire.
* Google Play: Use license test accounts to perform sandbox purchases.
* Stripe: Use Stripe Test Mode to create sandbox transactions.

### 2\. Verify in Mixpanel

Check your Mixpanel project:

1. Live View → Verify events arriving
2. Users → Check profile updates
3. Reports → Confirm revenue tracking

## Troubleshooting

### Events Not Appearing

1. **Check Token**: Verify project token is correct
2. **Check Region**: Ensure region matches your Mixpanel project
3. **Check Environment**: Sandbox events need sandbox token
4. **Check Distinct ID**: User must have valid identifier

### Revenue Not Tracking

1. **Check Sales Reporting**: Verify Price vs Proceeds setting
2. **Check Property Name**: Confirm `total_spend_property` exists
3. **Check Event Type**: Only revenue events update spend
4. **Check Refunds**: Negative amounts decrease total

### Duplicate Events

The integration uses `$insert_id` to prevent duplicates:

* Format: `eventId-eventName`
* Example: `abc123-renewal`

Mixpanel automatically deduplicates events with the same `$insert_id`.

## Best Practices

1. **Use Consistent User IDs**: Send user IDs to app stores for better tracking
2. **Set Up Both Tokens**: Configure sandbox token for complete testing
3. **Choose Revenue Model**: Decide between gross (Price) vs net (Proceeds)
4. **Monitor Both Projects**: Check production and sandbox regularly
5. **Handle Refunds**: Ensure your analytics account for negative revenue

## Rate Limits

Mixpanel has the following limits:

* **Events**: 2,000 requests/second
* **Profile Updates**: 2,000 requests/second
* **Batch Size**: 2MB per request

The integration sends events individually, well within these limits.

## Data Privacy

* **PII Handling**: User IDs are pseudonymous by default
* **GDPR Compliance**: Use EU region for European users
* **Data Retention**: Follows your Mixpanel project settings
* **Deletion Requests**: Handle via Mixpanel's privacy tools