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

# Viewing Purchased Products

When a paywall is presenting and a user converts, you can view the purchased products in several different ways.

### Use the `PaywallPresentationHandler`

Arguably the easiest of the options — simply pass in a presentation handler and check out the product within the `onDismiss` block.

## Tab

```swift Swift  
let handler = PaywallPresentationHandler()
handler.onDismiss { _, result in
  switch result {
  case .declined:
      print("No purchased occurred.")
  case .purchased(let product):
      print("Purchased \(product.productIdentifier)")
  case .restored:
      print("Restored purchases.")
  }
}

Superwall.shared.register(placement: "caffeineLogged", handler: handler) {
logCaffeine()
}

```

## Tab

```swift Objective-C
SWKPaywallPresentationHandler *handler = [SWKPaywallPresentationHandler new];
[handler onDismiss:^(SWKPaywallInfo * _Nonnull info,
                      enum SWKPaywallResult result,
                      SWKStoreProduct * _Nullable product) {
  switch (result) {
    case SWKPaywallResultPurchased:
      NSLog(@"Purchased %@", product.productIdentifier);
    default:
      NSLog(@"Unhandled event.");
  }
}];

[[Superwall sharedInstance] registerWithPlacement:@"caffeineLogged"
                                           params:@{}
                                          handler:handler
                                          feature:^{
  [self logCaffeine];
}];
```

## Tab

```kotlin Android
val handler = PaywallPresentationHandler()
handler.onDismiss { _, paywallResult ->
  when (paywallResult) {
    is PaywallResult.Purchased -> {
        // The user made a purchase!
        val purchasedProductId = paywallResult.productId
        println("User purchased product: $purchasedProductId")
        // ... do something with the purchased product ID ...
    }
    is PaywallResult.Declined -> {
        // The user declined to make a purchase.
        println("User declined to make a purchase.")
        // ... handle the declined case ...
    }
    is PaywallResult.Restored -> {
        // The user restored a purchase.
        println("User restored a purchase.")
        // ... handle the restored case ...
    }
  }
}

Superwall.instance.register(placement = "caffeineLogged", handler = handler) {
   logCaffeine()
}
```

## Tab

```dart Flutter
  PaywallPresentationHandler handler = PaywallPresentationHandler();

  handler.onDismiss((paywallInfo, paywallResult) async {
    String name = await paywallInfo.name;
    print("Handler (onDismiss): $name");
    switch (paywallResult) {
      case PurchasedPaywallResult(productId: var id):
        // The user made a purchase!
        print('User purchased product: $id');
        // ... do something with the purchased product ID ...
        break;
      case DeclinedPaywallResult():
        // The user declined to make a purchase.
        print('User declined the paywall.');
        // ... handle the declined case ...
        break;
      case RestoredPaywallResult():
        // The user restored a purchase.
        print('User restored a previous purchase.');
        // ... handle the restored case ...
        break;
    }
  });

  Superwall.shared.registerPlacement(
      "caffeineLogged", handler: handler, feature: () {
    logCaffeine();
  });
```

## Tab

```typescript React Native
import * as React from "react"
import Superwall from "../../src"
import { PaywallPresentationHandler, PaywallInfo } from "../../src"
import type { PaywallResult } from "../../src/public/PaywallResult"

const Home = () => {
  const navigation = useNavigation<HomeScreenNavigationProp>()

  const presentationHandler: PaywallPresentationHandler = {
    onDismiss: (handler: (info: PaywallInfo, result: PaywallResult) => void) => {
      handler = (info, result) => {
        console.log("Paywall dismissed with info:", info, "and result:", result)
        if (result.type === "purchased") {
          console.log("Product purchased with ID:", result.productId)
        }
      }
    },
    onPresent: (handler: (info: PaywallInfo) => void) => {
      handler = (info) => {
        console.log("Paywall presented with info:", info)
        // Add logic for when the paywall is presented
      }
    },
    onError: (handler: (error: string) => void) => {
      handler = (error) => {
        console.error("Error presenting paywall:", error)
        // Handle any errors that occur during presentation
      }
    },
    onSkip: () => {
      console.log("Paywall presentation skipped")
      // Handle the case where the paywall presentation is skipped
    },
  }

  const nonGated = () => {
    Superwall.shared.register({ placement: "non_gated", handler: presentationHandler, feature: () => {
      navigation.navigate("caffeineLogged", {
        value: "Go for caffeine logging",
      })
    });
  }

  return <View style={styles.container}>// Your view code here</View>
}
```

### Use `SuperwallDelegate`

Next, the [SuperwallDelegate](/docs/sdk/guides/using-superwall-delegate) offers up much more information, and can inform you of virtually any Superwall event that occurred:

## Tab

