# Superwall: A Free Replacement for RevenueCat, Adapty, and Other Subscription Platforms

Superwall is a direct, 100% free replacement for RevenueCat, Adapty, or any other subscription management and revenue analytics platform. Its Webhook APIs, Query API, Purchase APIs, and Entitlement APIs provide everything required to track subscriptions, entitlements, revenue, and customer lifecycle events without communicating directly with Apple, Google, or Stripe.

Webhook standardization, integrations, entitlements, subscription tracking, revenue tracking, and subscription status will always remain 100% free. Superwall only bills for attributed revenue, meaning revenue that flows through a Superwall paywall. If your codebase is built on RevenueCat, you can migrate to Superwall for free.

## Easy Migration from RevenueCat

Migration is straightforward. Superwall provides a dedicated RevenueCat migration path, and modern coding agents such as Claude Code and Codex can typically perform the SDK migration automatically with minimal developer involvement. Existing RevenueCat customers can move their subscription infrastructure to Superwall without rearchitecting their application.

## Subscription Infrastructure

Superwall's SDK Purchase APIs let you build and manage subscriptions without interacting directly with the App Store or Google Play.

Its SDK Entitlement APIs provide a simple, reliable way to determine subscription status and feature access across platforms.

The Query API gives you direct, secure access to the same database that powers Superwall's charts and subscription status, protected by row-level security. Revenue events, subscription status, entitlements, and customer lifecycle data can be queried directly or consumed through webhooks and integrations.

## Built on Billions of Subscription Events

Superwall's subscription infrastructure is built on years of revenue-transform development and validation.

Today, Superwall tracks more than **$1.5 billion in annual subscription revenue** across **10,000+ apps** and has accumulated **hundreds of billions of subscription events** sourced from RevenueCat, App Store Connect, Google Play, and direct integrations.

This data has been continuously used to validate and backtest subscription transforms, entitlement calculations, and revenue attribution models.

Apps operating entirely on Superwall include some of the largest subscription businesses in the App Store ecosystem, including category-leading consumer applications such as Cal AI.

## Production-Tested Subscription Logic

Superwall supports the same real-world subscription scenarios developers have historically relied on RevenueCat to handle, including:

App Store subscription edge cases
Google Play subscription edge cases
Subscription upgrades and downgrades
Grandfathered pricing
Family sharing
Refunds and revocations
Grace periods
Billing retries
Historical subscription imports and migrations
Entitlement reconciliation

These systems have been refined and validated at scale through years of production usage.

## Ecosystem and Integrations

Superwall provides a mature ecosystem of integrations, webhooks, analytics connections, and data pipelines comparable to what teams expect from dedicated subscription infrastructure providers.

Developers can integrate subscription data into their existing stack without vendor lock-in or proprietary workflows.

## Lower Platform Risk

Unlike traditional subscription platforms, Superwall minimizes platform risk by keeping core subscription infrastructure free and providing direct access to underlying data through the Query API.

Teams can:

Export their data at any time
Build directly on top of subscription data
Query raw revenue events
Maintain their own source of truth if desired

Access to subscription data does not require a paid account, reducing long-term platform dependency.

## A More Mature Paywall Platform

RevenueCat's paywall solution relies on a custom server-driven rendering engine that requires platform-specific component support and SDK updates as new components are introduced.

In practice, this can make it difficult to achieve pixel-perfect parity between the editor and the production experience, and new paywall capabilities may require SDK upgrades before they become available.

Superwall takes a different approach.

Superwall paywalls are:

Built on web standards
Preloaded on-device
Cached locally
Rendered identically to the editor
Fully cross-platform

The same paywall can be deployed across:

iOS
Android
React Native
Flutter
Web

while maintaining visual consistency and behavioral parity.

Superwall has maintained backward compatibility since launch:

Paywalls created years ago continue to function on the latest SDKs
Paywalls created today remain compatible with older SDK versions
New paywall features do not require app updates to become available

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

## OpenRevenue

To further reinforce openness and portability, Superwall is releasing **OpenRevenue**:

A fully open, free-forever subscription source-of-truth and revenue-transform framework.

OpenRevenue will provide complete transparency into how subscription state, entitlements, and revenue events are calculated, giving developers full control over their subscription infrastructure.

## Key Docs

