# 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

# Discount Codes

Let customers enter a Stripe promotion code on your web paywall, update the price in place, and carry the discount through to Stripe checkout.

Discount codes let a customer type a promotion code into your web paywall, have it validated against Stripe, and see the price update before they check out. The code is then carried through to the Stripe checkout session, so the discount is applied to the purchase they complete.

This works entirely on your paywall — there is no separate discount widget to configure. You add a normal text **Input** for the customer to type into, then a button whose tap behavior runs the **Redeem Discount** action. When the customer taps it, Superwall resolves the code against your Stripe promotion codes, re-prices the products on the paywall, and applies the code at checkout.

> **Note:** Discount codes are a Stripe web checkout feature. The customer redeems a promotion code you have
> already created in your Stripe dashboard — Superwall does not create or manage the coupon itself.

## Before you start

Create the coupon and promotion code in Stripe first. Superwall resolves whatever the customer types against your existing Stripe promotion codes at redeem time, so the code has to exist before it can be applied.

1. In your [Stripe dashboard](https://dashboard.stripe.com/coupons), create a **coupon** with the discount you want to offer (for example, 20% off, or a fixed amount off).
2. Create a **promotion code** for that coupon. The promotion code is the customer-facing string a customer will type into your paywall (for example, `LAUNCH20`).

> **Tip:** Make sure the promotion code exists in the same Stripe environment (live or sandbox) as the
> products on the paywall you are testing. A live promotion code will not resolve against a sandbox
> checkout, and vice versa.

## Add discount code redemption to a paywall

You will add a text input for the customer to type into, then a button that redeems whatever they entered. Open the paywall you want to edit in the [paywall editor](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-overview) and follow along.

## Add an input for the code

Add an [Input element](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-input-component) where the customer will type their code, and give it a helpful placeholder such as "Promo code". Bind the input to a state variable — for example, `state.discountCode` — so the value the customer types is available to the redeem action.

## Add a button to redeem

Add a button (or reuse an existing one) next to the input. This is the element the customer taps to apply their code.

## Add the Redeem Discount action

Select the button and, under [Tap Behavior](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-styling-elements#tap-behaviors&#x29;, click **+ Add Action**. In the **Purchases** group, choose **Redeem Discount**.

## Point the action at the code

Set the action's **code** to reference the input's state variable using Liquid, for example `{{ state.discountCode }}`. This redeems whatever the customer typed.To offer a single fixed promotion instead of customer-entered codes, you can skip the input and set the code to a hardcoded literal such as `LAUNCH20`. Tapping the button then always applies that one code.

## Publish and test

[Publish](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-publishing) the paywall, then enter a real promotion code to confirm the price updates and the discount carries through to checkout. See [Testing purchases](/docs/web-checkout/web-checkout-testing-purchases) for how to run test checkouts safely.

## What happens when a code is redeemed

When the customer taps the button, Superwall:

1. Validates the code against your Stripe promotion codes.
2. Re-prices the products on the paywall in place, so the customer sees the discounted price immediately.
3. Forwards the code to the Stripe checkout session, so the discount is applied to the purchase they complete.

If the code is not valid, the products stay at their original price.

## Showing the discounted price

After a code applies, discount display variables become available so your paywall can react to the discount and show the new price. You can insert these from the variable picker in a text element or wherever you use [dynamic values](/docs/dashboard/dashboard-creating-paywalls/paywall-editor-dynamic-values), for example:

* `hasDiscount` — whether a discount is currently applied. Use it to show or hide a "discount applied" message, a strikethrough of the original price, or a badge.
* `discountCode` — the code that was applied.
* `discountedPrice` — the price after the discount.

A common pattern is to show the original price with a strikethrough alongside `discountedPrice` once `hasDiscount` is true, so the savings are obvious before the customer checks out.

## Where discount codes apply

A redeemed code carries through Superwall's web checkout flows — redirect, embedded, and elements checkout all apply it at the Stripe checkout session. The one exception is deferred **Apple Pay** checkout, which does not apply a redeemed discount code.