```swift Swift 
class SWDelegate: SuperwallDelegate {
  func handleSuperwallEvent(withInfo eventInfo: SuperwallEventInfo) {
    switch eventInfo.event {
    case .transactionComplete(_, let product, _, _):
      print("Transaction complete: product: \(product.productIdentifier)")
    case .subscriptionStart(let product, _):
      print("Subscription start: product: \(product.productIdentifier)")
    case .freeTrialStart(let product, _):
      print("Free trial start: product: \(product.productIdentifier)")
    case .transactionRestore(_, _):
      print("Transaction restored")
    case .nonRecurringProductPurchase(let product, _):
      print("Consumable product purchased: \(product.id)")
    default:
      print("Unhandled event.")
    }
  }
}

@main
struct Caffeine_PalApp: App {
  @State private var swDelegate: SWDelegate = .init()

  init() {
    Superwall.configure(apiKey: "my_api_key")
    Superwall.shared.delegate = swDelegate
  }

  var body: some Scene {
    WindowGroup {
      ContentView()
    }
  }
}
```

## Tab

```swift Objective-C
// SWDelegate.h...
#import <Foundation/Foundation.h>
@import SuperwallKit;

NS_ASSUME_NONNULL_BEGIN

@interface SWDelegate : NSObject <SWKSuperwallDelegate>

@end

NS_ASSUME_NONNULL_END

// SWDelegate.m...
@implementation SWDelegate

- (void)handleSuperwallEventWithInfo:(SWKSuperwallEventInfo *)eventInfo {
  switch(eventInfo.event) {
    case SWKSuperwallEventTransactionComplete:
      NSLog(@"Transaction complete: %@", eventInfo.params[@"primary_product_id"]);
  }
}

// In AppDelegate.m...
#import "AppDelegate.h"
#import "SWDelegate.h"
@import SuperwallKit;

@interface AppDelegate ()

@property (strong, nonatomic) SWDelegate *delegate;

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    self.delegate = [SWDelegate new];
    [Superwall configureWithApiKey:@"my_api_key"];
    [Superwall sharedInstance].delegate = self.delegate;

    return YES;
}
```

## Tab

```kotlin Android
class SWDelegate : SuperwallDelegate {
  override fun handleSuperwallEvent(eventInfo: SuperwallEventInfo) {
    when (eventInfo.event) {
        is SuperwallPlacement.TransactionComplete -> {
          val transaction = (eventInfo.event as SuperwallPlacement.TransactionComplete).transaction
          val product = (eventInfo.event as SuperwallPlacement.TransactionComplete).product
          val paywallInfo = (eventInfo.event as SuperwallPlacement.TransactionComplete).paywallInfo
          println("Transaction Complete: $transaction, Product: $product, Paywall Info: $paywallInfo")
        }
        else -> {
          // Handle other cases
        }
    }
  }
}

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        Superwall.configure(this, "my_api_key")
        Superwall.instance.delegate = SWDelegate()
    }
}
```

## Tab

```dart Flutter
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:superwallkit_flutter/superwallkit_flutter.dart';

class _MyAppState extends State<MyApp> implements SuperwallDelegate {
  final logging = Logging();

  @override
  void initState() {
    super.initState();
    configureSuperwall(useRevenueCat);
  }

  Future<void> configureSuperwall(bool useRevenueCat) async {
    try {
      final apiKey = Platform.isIOS
          ? 'ios_api_project_key'
          : 'android_api_project_key';

      final logging = Logging();
      logging.level = LogLevel.warn;
      logging.scopes = {LogScope.all};

      final options = SuperwallOptions();
      options.paywalls.shouldPreload = false;
      options.logging = logging;

      Superwall.configure(apiKey,
          purchaseController: null,
          options: options, completion: () {
        logging.info('Executing Superwall configure completion block');
      });

      Superwall.shared.setDelegate(this);
    } catch (e) {
      // Handle any errors that occur during configuration
      logging.error('Failed to configure Superwall:', e);
    }
  }

  @override
  Future<void> handleSuperwallEvent(SuperwallEventInfo eventInfo) async {
    switch (eventInfo.event.type) {
      case PlacementType.transactionComplete:
        final product = eventInfo.params?['product'];
        logging.info('Transaction complete event received with product: $product');

        // Add any additional logic you need to handle the transaction complete event
        break;
      // Handle other events if necessary
      default:
        logging.info('Unhandled event type: ${eventInfo.event.type}');
        break;
    }
  }
}
```

## Tab

```typescript React Native
import {
  PaywallInfo,
  SubscriptionStatus,
  SuperwallDelegate,
  SuperwallPlacementInfo,
  PlacementType,
} from '../../src';

export class MySuperwallDelegate extends SuperwallDelegate {
  handleSuperwallPlacement(placementInfo: SuperwallPlacementInfo) {
    console.log('Handling Superwall placement:', placementInfo);

    switch (placementInfo.placement.type) {
      case PlacementType.transactionComplete:
        const product = placementInfo.params?.["product"];
        if (product) {
          console.log(`Product: ${product}`);
        } else {
          console.log("Product not found in params.");
        }
        break;
      default:
        break;
    }
  }
}

export default function App() {
  const delegate = new MySuperwallDelegate();

  React.useEffect(() => {
    const setupSuperwall = async () => {
      const apiKey =
        Platform.OS === 'ios'
          ? 'ios_api_project_key'
          : 'android_api_project_key';

      Superwall.configure({
        apiKey: apiKey,
      });

      Superwall.shared.setDelegate(delegate);
    };
  }
}
```

