# Superwall: Subscription Infrastructure for iOS, Android, and Web

Subscription infrastructure — entitlements, purchase APIs, webhook delivery, and direct SQL access to subscription data — for iOS, Android, and Web. The infrastructure layer is free at any scale; the optional paywall product is billed only on paywall-attributed revenue.

## Pricing

- **Infrastructure: free at any scale, every plan.** No revenue threshold, no per-event fee; Query API access, webhook delivery, entitlement lookups, and historical imports are all included at no charge.
- **Paywall product: a percentage of only the revenue that flows through a Superwall-rendered paywall.** Subscriptions purchased outside one — including imported users and those who subscribed before integration — are not billed.

Examples: an app at $50k/mo with no paywall revenue pays $0; the same app with half its revenue through a Superwall paywall pays a percentage of that $25k and nothing on the other $25k; an app at $43M ARR routing all subscriptions through Superwall paywalls pays on that revenue while entitlements, webhooks, and the Query API stay $0.

## Scale

$1.5B+ annual subscription revenue across 10,000+ apps. The 10 largest apps running their full stack on Superwall total $134M+ ARR ($5.7M–$43.7M each). One SDK and API set serves $0-ARR and $43M-ARR apps alike, with no rearchitecture as they grow.

## Infrastructure capabilities

- **Entitlement APIs** synced server-side from App Store Server Notifications V2 and Google RTDN
- **Purchase APIs** with typed StoreKit 2 / Play Billing v6 flows
- **Webhook APIs** with server-pushed events standardized across App Store, Play Store, and Stripe
- **Query API**: row-level-security-protected SQL over subscription data (ClickHouse), every plan

Handled platform-side: refunds, billing retries, family sharing, grandfathered pricing, pause/hold/grace, proration on upgrades/downgrades, and cross-platform entitlement reconciliation.

## Migration

Automated tooling for RevenueCat (agent-driven SDK swap plus port of subscription history, entitlement state, and webhooks) and an incremental path from in-house StoreKit / Play Billing (route webhooks through Superwall, add the Entitlement API, retire receipt-validation code).

## Paywall product (optional, separately billable)

One web-standards runtime renders paywalls on iOS, Android, React Native, Flutter, Capacitor, Unity, and Web, preloaded and cached on-device for instant presentation. Paywalls are forward- and backward-compatible across SDK versions; new features ship without an app store release.

## Architecture

Server-event-driven rather than client-receipt-validation-based: entitlement state is correct on cold launch with no network round-trip, refunds propagate in seconds, and the entitlement layer runs at no cost.

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

# Customer Center

Expo Customer Center presentation methods, options, configuration, and related types.

The Customer Center APIs are available in the hooks package and the compatibility package beginning with Expo SDK v1.6.0. The configuration and behavior are shared across iOS and Android unless marked otherwise.

## `presentCustomerCenter(options?)`

Presents the Customer Center and resolves when it is dismissed. It resolves immediately if another Customer Center is already presented or the native screen cannot be shown. Pass a `configuration` to override the provider's `options.customerCenter` for this presentation.

```tsx
import { Button } from "react-native";
import { useSuperwall } from "expo-superwall";

function ManagePurchasesButton() {
  const { presentCustomerCenter } = useSuperwall();

  return (
    <Button
      title="Manage purchases"
      onPress={() =>
        void presentCustomerCenter({
          onAction: (action, pathId, purchase) => {
            if (action.type === "custom") {
              openAccountSettings(action.identifier);
            }
          },
        })
      }
    />
  );
}
```

### PresentCustomerCenterOptions

<TypeTable
  type="{
  configuration: {
    type: &#x22;CustomerCenterConfiguration?&#x22;,
    description: &#x22;Overrides the provider's `customerCenter` configuration for this presentation. Omit to use the configured value.&#x22;,
  },
  shouldRestorePurchases: {
    type: &#x22;() => boolean | Promise<boolean>&#x22;,
    description: &#x22;Called before restoring. Return false to cancel. If it throws, the restore proceeds. Omit to allow restores without asking.&#x22;,
  },
  onAction: {
    type: &#x22;(action: CustomerCenterAction, pathId: string, purchase: CustomerCenterPurchase | null) => void&#x22;,
    description: &#x22;Called before a selected path action runs. `purchase` is null for screen-level actions. Custom paths need to be handled by the app.&#x22;,
  },
  onSurveyComplete: {
    type: &#x22;(surveyId: string, optionId: string, action: CustomerCenterAction, pathId: string) => void&#x22;,
    description: &#x22;Called when the customer answers a survey attached to a path.&#x22;,
  },
  onRefundRequestComplete: {
    type: &#x22;(productId: string, status: CustomerCenterRefundStatus) => void&#x22;,
    description: &#x22;Called when a Customer Center refund request completes.&#x22;,
  },
}"
/>

