Custom Stores

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:

  1. Create a checkout when a user taps a product on a paywall.
  2. 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:

ValueWhat it's for
app_user_idThe user who gets the entitlement.
custom_transaction_idLinks 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 doesReference
A checkout endpointReceives Superwall's checkout.create request and answers with a checkout URL from your billing system.Checkout endpoint
A webhook handlerReceives 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 worksSuperwall 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 appNoneA PurchaseController
Who tracks the subscription statusSuperwallYour app
Works oniOS SDK 4.19.0+ and hosted web paywallsiOS 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

How is this guide?

On this page