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

# CustomPurchaseControllerProvider

A modern, hooks-based approach to handling purchases and purchase restores with the Superwall SDK.

The `CustomPurchaseControllerProvider` component allows you to integrate your own purchase handling logic with the Superwall SDK. It provides a modern, hooks-based approach to handling purchases and purchase restores.

## Usage

```tsx
import { CustomPurchaseControllerProvider } from 'expo-superwall'
import { SuperwallProvider } from 'expo-superwall'

export default function App() {
  return (
    <CustomPurchaseControllerProvider
      controller={{
        onPurchase: async (params) => {
          if (params.platform === "ios") {
            console.log("iOS purchase:", params)
            // Handle iOS purchase with StoreKit
          } else {
            console.log("Android purchase:", params.productId)
            // Handle Android purchase with Google Play Billing
          }
        },
        onPurchaseRestore: async () => {
          console.log("Restore purchases requested")
          // Handle restore purchases logic
        },
      }}
    >
      <SuperwallProvider apiKeys={{ ios: "YOUR_IOS_KEY", android: "YOUR_ANDROID_KEY" }}>
        {/* Your app content */}
      </SuperwallProvider>
    </CustomPurchaseControllerProvider>
  )
}
```

> **Warning:** **Important:** The `onPurchase` and `onPurchaseRestore` callbacks communicate the outcome through the resolved value or an error:- **Return/resolve `void` or a success result** → Superwall records a successful purchase or restore
> - **Return a failure/cancelled result or throw** → Superwall records a failed or cancelled outcomeIf your purchase function returns a status like `"cancelled"` or `"error"`, return a `PurchaseResult` with that type (or throw) so Superwall records the correct outcome:```tsx
> onPurchase: async (params) => {
>   const result = await yourPurchaseFunction(params.productId);
> 
>   if (result !== "success") {
>     return { type: "failed", error: `Purchase ${result}` };
>   }
> 
>   // Only reaches here on success
> },
> ```**Why this matters:** If your callback resolves without signaling failure, Superwall will count it as a conversion.

## Props

<TypeTable
  type="{
  controller: {
    type: &#x22;CustomPurchaseControllerContext&#x22;,
    description: &#x22;Object that implements purchase and restore handlers.&#x22;,
    required: true,
  },
  children: {
    type: &#x22;React.ReactNode&#x22;,
    description: &#x22;Child components wrapped by this provider.&#x22;,
    required: true,
  },
}"
/>

### CustomPurchaseControllerContext

<TypeTable
  type="{
  onPurchase: {
    type: &#x22;(params: OnPurchaseParams) => Promise<PurchaseResult | void>&#x22;,
    description: &#x22;Handle a purchase and return a result or throw to signal failure.&#x22;,
  },
  onPurchaseRestore: {
    type: &#x22;() => Promise<RestoreResult | void>&#x22;,
    description: &#x22;Handle restore purchases and return a result or throw to signal failure.&#x22;,
  },
}"
/>

### OnPurchaseParams (iOS)

<TypeTable
  type="{
  platform: {
    type: &#x22;\&#x22;ios\&#x22;&#x22;,
    description: &#x22;Platform identifier for iOS purchases.&#x22;,
    required: true,
  },
  productId: {
    type: &#x22;string&#x22;,
    description: &#x22;App Store product identifier.&#x22;,
    required: true,
  },
  store: {
    type: &#x22;ProductStore?&#x22;,
    description: &#x22;The store backing the product. When `\&#x22;CUSTOM\&#x22;`, the product is not backed by StoreKit and your purchase handler must implement the purchase itself. See ProductStore for all possible values.&#x22;,
  },
}"
/>

### OnPurchaseParams (Android)

<TypeTable
  type="{
  platform: {
    type: &#x22;\&#x22;android\&#x22;&#x22;,
    description: &#x22;Platform identifier for Android purchases.&#x22;,
    required: true,
  },
  productId: {
    type: &#x22;string&#x22;,
    description: &#x22;Google Play product identifier.&#x22;,
    required: true,
  },
  basePlanId: {
    type: &#x22;string&#x22;,
    description: &#x22;Subscription base plan ID.&#x22;,
    required: true,
  },
  offerId: {
    type: &#x22;string?&#x22;,
    description: &#x22;Optional promotional offer ID.&#x22;,
  },
}"
/>