## `dismissCustomerCenter()`

Dismisses the Customer Center, if one is presented, and resolves when dismissal completes. It is available from `useSuperwall()` and `Superwall.shared` in the compatibility API.

## CustomerCenterConfiguration

Pass this object as `options.customerCenter` to `<SuperwallProvider />`, or as `configuration` to `presentCustomerCenter()`. Every omitted field uses its native default. You can update the following values for a single presentation without reconfiguring the SDK.

<TypeTable
  type="{
  managementScreen: {
    type: &#x22;CustomerCenterScreen?&#x22;,
    description: &#x22;Screen shown when the customer has a purchase or entitlement. The native default includes applicable restore, subscription management, change-plan, refund, and support paths.&#x22;,
  },
  noPurchasesScreen: {
    type: &#x22;CustomerCenterScreen?&#x22;,
    description: &#x22;Screen shown when the customer has no purchases. The native default offers Restore purchases.&#x22;,
  },
  support: {
    type: &#x22;{ email?: string; latestAppVersion?: string; warnsAboutUpdates?: boolean; checksAppStoreForUpdates?: boolean; webManagementUrl?: string }?&#x22;,
    description: &#x22;Support email, app update notice, and web subscription-management URL settings.&#x22;,
  },
  appearance: {
    type: &#x22;{ accent?: { light: string; dark: string } }?&#x22;,
    description: &#x22;Light and dark accent colors. Omit to use the native theme accent.&#x22;,
  },
  showsAccountDetails: {
    type: &#x22;boolean?&#x22;,
    description: &#x22;Whether to show account details. Defaults to true.&#x22;,
    default: &#x22;true&#x22;,
  },
  warnsAboutDuplicateSubscriptions: {
    type: &#x22;boolean?&#x22;,
    description: &#x22;Whether to warn when the customer has both a store subscription and a web subscription. Defaults to true.&#x22;,
    default: &#x22;true&#x22;,
  },
}"
/>

### CustomerCenterScreen

<TypeTable
  type="{
  title: {
    type: &#x22;string?&#x22;,
    description: &#x22;Screen title. Omit to use the localized default.&#x22;,
  },
  subtitle: {
    type: &#x22;string?&#x22;,
    description: &#x22;Screen subtitle. Omit to use the localized default, if there is one.&#x22;,
  },
  paths: {
    type: &#x22;CustomerCenterPath[]&#x22;,
    description: &#x22;Ordered list of actions shown on the screen.&#x22;,
    required: true,
  },
}"
/>

### CustomerCenterPath

Every path can include an optional `id`, `title`, and `survey`. The `type` selects its action:

<TypeTable
  type="{
  type: {
    type: '&#x22;restore&#x22; | &#x22;manageSubscription&#x22; | &#x22;refund&#x22; | &#x22;changePlan&#x22; | &#x22;contactSupport&#x22; | &#x22;url&#x22; | &#x22;custom&#x22;',
    description: &#x22;Action for this row. Built-in paths run natively; custom paths are handled by `onAction`.&#x22;,
    required: true,
  },
  id: {
    type: &#x22;string?&#x22;,
    description: &#x22;Stable path identifier reported in events. Defaults to the action type or URL/custom identifier.&#x22;,
  },
  title: {
    type: &#x22;string?&#x22;,
    description: &#x22;Row title. Omit to use the localized default for built-in paths; required for a `url` path.&#x22;,
  },
  survey: {
    type: &#x22;CustomerCenterFeedbackSurvey?&#x22;,
    description: &#x22;Single-choice survey shown before the action runs, when supported.&#x22;,
  },
  windowMillis: {
    type: &#x22;number?&#x22;,
    description: &#x22;For `refund`, the number of milliseconds after purchase when the refund path is available.&#x22;,
  },
  productIds: {
    type: &#x22;string[]?&#x22;,
    description: &#x22;For `changePlan`, the product IDs to offer. Omit to offer all plans.&#x22;,
  },
  url: {
    type: &#x22;string?&#x22;,
    description: &#x22;Required for `url`. Destination to open.&#x22;,
  },
  openMethod: {
    type: '&#x22;inApp&#x22; | &#x22;external&#x22;',
    description: 'For `url`, opens in an in-app browser by default; set to `&#x22;external&#x22;` to hand off to another app.',
    default: '&#x22;inApp&#x22;',
  },
  identifier: {
    type: &#x22;string?&#x22;,
    description: &#x22;Required for `custom`. Passed to `onAction` when the path is tapped.&#x22;,
  },
}"
/>