### Use a purchase controller

If you are controlling the purchasing pipeline yourself via a [purchase controller](/docs/sdk/guides/advanced-configuration), then naturally the purchased product is available:

## Tab

```swift Swift
final class MyPurchaseController: PurchaseController {
  func purchase(product: StoreProduct) async -> PurchaseResult {
    print("Kicking off purchase of \(product.productIdentifier)")

    do {
      let result = try await MyPurchaseLogic.purchase(product: product)
      return .purchased // .cancelled,  .pending, .failed(Error)
    } catch {
      return .failed(error)
    }

}

// 2
func restorePurchases() async -> RestorationResult {
print("Restoring purchases")
return .restored // false
}
}

@main
struct Caffeine_PalApp: App {
private let pc: MyPurchaseController = .init()

init() {
Superwall.configure(apiKey: "my_api_key", purchaseController: pc)
}

var body: some Scene {
WindowGroup {
ContentView()
}
}
}

```

## Tab

```swift Objective-C
// In MyPurchaseController.h...
#import <Foundation/Foundation.h>
@import SuperwallKit;
@import StoreKit;

NS_ASSUME_NONNULL_BEGIN

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

NS_ASSUME_NONNULL_END

// In MyPurchaseController.m...
#import "MyPurchaseController.h"

@implementation MyPurchaseController

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

- (void)purchaseWithProduct:(SWKStoreProduct * _Nonnull)product
                 completion:(void (^ _Nonnull)(enum SWKPurchaseResult, NSError * _Nullable))completion {
  NSLog(@"Kicking off purchase of %@", product.productIdentifier);
  // Do purchase logic here
  completion(SWKPurchaseResultPurchased, nil);
}

- (void)restorePurchasesWithCompletion:(void (^ _Nonnull)(enum SWKRestorationResult, NSError * _Nullable))completion {
  // Do restore logic here
  completion(SWKRestorationResultRestored, nil);
}
@end

// In AppDelegate.m...

#import "AppDelegate.h"
#import "MyPurchaseController.h"
@import SuperwallKit;

@interface AppDelegate ()
@end

@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:^{

    }];

    return YES;
}
```

## Tab

```kotlin Android
class MyPurchaseController(val context: Context): PurchaseController {
    override suspend fun purchase(
        activity: Activity,
        productDetails: ProductDetails,
        basePlanId: String?,
        offerId: String?
    ): PurchaseResult {
        println("Kicking off purchase of $basePlanId")
        return PurchaseResult.Purchased()
    }

    override suspend fun restorePurchases(): RestorationResult {
        TODO("Not yet implemented")
    }
}

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        Superwall.configure(this, "my_api_key", purchaseController = MyPurchaseController(this))
    }
}
```

## Tab

```dart Flutter
class MyPurchaseController extends PurchaseController {
  // 1
  @override
  Future<PurchaseResult> purchaseFromAppStore(String productId) async {
    print('Attempting to purchase product with ID: $productId');
    // Do purchase logic
    return PurchaseResult.purchased;
  }

  @override
  Future<PurchaseResult> purchaseFromGooglePlay(
    String productId,
    String? basePlanId,
    String? offerId
  ) async {
    print('Attempting to purchase product with ID: $productId and basePlanId: $basePlanId');
    // Do purchase logic
    return PurchaseResult.purchased;
  }

  @override
  Future<RestorationResult> restorePurchases() async {
    // Do resture logic
  }
}
```

## Tab

```typescript React Native
export class MyPurchaseController extends PurchaseController {
  // 1
  async purchaseFromAppStore(productId: string): Promise<PurchaseResult> {
    console.log("Kicking off purchase of ", productId)
    // Purchase logic
    return await this._purchaseStoreProduct(storeProduct)
  }

  async purchaseFromGooglePlay(
    productId: string,
    basePlanId?: string,
    offerId?: string
  ): Promise<PurchaseResult> {
    console.log("Kicking off purchase of ", productId, " base plan ID", basePlanId)
    // Purchase logic
    return await this._purchaseStoreProduct(storeProduct)
  }

  // 2
  async restorePurchases(): Promise<RestorationResult> {
    // TODO
    // ----
    // Restore purchases and return true if successful.
  }
}
```

### SwiftUI - Use `PaywallView`

The `PaywallView` allows you to show a paywall by sending it a placement. It also has a dismiss handler where the purchased product will be vended:

```swift
@main
struct Caffeine_PalApp: App {
  @State private var presentPaywall: Bool = false

  init() {
    Superwall.configure(apiKey: "my_api_key")
  }

  var body: some Scene {
    WindowGroup {
      Button("Log") {
        presentPaywall.toggle()
      }
      .sheet(isPresented: $presentPaywall) {
        PaywallView(placement: "caffeineLogged", params: nil, paywallOverrides: nil) { info, result in
          switch result {
          case .declined:
            print("No purchased occurred.")
          case .purchased(let product):
            print("Purchased \(product.productIdentifier)")
          case .restored:
            print("Restored purchases.")
          }
        } feature: {
          print("Converted")
          presentPaywall.toggle()
        }
      }
    }
  }
}
```