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

# useSuperwall

## Purpose

The `useSuperwall` hook is the core hook that provides access to the Superwall store and underlying SDK functionality. It's generally used internally by other more specific hooks like `useUser` and `usePlacement`, but can be used directly for advanced scenarios. It ensures that native event listeners are set up on first use.

## Returned Values (Store State and Actions)

The hook returns an object representing the Superwall store. If a `selector` function is provided, it returns the selected slice of the store.

### State

<TypeTable
  type="{
  isConfigured: {
    type: &#x22;boolean&#x22;,
    description: &#x22;True if the SDK has been configured with an API key.&#x22;,
  },
  isLoading: {
    type: &#x22;boolean&#x22;,
    description: &#x22;True while the SDK is configuring or fetching data.&#x22;,
  },
  listenersInitialized: {
    type: &#x22;boolean&#x22;,
    description: &#x22;True if native event listeners have been initialized.&#x22;,
  },
  configurationError: {
    type: &#x22;string | null&#x22;,
    description: &#x22;Error message if configuration failed.&#x22;,
  },
  user: {
    type: &#x22;UserAttributes | null&#x22;,
    description: &#x22;Current user attributes. Null after reset; undefined before initial load.&#x22;,
  },
  subscriptionStatus: {
    type: &#x22;SubscriptionStatus&#x22;,
    description: &#x22;Current subscription status for the user.&#x22;,
  },
}"
/>

### Actions (Functions)

<TypeTable
  type="{
  configure: {
    type: &#x22;(apiKey: string, options?: PartialSuperwallOptions) => Promise<void>&#x22;,
    description: &#x22;Initializes the SDK with your API key and optional configuration. Android only: set options.passIdentifiersToPlayStore to send raw appUserId to Google Play.&#x22;,
  },
  identify: {
    type: &#x22;(userId: string, options?: IdentifyOptions) => Promise<void>&#x22;,
    description: &#x22;Identifies the user with the given userId.&#x22;,
  },
  reset: {
    type: &#x22;() => Promise<void>&#x22;,
    description: &#x22;Resets the user's identity and clears user-specific data.&#x22;,
  },
  registerPlacement: {
    type: &#x22;(placement: string, params?: Record<string, any>, handlerId?: string | null) => Promise<void>&#x22;,
    description: &#x22;Registers a placement and optionally triggers a paywall.&#x22;,
  },
  getPresentationResult: {
    type: &#x22;(placement: string, params?: Record<string, any>) => Promise<PresentationResult>&#x22;,
    description: &#x22;Gets the presentation result for a placement without presenting.&#x22;,
  },
  restorePurchases: {
    type: &#x22;() => Promise<RestorationResultResponse>&#x22;,
    description: &#x22;Programmatically restores purchases and returns whether the restore succeeded or failed.&#x22;,
  },
  dismiss: {
    type: &#x22;() => Promise<void>&#x22;,
    description: &#x22;Dismisses any currently presented paywall.&#x22;,
  },
  preloadAllPaywalls: {
    type: &#x22;() => Promise<void>&#x22;,
    description: &#x22;Preloads all paywalls configured in the dashboard.&#x22;,
  },
  preloadPaywalls: {
    type: &#x22;(placements: string[]) => Promise<void>&#x22;,
    description: &#x22;Preloads paywalls for the specified placements.&#x22;,
  },
  setUserAttributes: {
    type: &#x22;(attrs: Record<string, any | null>) => Promise<void>&#x22;,
    description: &#x22;Sets custom attributes for the current user. Attribute values can be null.&#x22;,
  },
  getUserAttributes: {
    type: &#x22;() => Promise<Record<string, any>>&#x22;,
    description: &#x22;Retrieves the current user's attributes.&#x22;,
  },
  setLogLevel: {
    type: &#x22;(level: string) => Promise<void>&#x22;,
    description: &#x22;Sets the SDK log level (debug, info, warn, error, none).&#x22;,
  },
  setIntegrationAttributes: {
    type: &#x22;(attributes: IntegrationAttributes) => Promise<void>&#x22;,
    description: &#x22;Sets third-party integration identifiers, including `appstackId` for Appstack.&#x22;,
  },
  getIntegrationAttributes: {
    type: &#x22;() => Promise<Record<string, string>>&#x22;,
    description: &#x22;Returns currently set integration attributes.&#x22;,
  },
  setSubscriptionStatus: {
    type: &#x22;(status: SubscriptionStatus) => Promise<void>&#x22;,
    description: &#x22;Manually sets the user's subscription status.&#x22;,
  },
  getDeviceAttributes: {
    type: &#x22;() => Promise<Record<string, any>>&#x22;,
    description: &#x22;Returns device attributes from the native SDK.&#x22;,
  },
  getEntitlements: {
    type: &#x22;() => Promise<EntitlementsInfo>&#x22;,
    description: &#x22;Fetches the user's entitlement snapshot, including active and inactive entitlements, plus all known entitlements when exposed by the native bridge.&#x22;,
  },
}"
/>

