# 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

# Appstack

The Appstack integration forwards Superwall webhook events directly to Appstack for analytics and attribution. As a pass-through integration, it sends the raw event payload without transformation, giving Appstack full access to your subscription lifecycle data.

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

### Required Fields

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

* **Access Token:** Your Appstack API access token, used to authenticate requests.
* **App ID:** Your Appstack application ID, used to route events to the correct app.

### Features

* **Pass-Through Delivery**: Raw Superwall webhook events are forwarded directly to Appstack without transformation
* **Simple Configuration**: Only an access token and app ID are required
* **Credential Validation**: Connection is verified before the integration goes live
* **Production Events Only**: Sandbox events are automatically filtered out

## Configuration

### Required Settings

| Field          | Description                    | Example                |
| -------------- | ------------------------------ | ---------------------- |
| `access_token` | Your Appstack API access token | `"ask_live_abc123..."` |
| `app_id`       | Your Appstack application ID   | `"app_456def..."`      |

### Example Configuration

```json
{
  "access_token": "your_appstack_access_token",
  "app_id": "your_appstack_app_id"
}
```

## How It Works

Appstack is a **pass-through integration**. Unlike analytics integrations that map and transform events into platform-specific formats, the Appstack integration forwards the raw Superwall webhook event payload directly to Appstack.

When a subscription event occurs:

1. Superwall generates the webhook event.
2. The integration sends the complete, unmodified event payload to Appstack.
3. Appstack receives and processes the event on its end.

### API Endpoint

Events are sent to:

```
POST https://api.event.appstack.tech/superwall/webhook/{app_id}
```

### Request Headers

```
Content-Type: application/json
Authorization: <access_token>
```

The `access_token` is sent as the `Authorization` header value, and the `app_id` is included in the URL path.

## Sandbox Handling

Sandbox events are **automatically filtered out**. Only production events are forwarded to Appstack. There is no option to include sandbox events or to configure a separate sandbox endpoint.

## Testing the Integration

### 1\. Validate Credentials

When you save the integration, Superwall sends a test event to the Appstack validation endpoint to confirm your credentials are correct:

```
POST https://api.event.appstack.tech/superwall/validate
```

If validation fails, double-check your access token and app ID.

### 2\. Trigger a Production Event

Since sandbox events are filtered out, you will need a production transaction to verify end-to-end delivery:

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

> **Note:** Because sandbox events are not forwarded to Appstack, full end-to-end testing requires a production transaction. Use credential validation to confirm the connection is working before going live.

### 3\. Verify in Appstack

Check your Appstack dashboard to confirm events are arriving and being processed correctly.

## Troubleshooting

### Events Not Appearing in Appstack

**Possible causes:**

* Invalid access token or app ID
* Events are from a sandbox environment (these are filtered out)
* Network or endpoint issues on the Appstack side

**Solutions:**

1. Re-save the integration to trigger credential validation
2. Confirm you are generating production (not sandbox) events
3. Verify your access token and app ID match what is shown in your Appstack dashboard
4. Contact Appstack support if credentials are correct but events are still not arriving

### Credential Validation Failing

**Possible causes:**

* Incorrect access token
* Incorrect app ID
* Appstack service is temporarily unavailable

**Solutions:**

1. Copy the access token and app ID directly from your Appstack dashboard to avoid typos
2. Ensure your Appstack account is active and in good standing
3. Try again after a few minutes if the Appstack service may be experiencing downtime