### ProductStore

<TypeTable
  type="{
  APP_STORE: {
    type: &#x22;\&#x22;APP_STORE\&#x22;&#x22;,
    description: &#x22;Apple App Store product.&#x22;,
  },
  PLAY_STORE: {
    type: &#x22;\&#x22;PLAY_STORE\&#x22;&#x22;,
    description: &#x22;Google Play Store product.&#x22;,
  },
  STRIPE: {
    type: &#x22;\&#x22;STRIPE\&#x22;&#x22;,
    description: &#x22;Stripe-managed product.&#x22;,
  },
  PADDLE: {
    type: &#x22;\&#x22;PADDLE\&#x22;&#x22;,
    description: &#x22;Paddle-managed product.&#x22;,
  },
  SUPERWALL: {
    type: &#x22;\&#x22;SUPERWALL\&#x22;&#x22;,
    description: &#x22;Manually granted entitlement from Superwall.&#x22;,
  },
  CUSTOM: {
    type: &#x22;\&#x22;CUSTOM\&#x22;&#x22;,
    description: &#x22;Custom product that your purchase handler must purchase outside StoreKit or Google Play Billing.&#x22;,
  },
  OTHER: {
    type: &#x22;\&#x22;OTHER\&#x22;&#x22;,
    description: &#x22;Unknown or unsupported store.&#x22;,
  },
}"
/>

### PurchaseResult

<TypeTable
  type="{
  type: {
    type: &#x22;\&#x22;cancelled\&#x22; | \&#x22;failed\&#x22; | \&#x22;purchased\&#x22; | \&#x22;pending\&#x22;&#x22;,
    description: &#x22;Outcome of the purchase flow.&#x22;,
    required: true,
  },
  error: {
    type: &#x22;string?&#x22;,
    description: &#x22;Optional error message when type is failed.&#x22;,
  },
}"
/>

### RestoreResult

<TypeTable
  type="{
  type: {
    type: &#x22;\&#x22;restored\&#x22; | \&#x22;failed\&#x22;&#x22;,
    description: &#x22;Outcome of the restore flow.&#x22;,
    required: true,
  },
  error: {
    type: &#x22;string?&#x22;,
    description: &#x22;Optional error message when type is failed.&#x22;,
  },
}"
/>

## Hook

### `useCustomPurchaseController()`

A hook that provides access to the custom purchase controller context from child components.

```tsx
import { useCustomPurchaseController } from 'expo-superwall'

function MyComponent() {
  const controller = useCustomPurchaseController()
  
  if (!controller) {
    // Not within a CustomPurchaseControllerProvider
    return null
  }
  
  const handlePurchase = async () => {
    // Access controller methods if needed
  }
  
  return <Button onPress={handlePurchase}>Purchase</Button>
}
```

<TypeTable
  type="{
  value: {
    type: &#x22;CustomPurchaseControllerContext | null&#x22;,
    description: &#x22;Controller object passed to the provider, or null if not within a provider.&#x22;,
  },
}"
/>

## How It Works

The `CustomPurchaseControllerProvider` listens for purchase events from the Superwall SDK using the `useSuperwallEvents` hook internally. When a purchase or restore event occurs:

1. It calls your provided `onPurchase` or `onPurchaseRestore` method
2. After your method completes, it notifies the Superwall SDK that the purchase was successful
3. Superwall then dismisses the paywall and continues with the user flow

## Integration with RevenueCat

For a complete RevenueCat integration with error handling, subscription status synchronization, and working examples, see the [Using RevenueCat](/docs/expo/guides/using-revenuecat) guide.

## Notes

* The provider must wrap your app at a level where both the Superwall SDK and your purchase logic can access it
* Purchase success/failure handling is automatic - you just need to perform the actual purchase