### Selector (Optional Parameter)

<TypeTable
  type="{
  selector: {
    type: &#x22;(state: SuperwallStore) => T&#x22;,
    description: &#x22;Selects a slice of store state for shallow-equality rendering.&#x22;,
  },
}"
/>

### UserAttributes

<TypeTable
  type="{
  aliasId: {
    type: &#x22;string&#x22;,
    description: &#x22;Alias ID for the user.&#x22;,
  },
  appUserId: {
    type: &#x22;string&#x22;,
    description: &#x22;Application-specific user ID.&#x22;,
  },
  applicationInstalledAt: {
    type: &#x22;string&#x22;,
    description: &#x22;ISO date string for when the app was installed.&#x22;,
  },
  seed: {
    type: &#x22;number&#x22;,
    description: &#x22;Seed used for experiment assignment.&#x22;,
  },
  &#x22;[key: string]&#x22;: {
    type: &#x22;any | null&#x22;,
    description: &#x22;Other custom user attributes. Values may be null.&#x22;,
  },
}"
/>

### SubscriptionStatus

<TypeTable
  type="{
  status: {
    type: &#x22;\&#x22;UNKNOWN\&#x22; | \&#x22;INACTIVE\&#x22; | \&#x22;ACTIVE\&#x22;&#x22;,
    description: &#x22;Current subscription status value.&#x22;,
    required: true,
  },
  entitlements: {
    type: &#x22;Entitlement[]?&#x22;,
    description: &#x22;Only present when status is \&#x22;ACTIVE\&#x22;.&#x22;,
  },
}"
/>

### EntitlementsInfo

<TypeTable
  type="{
  all: {
    type: &#x22;Entitlement[]?&#x22;,
    description: &#x22;All entitlements known for the user. Present when the native bridge exposes the full entitlement set.&#x22;,
  },
  active: {
    type: &#x22;Entitlement[]&#x22;,
    description: &#x22;Entitlements that are currently active.&#x22;,
    required: true,
  },
  inactive: {
    type: &#x22;Entitlement[]&#x22;,
    description: &#x22;Entitlements that are known but not currently active.&#x22;,
    required: true,
  },
}"
/>

### RestorationResultResponse

<TypeTable
  type="{
  result: {
    type: '&#x22;restored&#x22; | &#x22;failed&#x22;',
    description: &#x22;Outcome of the restore attempt.&#x22;,
    required: true,
  },
  errorMessage: {
    type: &#x22;string | null&#x22;,
    description: &#x22;Error message when `result` is `failed`.&#x22;,
  },
}"
/>

## Example

(Direct Usage - Advanced)

```tsx
import { useSuperwall } from 'expo-superwall';

function MyAdvancedComponent() {
  const { isConfigured, configure, setUserAttributes } = useSuperwall();

  if (!isConfigured) {
    return <Text>SDK not configured yet.</Text>;
  }

  const handleSetCustomAttribute = () => {
    setUserAttributes({ myCustomFlag: true });
  };

  return <Button title="Set Custom Flag" onPress={handleSetCustomAttribute} />;
}
```

### Example: Configure with Android identifiers

```tsx
import { Platform } from "react-native"
import Superwall from "expo-superwall/compat"

async function configureSuperwall() {
  await Superwall.configure({
    apiKey: Platform.OS === "ios" ? IOS_KEY : ANDROID_KEY,
    options: Platform.OS === "android"
      ? { passIdentifiersToPlayStore: true }
      : undefined,
  })
}
```