# 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

# Using RevenueCat

> **Note:** Not using RevenueCat? No problem! Superwall works out of the box without any additional SDKs.

> **Warning:** You only need to use a `PurchaseController` if you want end-to-end control of the purchasing pipeline. The recommended way to use RevenueCat with Superwall is by putting it in observer mode.

You can integrate RevenueCat with Superwall using several approaches:

1. [**Using a purchase controller:**](#using-a-purchase-controller) Use this route if you want to maintain control over purchasing logic and code.
2. [**Using PurchasesAreCompletedBy:**](#using-purchasesarecompletedby) Here, you don't use a purchase controller and you tell RevenueCat that purchases are completed by your app using StoreKit. In this mode, RevenueCat will observe the purchases that the Superwall SDK makes. For more info [see here](https://www.revenuecat.com/docs/migrating-to-revenuecat/sdk-or-not/finishing-transactions).

## Using a purchase controller

### 1\. Create a `PurchaseController`

Create a new file called `RCPurchaseController`, then copy and paste the following:

:::android
```kotlin
package com.superwall.superapp

import android.app.Activity
import android.content.Context
import com.android.billingclient.api.ProductDetails
import com.revenuecat.purchases.CustomerInfo
import com.revenuecat.purchases.LogLevel
import com.revenuecat.purchases.ProductType
import com.revenuecat.purchases.PurchaseParams
import com.revenuecat.purchases.Purchases
import com.revenuecat.purchases.PurchasesConfiguration
import com.revenuecat.purchases.PurchasesError
import com.revenuecat.purchases.PurchasesErrorCode
import com.revenuecat.purchases.getCustomerInfoWith
import com.revenuecat.purchases.interfaces.GetStoreProductsCallback
import com.revenuecat.purchases.interfaces.PurchaseCallback
import com.revenuecat.purchases.interfaces.ReceiveCustomerInfoCallback
import com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener
import com.revenuecat.purchases.models.StoreProduct
import com.revenuecat.purchases.models.StoreTransaction
import com.revenuecat.purchases.models.SubscriptionOption
import com.revenuecat.purchases.models.googleProduct
import com.revenuecat.purchases.purchaseWith
import com.superwall.sdk.Superwall
import com.superwall.sdk.delegate.PurchaseResult
import com.superwall.sdk.delegate.RestorationResult
import com.superwall.sdk.delegate.subscription_controller.PurchaseController
import com.superwall.sdk.models.entitlements.Entitlement
import com.superwall.sdk.models.entitlements.SubscriptionStatus
import kotlinx.coroutines.CompletableDeferred

suspend fun Purchases.awaitProducts(productIds: List<String>): List<StoreProduct> {
    val deferred = CompletableDeferred<List<StoreProduct>>()
    getProducts(
        productIds,
        object : GetStoreProductsCallback {
            override fun onReceived(storeProducts: List<StoreProduct>) {
                deferred.complete(storeProducts)
            }

            override fun onError(error: PurchasesError) {
                deferred.completeExceptionally(Exception(error.message))
            }
        },
    )
    return deferred.await()
}

interface PurchaseCompletion {
    var storeTransaction: StoreTransaction
    var customerInfo: CustomerInfo
}

// Create a custom exception class that wraps PurchasesError
private class PurchasesException(
    val purchasesError: PurchasesError,
) : Exception(purchasesError.toString())

suspend fun Purchases.awaitPurchase(
    activity: Activity,
    storeProduct: StoreProduct,
): PurchaseCompletion {
    val deferred = CompletableDeferred<PurchaseCompletion>()
    purchase(
        PurchaseParams.Builder(activity, storeProduct).build(),
        object : PurchaseCallback {
            override fun onCompleted(
                storeTransaction: StoreTransaction,
                customerInfo: CustomerInfo,
            ) {
                deferred.complete(
                    object : PurchaseCompletion {
                        override var storeTransaction: StoreTransaction = storeTransaction
                        override var customerInfo: CustomerInfo = customerInfo
                    },
                )
            }

            override fun onError(
                error: PurchasesError,
                p1: Boolean,
            ) {
                deferred.completeExceptionally(PurchasesException(error))
            }
        },
    )
    return deferred.await()
}

suspend fun Purchases.awaitRestoration(): CustomerInfo {
    val deferred = CompletableDeferred<CustomerInfo>()
    restorePurchases(
        object : ReceiveCustomerInfoCallback {
            override fun onReceived(purchaserInfo: CustomerInfo) {
                deferred.complete(purchaserInfo)
            }

            override fun onError(error: PurchasesError) {
                deferred.completeExceptionally(error as Throwable)
            }
        },
    )
    return deferred.await()
}

class RevenueCatPurchaseController(
    val context: Context,
) : PurchaseController,
    UpdatedCustomerInfoListener {
    init {
        Purchases.logLevel = LogLevel.DEBUG
        Purchases.configure(
            PurchasesConfiguration
                .Builder(
                    context,
                    "android_rc_key",
                ).build(),
        )

        // Make sure we get the updates
        Purchases.sharedInstance.updatedCustomerInfoListener = this
    }

    fun syncSubscriptionStatus() {
        // Refetch the customer info on load
        Purchases.sharedInstance.getCustomerInfoWith {
            if (hasAnyActiveEntitlements(it)) {
                setSubscriptionStatus(
                    SubscriptionStatus.Active(
                        it.entitlements.active
                            .map {
                                Entitlement(it.key, Entitlement.Type.SERVICE_LEVEL)
                            }.toSet(),
                    ),
                )
            } else {
                setSubscriptionStatus(SubscriptionStatus.Inactive)
            }
        }
    }

    /**
     * Callback for rc customer updated info
     */
    override fun onReceived(customerInfo: CustomerInfo) {
        if (hasAnyActiveEntitlements(customerInfo)) {
            setSubscriptionStatus(
                SubscriptionStatus.Active(
                    customerInfo.entitlements.active
                        .map {
                            Entitlement(it.key, Entitlement.Type.SERVICE_LEVEL)
                        }.toSet(),
                ),
            )
        } else {
            setSubscriptionStatus(SubscriptionStatus.Inactive)
        }
    }

    /**
     * Initiate a purchase
     */
    override suspend fun purchase(
        activity: Activity,
        productDetails: ProductDetails,
        basePlanId: String?,
        offerId: String?,
    ): PurchaseResult {
        // Find products matching productId from RevenueCat
        val products = Purchases.sharedInstance.awaitProducts(listOf(productDetails.productId))
        // Choose the product which matches the given base plan.
        // If no base plan set, select first product or fail.
        val product =
            products.firstOrNull { it.googleProduct?.basePlanId == basePlanId }
                ?: products.firstOrNull()
                ?: return PurchaseResult.Failed("Product not found")

        return when (product.type) {
            ProductType.SUBS, ProductType.UNKNOWN ->
                handleSubscription(
                    activity,
                    product,
                    basePlanId,
                    offerId,
                )

            ProductType.INAPP -> handleInAppPurchase(activity, product)
        }
    }

    private fun buildSubscriptionOptionId(
        basePlanId: String?,
        offerId: String?,
    ): String =
        buildString {
            basePlanId?.let { append("$it") }
            offerId?.let { append(":$it") }
        }

    private suspend fun handleSubscription(
        activity: Activity,
        storeProduct: StoreProduct,
        basePlanId: String?,
        offerId: String?,
    ): PurchaseResult {
        storeProduct.subscriptionOptions?.let { subscriptionOptions ->
            // If subscription option exists, concatenate base + offer ID.
            val subscriptionOptionId = buildSubscriptionOptionId(basePlanId, offerId)

            // Find first subscription option that matches the subscription option ID or default
            // to letting revenuecat choose.
            val subscriptionOption =
                subscriptionOptions.firstOrNull { it.id == subscriptionOptionId }
                    ?: subscriptionOptions.defaultOffer

            // Purchase subscription option, otherwise fail.
            if (subscriptionOption != null) {
                return purchaseSubscription(activity, subscriptionOption)
            }
        }
        return PurchaseResult.Failed("Valid subscription option not found for product.")
    }

    private suspend fun purchaseSubscription(
        activity: Activity,
        subscriptionOption: SubscriptionOption,
    ): PurchaseResult {
        val deferred = CompletableDeferred<PurchaseResult>()
        Purchases.sharedInstance.purchaseWith(
            PurchaseParams.Builder(activity, subscriptionOption).build(),
            onError = { error, userCancelled ->
                deferred.complete(
                    if (userCancelled) {
                        PurchaseResult.Cancelled()
                    } else {
                        PurchaseResult.Failed(
                            error.message,
                        )
                    },
                )
            },
            onSuccess = { _, _ ->
                deferred.complete(PurchaseResult.Purchased())
            },
        )
        return deferred.await()
    }

    private suspend fun handleInAppPurchase(
        activity: Activity,
        storeProduct: StoreProduct,
    ): PurchaseResult =
        try {
            Purchases.sharedInstance.awaitPurchase(activity, storeProduct)
            PurchaseResult.Purchased()
        } catch (e: PurchasesException) {
            when (e.purchasesError.code) {
                PurchasesErrorCode.PurchaseCancelledError -> PurchaseResult.Cancelled()
                else ->
                    PurchaseResult.Failed(
                        e.message ?: "Purchase failed due to an unknown error",
                    )
            }
        }

    /**
     * Restore purchases
     */
    override suspend fun restorePurchases(): RestorationResult {
        try {
            if (hasAnyActiveEntitlements(Purchases.sharedInstance.awaitRestoration())) {
                return RestorationResult.Restored()
            } else {
                return RestorationResult.Failed(Exception("No active entitlements"))
            }
        } catch (e: Throwable) {
            return RestorationResult.Failed(e)
        }
    }

    /**
     * Check if the customer has any active entitlements
     */
    private fun hasAnyActiveEntitlements(customerInfo: CustomerInfo): Boolean {
        val entitlements =
            customerInfo.entitlements.active.values
                .map { it.identifier }
        return entitlements.isNotEmpty()
    }

    private fun setSubscriptionStatus(subscriptionStatus: SubscriptionStatus) {
        if (Superwall.initialized) {
            Superwall.instance.setSubscriptionStatus(subscriptionStatus)
        }
    }
}
```
:::

As discussed in [Purchases and Subscription Status](/docs/sdk/guides/advanced-configuration), this `CustomPurchaseControllerProvider` is responsible for handling the subscription-related logic using the modern hooks-based approach.

### 2\. Configure Superwall (Continued)

The example above shows the complete setup. The `CustomPurchaseControllerProvider` wraps your `SuperwallProvider` and handles all purchase and restore logic through RevenueCat.

For more advanced implementations, see the [example app](https://github.com/superwall/expo-superwall/tree/main/example).

> **Note:** **Legacy Approach**: If you're migrating from the old SDK or need the class-based purchase controller, you can use `expo-superwall/compat`. However, we recommend using the modern `CustomPurchaseControllerProvider` approach shown above.

### Removed Legacy Code Section

The following section contains the legacy class-based approach. Skip to the next section for the modern configuration.

As discussed in [Purchases and Subscription Status](/docs/sdk/guides/advanced-configuration), this `PurchaseController` is responsible for handling the subscription-related logic. Take a few moments to look through the code to understand how it does this.

### 2\. Configure Superwall

Initialize an instance of `RCPurchaseController` and pass it in to `Superwall.configure(apiKey:purchaseController)`:

:::android
```kotlin
val purchaseController = RCPurchaseController(this)

Superwall.configure(
  this,
  "MY_API_KEY",
  purchaseController
)

// Make sure we sync the subscription status
// on first load and whenever it changes
purchaseController.syncSubscriptionStatus()
```
:::

### 3\. Sync the subscription status

Then, call `purchaseController.syncSubscriptionStatus()` to keep Superwall's subscription status up to date with RevenueCat.

That's it! Check out our sample app for working examples:

:::android
* [Android](https://github.com/superwall/Superwall-Android/tree/develop/example/app/src/revenuecat)
:::

## Using PurchasesAreCompletedBy

If you're using RevenueCat's [PurchasesAreCompletedBy](https://www.revenuecat.com/docs/migrating-to-revenuecat/sdk-or-not/finishing-transactions), you don't need to create a purchase controller. Register your placements, present a paywall — and Superwall will take care of completing any purchase the user starts. However, there are a few things to note if you use this setup:

1. Here, you aren't using RevenueCat's [entitlements](https://www.revenuecat.com/docs/getting-started/entitlements#entitlements) as a source of truth. If your app is multiplatform, you'll need to consider how to link up pro features or purchased products for users.
2. If you require custom logic when purchases occur, then you'll want to add a purchase controller. In that case, Superwall handles purchasing flows and RevenueCat will still observe transactions to power their analytics and charts.
3. Be sure that user identifiers are set the same way across Superwall and RevenueCat.

For more information on observer mode, visit [RevenueCat's docs](https://www.revenuecat.com/docs/migrating-to-revenuecat/sdk-or-not/finishing-transactions).