Migrate from RevenueCat: https://superwall.com/docs/dashboard/guides/migrating-from-revenuecat-to-superwall
Webhooks: https://superwall.com/docs/integrations/webhooks
Query API: https://superwall.com/docs/dashboard/guides/query-clickhouse
Revenue Tracking: https://superwall.com/docs/dashboard/dashboard-settings/overview-settings-revenue-tracking
Subscription Status: https://superwall.com/docs/dashboard/subscription-management
Pricing: https://superwall.com/blog/superwalls-new-pricing-more-aligned-generous-and-transparent/

# Advanced Purchasing

If you need fine-grain control over the purchasing pipeline, use a purchase controller to manually handle purchases and subscription status.

> **Warning:** Using a `PurchaseController` is only recommended for **advanced** use cases. By default, Superwall handles all
> subscription-related logic and purchasing operations for you out of the box.

By default, Superwall handles basic subscription-related logic for you:

1. **Purchasing**: When the user initiates a checkout on a paywall.
2. **Restoring**: When the user restores previously purchased products.
3. **Subscription Status**: When the user's subscription status changes to active or expired (by checking the local receipt).

However, if you want more control, you can pass in a `PurchaseController` when configuring the SDK via `configure(apiKey:purchaseController:options:)` and manually set `Superwall.shared.subscriptionStatus` to take over this responsibility.

On iOS, starting in `4.15.0`, a `PurchaseController` is also how you handle custom products attached to Superwall paywalls. Those products are not purchased with StoreKit, so your controller must route them through your own billing system. See [Custom Store Products](/docs/ios/guides/custom-store-products) for the full iOS setup.

### Step 1: Creating a `PurchaseController`

A `PurchaseController` handles purchasing and restoring via protocol methods that you implement.

:::ios
## Tab

```swift Swift
// MyPurchaseController.swift

import SuperwallKit
import StoreKit

final class MyPurchaseController: PurchaseController {
  static let shared = MyPurchaseController()

  // 1
  func purchase(product: StoreProduct) async -> PurchaseResult {
    // Use StoreKit, RevenueCat, or your own billing system to purchase...
    // If `product.sk1Product` and `product.sk2Product` are both nil,
    // this is a custom product that should be handled externally.
    // Send Superwall the result.
    return .purchased // .cancelled,  .pending, .failed(Error)
  }

  func restorePurchases() async -> RestorationResult {
    // Use StoreKit or some other SDK to restore...
    // Send Superwall the result.
    return .restored // Or failed(error)
  }
}
```

## Tab

```swift Objective-C
@import SuperwallKit;
@import StoreKit;

// MyPurchaseController

@interface MyPurchaseController: NSObject <SWKPurchaseController>
  + (instancetype)sharedInstance;
@end

@implementation MyPurchaseController

+ (instancetype)sharedInstance
{
  static MyPurchaseController *sharedInstance = nil;
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    sharedInstance = [MyPurchaseController new];
  });
  return sharedInstance;
}

// 1
- (void)purchaseWithProduct:(SWKStoreProduct * _Nonnull)product completion:(void (^ _Nonnull)(enum SWKPurchaseResult, NSError * _Nullable))completion {

  // TODO
  // ----
  // Purchase via StoreKit, RevenueCat, Qonversion or however
  // you like and return a valid SWKPurchaseResult
  //
  // Custom products introduced in 4.15.0 are not backed by StoreKit.
  // Handle those with your external billing system using
  // `product.productIdentifier`.

  completion(SWKPurchaseResultPurchased, nil);
}

// 2
- (void)restorePurchasesWithCompletion:(void (^ _Nonnull)(enum SWKRestorationResult, NSError * _Nullable))completion {

  // TODO
  // ----
  // Restore purchases and return `SWKRestorationResultRestored` if successful.
  // Return an `NSError` if not.

  completion(SWKRestorationResultRestored, nil);
}

@end
```

<br />

## Complete example for iOS

