Custom Stores
Sell through your own billing system, such as Paddle, Polar or your own payment backend, on Superwall paywalls. Your server reports each purchase, and Superwall grants access and counts the revenue.
A custom store lets a Superwall paywall sell products that the App Store and Google Play don't bill. Your billing system, such as Paddle, Polar or your own payment backend, takes the payment. Your server tells Superwall what happened. Superwall does the rest:
- The user's entitlements update, and the SDK unlocks access on every device they sign in on.
- Revenue charts include the purchases, attributed to the paywall, campaign and experiment that sold them.
- Your webhooks and integrations receive the events.
Custom stores are in early access. The Integrations › Custom stores page appears in the dashboard once Superwall turns it on for your app, so ask your Superwall contact. The API endpoints work for every project.
How it works
Superwall never talks to your billing system. Your server sits between them and does two jobs:
- Create a checkout when a user taps a product on a paywall.
- Report what happened when your billing system says a subscription started, renewed, was canceled or was refunded.
Two values tie a purchase together. Superwall sends both with the checkout request. Store them in your checkout's metadata and send them back on your events:
| Value | What it's for |
|---|---|
app_user_id | The user who gets the entitlement. |
custom_transaction_id | Links the purchase to the paywall that sold it. The paywall closes when an event with this ID arrives, and the revenue is attributed to that paywall. |
What you build
| What it does | Reference | |
|---|---|---|
| A checkout endpoint | Receives Superwall's checkout.create request and answers with a checkout URL from your billing system. | Checkout endpoint |
| A webhook handler | Receives your billing system's webhooks and sends each change to Superwall as an event. | Events |
The example server is both, in two short files with no dependencies.
Two ways to open the checkout
| Checkout endpoint (recommended) | PurchaseController | |
|---|---|---|
| How it works | Superwall asks your server for a checkout URL and opens it. | The SDK calls your app's purchase code, which opens your checkout. |
| Purchase code in your app | None | A PurchaseController |
| Who tracks the subscription status | Superwall | Your app |
| Works on | iOS SDK 4.19.0+ and hosted web paywalls | iOS SDK 4.15.0+ and Android SDK 2.8.0+ |
Use the checkout endpoint unless you sell on Android or need to show your own native checkout. Both need the webhook handler: completing a checkout never grants access by itself. Access comes from the events your server sends.
For the app side of each, see Custom Store Products for iOS and PurchaseController for Android.
Get started
1. Quickstart
Create a store and a product, then grant a test user access with one request. No server needed.
2. Example server
A complete server: the checkout endpoint and the webhook handler.
Checkout endpoint
The request Superwall sends, how to verify it, and what to answer.
Events
Every event type and field, and the rules for retries and refunds.
Paddle
A step-by-step guide for Paddle Billing, with a reference server.
iOS setup
What your iOS app needs for each checkout option.
How is this guide?