# 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

# Customer.io

The Customer.io integration sends subscription lifecycle events from Superwall to Customer.io's Data Pipelines API. This enables you to trigger targeted messaging campaigns, build user segments based on subscription behavior, and track the complete customer journey from trial to paid subscriber.

In the **Communication** section within **Integrations**, you can connect your Customer.io account to Superwall:

![](https://963b3ab1-superwall-docs-staging.staffbar.workers.dev/docs/images/integrations-customer-io.jpeg)

## Features

* **Real-time Event Tracking**: Subscription events are sent immediately to Customer.io as they occur
* **Multi-Region Support**: Choose between US and EU data residency to comply with data regulations
* **Flexible Revenue Reporting**: Report either gross revenue or net proceeds after store fees
* **Sandbox Environment Support**: Separate API key for testing without polluting production data
* **Anonymous User Handling**: Configurable behavior for users without an identified app user ID
* **Custom Event Names**: Remap default event names to match your existing Customer.io conventions
* **Automatic User Identification**: Smart routing between `userId` and `anonymousId` based on user state

## Configuration

### Required Settings

| Field             | Description                                          | Example                     |
| ----------------- | ---------------------------------------------------- | --------------------------- |
| `integration_id`  | Must be set to `"customerio"`                        | `"customerio"`              |
| `region`          | Data residency region for your Customer.io workspace | `"US"` or `"EU"`            |
| `api_key`         | Pipelines API key from your HTTP source              | `"abc123def456..."`         |
| `sales_reporting` | Whether to report gross Revenue or net Proceeds      | `"Revenue"` or `"Proceeds"` |

### Optional Settings

| Field                     | Description                                            | Default                       |
| ------------------------- | ------------------------------------------------------ | ----------------------------- |
| `sandbox_api_key`         | Separate Pipelines API key for sandbox/test events     | None (sandbox events skipped) |
| `anonymous_user_behavior` | How to handle events from users without an app user ID | `"send"`                      |
| `eventNameMappings`       | Custom mapping to rename default event names           | None                          |

### Example Configuration

```json
{
  "integration_id": "customerio",
  "region": "US",
  "api_key": "your-pipelines-api-key",
  "sales_reporting": "Revenue",
  "sandbox_api_key": "your-sandbox-pipelines-api-key",
  "anonymous_user_behavior": "send",
  "eventNameMappings": {
    "sw_trial_start": "trial_started",
    "sw_subscription_start": "subscription_started",
    "sw_renewal": "subscription_renewed"
  }
}
```

## Getting Your API Key

The Customer.io integration uses the **Pipelines API** (part of Customer.io Data Pipelines), not the Track API. To get your API key:

1. Log in to your Customer.io account
2. Navigate to **Data Pipelines** in the left sidebar
3. Go to **Sources**
4. Click **Add Source** and select **HTTP**
5. Name your source (e.g., "Superwall Events")
6. Copy the **API Key** displayed after creation

**Important**: The Pipelines API key is different from the Track API credentials (Site ID + API Key). Make sure you're using the correct key from Data Pipelines.

## Event Mapping

Superwall subscription events are transformed into Customer.io events based on the event type and subscription period. All events are prefixed with `sw_` by default.

### Trial Events

| Superwall Event    | Condition            | Customer.io Event      |
| ------------------ | -------------------- | ---------------------- |
| `INITIAL_PURCHASE` | `periodType = Trial` | `sw_trial_start`       |
| `CANCELLATION`     | `periodType = Trial` | `sw_trial_cancelled`   |
| `UNCANCELLATION`   | `periodType = Trial` | `sw_trial_uncancelled` |
| `EXPIRATION`       | `periodType = Trial` | `sw_trial_expired`     |
| `RENEWAL`          | `periodType = Trial` | `sw_trial_converted`   |

### Intro Offer Events

| Superwall Event    | Condition            | Customer.io Event            |
| ------------------ | -------------------- | ---------------------------- |
| `INITIAL_PURCHASE` | `periodType = Intro` | `sw_intro_offer_start`       |
| `CANCELLATION`     | `periodType = Intro` | `sw_intro_offer_cancelled`   |
| `UNCANCELLATION`   | `periodType = Intro` | `sw_intro_offer_uncancelled` |
| `EXPIRATION`       | `periodType = Intro` | `sw_intro_offer_expired`     |
| `RENEWAL`          | `periodType = Intro` | `sw_intro_offer_converted`   |

### Subscription Events

| Superwall Event    | Condition                  | Customer.io Event             |
| ------------------ | -------------------------- | ----------------------------- |
| `INITIAL_PURCHASE` | `periodType = Normal`      | `sw_subscription_start`       |
| `RENEWAL`          | `periodType = Normal`      | `sw_renewal`                  |
| `RENEWAL`          | `isTrialConversion = true` | `sw_trial_converted`          |
| `CANCELLATION`     | `periodType = Normal`      | `sw_subscription_cancelled`   |
| `UNCANCELLATION`   | `periodType = Normal`      | `sw_subscription_uncancelled` |
| `EXPIRATION`       | `periodType = Normal`      | `sw_subscription_expired`     |

### Other Events

| Superwall Event            | Customer.io Event          |
| -------------------------- | -------------------------- |
| `PRODUCT_CHANGE`           | `sw_product_change`        |
| `BILLING_ISSUE`            | `sw_billing_issue`         |
| `SUBSCRIPTION_PAUSED`      | `sw_subscription_paused`   |
| `NON_RENEWING_PURCHASE`    | `sw_non_renewing_purchase` |
| Any event with `price < 0` | `sw_refund`                |

## Event Properties

Each event sent to Customer.io includes comprehensive properties from the original Superwall event, plus additional formatted fields for revenue tracking.

### Standard Properties

All events include the complete Superwall event data:

| Property                | Description                         | Example                     |
| ----------------------- | ----------------------------------- | --------------------------- |
| `id`                    | Unique event identifier             | `"evt_abc123"`              |
| `productId`             | The subscription product ID         | `"com.app.premium.monthly"` |
| `store`                 | App store (APP\_STORE, PLAY\_STORE) | `"APP_STORE"`               |
| `environment`           | Production or Sandbox               | `"Production"`              |
| `countryCode`           | User's country code                 | `"US"`                      |
| `currencyCode`          | Transaction currency                | `"USD"`                     |
| `originalAppUserId`     | Your app's user identifier          | `"user_12345"`              |
| `originalTransactionId` | Store's original transaction ID     | `"1000000123456789"`        |
| `transactionId`         | Current transaction ID              | `"1000000987654321"`        |
| `purchasedAt`           | Purchase timestamp (ms)             | `1705312200000`             |
| `expirationAt`          | Subscription expiration (ms)        | `1707990600000`             |
| `periodType`            | Trial, Intro, or Normal             | `"Normal"`                  |
| `isTrialConversion`     | Whether this converts a trial       | `true`                      |
| `isFamilyShare`         | Family sharing purchase             | `false`                     |
| `bundleId`              | App bundle identifier               | `"com.example.app"`         |

### Revenue Properties

When the event has a non-zero price, these additional properties are included:

| Property          | Description                               | Example                     |
| ----------------- | ----------------------------------------- | --------------------------- |
| `price`           | Amount based on `sales_reporting` setting | `9.99`                      |
| `currency`        | Currency code                             | `"USD"`                     |
| `product_id`      | Product identifier                        | `"com.app.premium.monthly"` |
| `subscription_id` | Original transaction ID                   | `"1000000123456789"`        |
| `offer_code`      | Promotional offer code (if present)       | `"SUMMER2024"`              |

### Revenue vs Proceeds

The `sales_reporting` setting controls which amount is sent:

* **Revenue**: The full price charged to the customer (e.g., $9.99)
* **Proceeds**: The amount after store fees are deducted (e.g., $8.49 after Apple's 15-30% commission)

## User Identification

Customer.io uses either `userId` or `anonymousId` to identify users. The integration automatically selects the appropriate identifier based on user state.

### Known Users

For users with an `originalAppUserId` set in Superwall:

```json
{
  "userId": "user_12345",
  "event": "sw_subscription_start",
  "properties": { ... },
  "timestamp": "2024-01-15T10:30:00.000Z"
}
```

### Anonymous Users

For users without an `originalAppUserId`, the behavior depends on `anonymous_user_behavior`:

**When set to `"send"` (default)**:

* Events are sent with an `anonymousId` constructed from the store and transaction ID
* Format: `$STORE_NAME:originalTransactionId`

```json
{
  "anonymousId": "$APP_STORE:1000000123456789",
  "event": "sw_subscription_start",
  "properties": { ... },
  "timestamp": "2024-01-15T10:30:00.000Z"
}
```

**When set to `"dontSend"`**:

* Events from anonymous users are skipped entirely
* Useful if you only want to track identified users

## Sandbox Handling

The integration supports separate handling for sandbox (test) events:

### With Sandbox API Key Configured

When `sandbox_api_key` is provided:

* Production events use the main `api_key`
* Sandbox events use the `sandbox_api_key`
* Both are sent to Customer.io but can be routed to different destinations

### Without Sandbox API Key

When `sandbox_api_key` is not provided:

* Production events are sent normally
* Sandbox events are **skipped entirely**
* This prevents test data from polluting your production Customer.io workspace

## Data Residency

Customer.io offers data residency in two regions. The integration automatically routes to the correct endpoint:

| Region | API Endpoint                          |
| ------ | ------------------------------------- |
| US     | `https://cdp.customer.io/v1/track`    |
| EU     | `https://cdp-eu.customer.io/v1/track` |

Choose the region that matches your Customer.io workspace configuration. Using the wrong region will result in authentication errors.

## Custom Event Names

Use `eventNameMappings` to rename default event names to match your existing Customer.io conventions:

```json
{
  "eventNameMappings": {
    "sw_trial_start": "Started Free Trial",
    "sw_subscription_start": "Subscribed",
    "sw_renewal": "Subscription Renewed",
    "sw_subscription_cancelled": "Subscription Cancelled",
    "sw_refund": "Refund Processed"
  }
}
```

Only events you specify in the mapping are renamed. All other events keep their default `sw_` prefixed names.

## Testing the Integration

### 1\. Validate Credentials

The integration validates credentials by sending a test event to Customer.io. If the API key is invalid or the region is incorrect, you'll receive an authentication error.

### 2\. Verify in Customer.io

After sending test events:

1. Go to **Data Pipelines** → **Sources** → your HTTP source
2. Click on **Events** to see incoming events
3. Verify event names and properties match expectations

### 3\. Test Scenarios

Verify these scenarios work correctly:

* [ ] Production event with known user (should use `userId`)
* [ ] Production event with anonymous user (should use `anonymousId` or skip)
* [ ] Sandbox event with sandbox API key (should send to Customer.io)
* [ ] Sandbox event without sandbox API key (should be skipped)
* [ ] Event with custom name mapping (should use remapped name)
* [ ] Revenue event (should include `price`, `currency`, `product_id`)
* [ ] Non-revenue event like cancellation (should not include revenue properties)

## Best Practices

1. **Use separate sandbox credentials**: Configure a `sandbox_api_key` to keep test data separate from production, or leave it blank to skip sandbox events entirely.

2. **Choose the right sales reporting**: Use "Revenue" for customer-facing metrics and "Proceeds" for financial reporting that accounts for store fees.

3. **Handle anonymous users thoughtfully**: If your app requires login, use `"dontSend"` to avoid cluttering Customer.io with unidentifiable users.

4. **Keep event names consistent**: If you have existing events in Customer.io, use `eventNameMappings` to maintain naming consistency across your data.

5. **Verify your region**: Ensure your `region` setting matches your Customer.io workspace location to avoid authentication failures.

6. **Test with sandbox first**: Always test your integration configuration with sandbox events before going live with production data.

## Common Use Cases

### Win-Back Campaigns

Trigger automated campaigns when users cancel:

1. Listen for `sw_subscription_cancelled` events
2. Create a segment of recently cancelled users
3. Send a series of win-back emails with special offers

### Trial Conversion Optimization

Improve trial-to-paid conversion:

1. Track `sw_trial_start` to begin a nurture sequence
2. Send educational content about premium features
3. Trigger a special offer before trial expiration
4. Track `sw_trial_converted` to measure success

### Churn Prevention

Identify and engage at-risk subscribers:

1. Monitor `sw_billing_issue` events
2. Send immediate notification to update payment method
3. Follow up with helpful support content
4. Track resolution with subsequent `sw_renewal` events

### Revenue Analytics

Build comprehensive revenue reporting:

1. Segment users by subscription status
2. Track lifetime value using revenue properties
3. Analyze conversion rates by cohort
4. Measure impact of promotional offers via `offer_code`

## Troubleshooting

### Events Not Appearing in Customer.io

**Possible causes:**

* Incorrect API key (make sure you're using Pipelines API key, not Track API)
* Wrong region selected (US vs EU mismatch)
* Sandbox events without sandbox API key configured (events are skipped)
* Anonymous users with `dontSend` behavior (events are skipped)

**Solution:** Verify your API key is from Data Pipelines → Sources → HTTP, and check that your region matches your workspace.

### Authentication Errors

**Possible causes:**

* Using Track API credentials instead of Pipelines API key
* Region mismatch between configuration and Customer.io workspace
* API key has been revoked or regenerated

**Solution:** Generate a new HTTP source in Data Pipelines and use the fresh API key.

### Missing Revenue Properties

**Possible causes:**

* Event has zero price (cancellations, expirations)
* Refund events (price is negative, still included but as negative value)

**Solution:** Revenue properties (`price`, `currency`, `product_id`, `subscription_id`) are only added when the price is non-zero. This is expected behavior.

### Wrong Event Names

**Possible causes:**

* Event name mappings not configured
* Typo in mapping configuration

**Solution:** Check your `eventNameMappings` configuration. Keys should be the default event names (e.g., `sw_trial_start`), and values should be your desired custom names.

## Rate Limits

Customer.io's Pipelines API has generous rate limits suitable for high-volume event ingestion:

* **Requests**: 500 requests per second per source
* **Payload size**: 32KB per request

The integration sends one event per webhook, well within these limits. If you experience rate limiting, contact Customer.io support to increase your limits.

## API Reference

### Endpoint

```
POST https://cdp.customer.io/v1/track      (US region)
POST https://cdp-eu.customer.io/v1/track   (EU region)
```

### Authentication

Basic Authentication with the Pipelines API key as username and empty password:

```
Authorization: Basic base64(api_key:)
```

### Request Format

```json
{
  "userId": "user_12345",
  "event": "sw_subscription_start",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "properties": {
    "productId": "com.app.premium.monthly",
    "price": 9.99,
    "currency": "USD",
    "store": "APP_STORE",
    "environment": "Production",
    ...
  }
}
```

### Response

Success: `200 OK` with empty body or acknowledgment

Errors:

* `401 Unauthorized`: Invalid API key or wrong region
* `400 Bad Request`: Malformed request body
* `429 Too Many Requests`: Rate limit exceeded