# 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

# SDK Reference

Reference for the Superwall Unity SDK beta C# API.

The Unity SDK exposes the `Superwall` namespace. Configure the SDK once with the static
`Superwall.Configure(...)` method, then use `Superwall.Shared` for placement registration, user
management, subscription state, and paywall utilities.

## `Superwall.Configure`

```csharp C#
public static Superwall Configure(
    string apiKey,
    SuperwallOptions options = null,
    IPurchaseController purchaseController = null,
    Action<ConfigurationResult> completion = null
)
```

<TypeTable
  type="{
  apiKey: {
    type: &#x22;string&#x22;,
    description: &#x22;Your Superwall Public API Key.&#x22;,
    required: true,
  },
  options: {
    type: &#x22;SuperwallOptions&#x22;,
    typeDescriptionLink: &#x22;/unity/guides/advanced-configuration#superwalloptions&#x22;,
    description: &#x22;Optional SDK configuration.&#x22;,
    default: &#x22;null&#x22;,
  },
  purchaseController: {
    type: &#x22;IPurchaseController&#x22;,
    typeDescriptionLink: &#x22;/unity/guides/custom-purchase-controller&#x22;,
    description: &#x22;Optional custom purchase and restore handler.&#x22;,
    default: &#x22;null&#x22;,
  },
  completion: {
    type: &#x22;Action<ConfigurationResult>&#x22;,
    description: &#x22;Optional callback invoked after native configuration completes.&#x22;,
    default: &#x22;null&#x22;,
  },
}"
/>

## `RegisterPlacement`

```csharp C#
public void RegisterPlacement(
    string placement,
    Dictionary<string, object> parameters = null,
    PaywallPresentationHandler handler = null,
    Action feature = null
)
```

<TypeTable
  type="{
  placement: {
    type: &#x22;string&#x22;,
    description: &#x22;Placement name configured in the Superwall dashboard.&#x22;,
    required: true,
  },
  parameters: {
    type: &#x22;Dictionary<string, object>&#x22;,
    description: &#x22;Optional placement parameters for audience filters and paywall variables.&#x22;,
    default: &#x22;null&#x22;,
  },
  handler: {
    type: &#x22;PaywallPresentationHandler&#x22;,
    description:
      &#x22;Optional callbacks for paywall presentation, dismissal, errors, skips, and custom callbacks.&#x22;,
    default: &#x22;null&#x22;,
  },
  feature: {
    type: &#x22;Action&#x22;,
    description: &#x22;Callback that runs when the user has access to the feature.&#x22;,
    default: &#x22;null&#x22;,
  },
}"
/>

## Common Methods and Properties

<TypeTable
  type="{
  SetDelegate: {
    type: &#x22;void SetDelegate(ISuperwallDelegate superwallDelegate)&#x22;,
    description: &#x22;Sets or clears the delegate that receives lifecycle callbacks.&#x22;,
  },
  Identify: {
    type: &#x22;void Identify(string userId, IdentityOptions identityOptions = null)&#x22;,
    description: &#x22;Identifies the current user.&#x22;,
  },
  Reset: {
    type: &#x22;void Reset()&#x22;,
    description: &#x22;Resets the current user and returns to anonymous identity.&#x22;,
  },
  SetUserAttributes: {
    type: &#x22;void SetUserAttributes(Dictionary<string, object> attributes)&#x22;,
    description: &#x22;Sets user attributes for targeting and personalization.&#x22;,
  },
  SubscriptionStatus: {
    type: &#x22;SubscriptionStatus&#x22;,
    description: &#x22;Gets or sets the current subscription status.&#x22;,
  },
  GetCustomerInfo: {
    type: &#x22;void GetCustomerInfo(Action<CustomerInfo> completion)&#x22;,
    description: &#x22;Fetches customer info asynchronously.&#x22;,
  },
  GetPresentationResult: {
    type: &#x22;void GetPresentationResult(string placement, Dictionary<string, object> parameters = null, Action<PresentationResult> completion = null)&#x22;,
    description: &#x22;Checks what Superwall would do for a placement without presenting it.&#x22;,
  },
  PreloadAllPaywalls: {
    type: &#x22;void PreloadAllPaywalls()&#x22;,
    description: &#x22;Preloads all paywalls from the current configuration.&#x22;,
  },
  PreloadPaywallsForPlacements: {
    type: &#x22;void PreloadPaywallsForPlacements(List<string> placementNames)&#x22;,
    description: &#x22;Preloads paywalls for the provided placement names.&#x22;,
  },
  HandleDeepLink: {
    type: &#x22;bool HandleDeepLink(string url)&#x22;,
    description: &#x22;Passes a URL to the native SDK for deep link handling.&#x22;,
  },
  Dismiss: {
    type: &#x22;void Dismiss()&#x22;,
    description: &#x22;Dismisses the currently presented paywall.&#x22;,
  },
  Purchase: {
    type: &#x22;void Purchase(string productId, Action<PurchaseResult> completion)&#x22;,
    description: &#x22;Purchases a product directly without presenting a paywall.&#x22;,
  },
  GetProducts: {
    type: &#x22;void GetProducts(List<string> productIds, Action<Dictionary<string, StoreProduct>> completion)&#x22;,
    description: &#x22;Fetches store product details by product ID.&#x22;,
  },
  RefreshConfiguration: {
    type: &#x22;void RefreshConfiguration()&#x22;,
    description: &#x22;Forces a configuration refresh.&#x22;,
  },
  IsConfigured: {
    type: &#x22;bool&#x22;,
    description: &#x22;Whether the native SDK is configured.&#x22;,
  },
  IsPaywallPresented: {
    type: &#x22;bool&#x22;,
    description: &#x22;Whether a paywall is currently presented.&#x22;,
  },
}"
/>

## Presentation Handler

```csharp C#
public class PaywallPresentationHandler
{
    public Action<PaywallInfo> OnPresent;
    public Action<PaywallInfo, PaywallResult> OnDismiss;
    public Action<string> OnError;
    public Action<PaywallSkippedReason> OnSkip;
    public Func<CustomCallback, CustomCallbackResult> OnCustomCallback;
}
```

## Related Guides

* [Install the SDK](/docs/unity/quickstart/install)
* [Configure the SDK](/docs/unity/quickstart/configure)
* [Presenting Paywalls](/docs/unity/quickstart/present-paywalls)
* [Advanced Configuration](/docs/unity/guides/advanced-configuration)
* [Custom Purchase Controller](/docs/unity/guides/custom-purchase-controller)