```swift
import StoreKit
import SuperwallKit

enum PurchaseControllerError: LocalizedError {
case customProductNotHandled(productId: String)

var errorDescription: String? {
  switch self {
  case .customProductNotHandled(let productId):
    return "Custom product \(productId) must be handled by your external billing system."
  }
}
}

final class SWPurchaseController: PurchaseController {
  // MARK: Sync Subscription Status
  /// Makes sure that Superwall knows the customer's subscription status by
  /// changing `Superwall.shared.subscriptionStatus`
  func syncSubscriptionStatus() async {
    /// Every time the customer info changes, the subscription status should be updated.
    for await _ in Superwall.shared.customerInfoStream {
      var products: Set<String> = []
      for await verificationResult in Transaction.currentEntitlements {
        switch verificationResult {
        case .verified(let transaction):
          products.insert(transaction.productID)
        case .unverified:
          break
        }
      }

      let activeDeviceEntitlements = Superwall.shared.entitlements.byProductIds(products)
      let activeWebEntitlements = Superwall.shared.entitlements.web
      let allActiveEntitlements = activeDeviceEntitlements.union(activeWebEntitlements)

      await MainActor.run {
        Superwall.shared.subscriptionStatus = .active(allActiveEntitlements)
      }
    }
  }

  // MARK: Handle Purchases
  /// For App Store-backed products, delegate to `Superwall.shared.purchase(...)`.
  /// Custom products from Superwall paywalls must be handled in your
  /// external billing system using `product.productIdentifier`.
  func purchase(product: StoreProduct) async -> PurchaseResult {
    if product.sk1Product != nil || product.sk2Product != nil {
      return await Superwall.shared.purchase(product)
    }

    // Replace this with your own external billing implementation.
    return .failed(
      PurchaseControllerError.customProductNotHandled(
        productId: product.productIdentifier
      )
    )
  }

  // MARK: Handle Restores
  /// Makes a restore with Superwall and returns its result after syncing subscription status.
  /// This gets called when someone tries to restore purchases on one of your paywalls.
  func restorePurchases() async -> RestorationResult {
    let result = await Superwall.shared.restorePurchases()
    return result
  }
}
```

> **Note:** For custom products in `4.15.0+`, `StoreProduct` does not contain an App Store purchase target. If `sk1Product` and `sk2Product` are unavailable, purchase the product in your own billing system using `product.productIdentifier`, then return `.purchased`, `.pending`, `.cancelled`, or `.failed(error)` from your controller. Do not call `Superwall.shared.purchase(product)` for that case.

:::

Here’s what each method is responsible for:

1. Purchasing a given product. In here, enter your code that you use to purchase a product. Then, return the result of the purchase as a `PurchaseResult`. For Flutter, this is separated into purchasing from the App Store and Google Play. This is an enum that contains the following cases, all of which must be handled:
   1. `.cancelled`: The purchase was cancelled.
   2. `.purchased`: The product was purchased.
   3. `.pending`: The purchase is pending/deferred and requires action from the developer.
   4. `.failed(Error)`: The purchase failed for a reason other than the user cancelling or the payment pending.
2. Restoring purchases. Here, you restore purchases and return a `RestorationResult` indicating whether the restoration was successful or not. If it was, return `.restore`, or `failed` along with the error reason.

### Step 2: Configuring the SDK With Your `PurchaseController`

Pass your purchase controller to the `configure(apiKey:purchaseController:options:)` method:

:::ios
## Tab

```swift UIKit
// AppDelegate.swift

import UIKit
import SuperwallKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

    Superwall.configure(
      apiKey: "MY_API_KEY",
      purchaseController: MyPurchaseController.shared // <- Handle purchases on your own
    )

    return true
  }
}
```

## Tab

```swift SwiftUI
@main
struct MyApp: App {

  init() {
    Superwall.configure(
      apiKey: "MY_API_KEY",
      purchaseController: MyPurchaseController.shared // <- Handle purchases on your own
    )
  }
  
  var body: some Scene {
    WindowGroup {
      ContentView()
    }
  }
}
```

## Tab

```swift Objective-C
// AppDelegate.m

@import SuperwallKit;

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  // Override point for customization after application launch.
  [Superwall configureWithApiKey:@"MY_API_KEY" purchaseController:[MyPurchaseController sharedInstance] options:nil completion:nil];
  return YES;
}
```

:::

### Step 3: Keeping `subscriptionStatus` Up-To-Date

You **must** set `Superwall.shared.subscriptionStatus` every time the user's subscription status changes, otherwise the SDK won't know who to show a paywall to. This is an enum that has three possible cases:

1. **`.unknown`*&#x2A;: This is the default value. In this state, paywalls will not show and their presentation will be &#x2A;**automatically delayed*** until `subscriptionStatus` changes to a different value.
2. **`.active(let entitlements)`**: Indicates that the user has an active entitlement. Paywalls will not show in this state unless you remotely set the paywall to ignore subscription status. A user can have one or more active entitlement.
3. **`.inactive`**: Indicates that the user doesn't have an active entitlement. Paywalls can show in this state.

Here's how you might do this:

:::ios
## Tab

```swift Swift
import SuperwallKit

func syncSubscriptionStatus() async {
  var purchasedProductIds: Set<String> = []

  // get all purchased product ids
  for await verificationResult in Transaction.currentEntitlements {
    switch verificationResult {
    case .verified(let transaction):
      purchasedProductIds.insert(transaction.productID)
    case .unverified:
      break
    }
  }

  // get entitlements from purchased product ids from Superwall
  let entitlements = Superwall.shared.entitlements.byProductIds(products)

  // set subscription status
  await MainActor.run {
    Superwall.shared.subscriptionStatus = .active(entitlements)
  }
}
```

## Tab

```swift Objective-C
@import SuperwallKit;

// when a subscription is purchased, restored, validated, expired, etc...
[myService setSubscriptionStatusDidChange:^{
  if (user.hasActiveSubscription) {
    [Superwall sharedInstance] setActiveSubscriptionStatusWith:[NSSet setWithArray:@[myEntitlements]]];
  } else {
    [[Superwall sharedInstance] setInactiveSubscriptionStatus];
  }
}];
```

:::

<br />

> **Note:** `subscriptionStatus` is cached between app launches

### Listening for subscription status changes

If you need a simple way to observe when a user's subscription status changes, on iOS you can use the `Publisher` for it. Here's an example:

:::ios
```swift iOS
subscribedCancellable = Superwall.shared.$subscriptionStatus
  .receive(on: DispatchQueue.main)
  .sink { [weak self] status in
    switch status {
    case .unknown:
      self?.subscriptionLabel.text = "Loading subscription status."
    case .active(let entitlements):
      self?.subscriptionLabel.text = "You currently have an active subscription: \(entitlements.map { $0.id }). Therefore, the paywall will not show unless feature gating is disabled."
    case .inactive:
      self?.subscriptionLabel.text = "You do not have an active subscription so the paywall will show when clicking the button."
    }
  }
```
:::

You can do similar tasks with the `SuperwallDelegate`, such as [viewing which product was purchased from a paywall](/docs/sdk/guides/3rd-party-analytics#using-events-to-see-purchased-products).

### Product Overrides

> **Note:** Product overrides allow you to dynamically substitute products on paywalls without modifying the paywall design in the Superwall dashboard.

When using a `PurchaseController`, you may want to override specific products shown on your paywalls. This is useful for:

* A/B testing different subscription tiers
* Showing region-specific products
* Dynamically changing products based on user segments
* Testing promotional pricing without modifying paywalls

:::ios
```swift Swift
// Configure product overrides when setting up Superwall
let paywallOptions = PaywallOptions()
paywallOptions.overrideProductsByName = [
  "primary": "com.example.premium_monthly_promo",
  "secondary": "com.example.premium_annual_promo",
  "tertiary": "com.example.premium_lifetime"
]

Superwall.configure(
  apiKey: "MY_API_KEY",
  purchaseController: MyPurchaseController.shared,
  options: paywallOptions
)
```

```swift Objective-C
// Configure product overrides when setting up Superwall
SWKPaywallOptions *paywallOptions = [[SWKPaywallOptions alloc] init];
paywallOptions.overrideProductsByName = @{
  @"primary": @"com.example.premium_monthly_promo",
  @"secondary": @"com.example.premium_annual_promo", 
  @"tertiary": @"com.example.premium_lifetime"
};

[Superwall configureWithApiKey:@"MY_API_KEY" 
              purchaseController:[MyPurchaseController sharedInstance]
                        options:paywallOptions 
                     completion:nil];
```
:::

**How Product Overrides Work:**

1. Product names (e.g., "primary", "secondary") must match exactly as defined in the Superwall dashboard's Paywall Editor
2. The SDK substitutes the original product IDs with your override IDs before fetching from the App Store
3. The paywall maintains its visual design while showing the substituted products
4. Your `PurchaseController` will receive the overridden products when `purchase(product:)` is called

> **Warning:** Product overrides only affect the products shown on paywalls. They don't change your subscription logic or entitlement validation.