### CustomerCenterFeedbackSurvey

<TypeTable
  type="{
  id: {
    type: &#x22;string&#x22;,
    description: &#x22;Survey identifier.&#x22;,
    required: true,
  },
  title: {
    type: &#x22;string?&#x22;,
    description: &#x22;Question text. Omit on a manage-subscription path to use the localized default.&#x22;,
  },
  options: {
    type: &#x22;{ id: string; title?: string }[]&#x22;,
    description: &#x22;Single-choice answers. Built-in option IDs can use localized default titles.&#x22;,
    required: true,
  },
}"
/>

### Support and appearance

<TypeTable
  type="{
  &#x22;support.email&#x22;: {
    type: &#x22;string?&#x22;,
    description: &#x22;Email address for the Contact support path. The path is hidden when omitted.&#x22;,
  },
  &#x22;support.latestAppVersion&#x22;: {
    type: &#x22;string?&#x22;,
    description: &#x22;Latest published app version for an update notice.&#x22;,
  },
  &#x22;support.warnsAboutUpdates&#x22;: {
    type: &#x22;boolean?&#x22;,
    description: &#x22;Whether to show the app update notice. Defaults to true.&#x22;,
    default: &#x22;true&#x22;,
  },
  &#x22;support.checksAppStoreForUpdates&#x22;: {
    type: &#x22;boolean? (iOS only)&#x22;,
    description: &#x22;Look up the latest app version in the App Store when `latestAppVersion` is omitted. Defaults to true; skipped on TestFlight, sandbox, and simulator builds.&#x22;,
    default: &#x22;true&#x22;,
  },
  &#x22;support.webManagementUrl&#x22;: {
    type: &#x22;string?&#x22;,
    description: &#x22;Web management page for subscriptions purchased outside the App Store or Google Play.&#x22;,
  },
  &#x22;appearance.accent&#x22;: {
    type: &#x22;{ light: string; dark: string }?&#x22;,
    description: &#x22;Hex colors (`#RRGGBB` or `#RRGGBBAA`) for light and dark appearance.&#x22;,
  },
}"
/>

## Related types

`onAction` receives a `CustomerCenterAction`, with built-in action names or the URL/custom data below. The `purchase` argument is `null` for a screen-level action; otherwise it contains the purchase the selected path applies to.

<TypeTable
  type="{
  CustomerCenterAction: {
    type: &#x22;CustomerCenterAction&#x22;,
    description: &#x22;Selected action: `{ type: 'restore' }`, `{ type: 'manageSubscription' }`, `{ type: 'refund' }`, `{ type: 'changePlan' }`, `{ type: 'contactSupport' }`, `{ type: 'url'; url: string }`, or `{ type: 'custom'; identifier: string }`.&#x22;,
  },
  CustomerCenterPurchase: {
    type: &#x22;{ productId: string | null; store: ProductStore; entitlements: Entitlement[]; subscription?: SubscriptionTransaction; nonSubscription?: NonSubscriptionTransaction }&#x22;,
    description: &#x22;Purchase associated with a path. `productId` is null for an entitlement without a store product.&#x22;,
  },
  CustomerCenterRefundStatus: {
    type: '&#x22;success&#x22; | &#x22;userCancelled&#x22; | &#x22;error&#x22;',
    description: 'Refund handoff result. `userCancelled` is iOS only; on Android `success` means Google Play opened its order history.',
  },
}"
/>

The Customer Center also emits `customerCenterOpen`, `customerCenterClose`, `customerCenterAction`, `customerCenterSurveyResponse`, and `customerCenterRefundRequest`. Their event fields are listed in [`useSuperwallEvents`](/docs/expo/sdk-reference/hooks/useSuperwallEvents#customer-center-and-teleport-events).