gradient blur

Setting up app to web checkout from your iOS paywalls

See how easy it is to offer Stripe checkout from your existing paywalls

app2web_tutorial

Jordan Morgan

Developer Advocate

Published

As the landscape continues to evolve with the Apple v Epic ruling, Superwall continues to respond and offer you the best tools for monetization. We recently announced that Stripe checkout for iOS apps is here, and in this post — I'll walk you through setup.

Get setup with web checkout

Your first stop is to get setup with Superwall's web checkout feature. In addition to getting you ready for app to web flows, this has another benefit, too. Once you've done this, you can present web paywalls. This means you can convert users on your website, via email campaigns and more — all by sending them a web checkout link. This is an important part to drive home, because with all of the recent industry news, it's easy to forget. Superwall offers app to web flows (which is our focus here) and web to app.

Continuing on, the first three steps here are what you'll have to complete to continue:

gradient blur
dashboard-header

The critical steps to complete web checkout setup

Once you've done that, you should have a Stripe app to accompany your existing iOS app within Superwall. It'll look something like this in your project:

gradient blur
dashboard-header

An iOS app and Stripe app in a project.

Notice how there is both a Stripe and iOS app in the screenshot above. That's where you need to be! If you follow those three steps, you will have:

  1. Created a Stripe app in Superwall.

  2. Configured it with your iOS app.

  3. And, will have created Stripe products to offer.

Add a Stripe product to an iOS paywall

Now, you'll either use an existing iOS paywall or create a new one. Then, we'll choose a Stripe product from the product picker and add it to our paywall:

gradient blur
dashboard-header

Selecting a Stripe product to use on your iOS paywall.

You can easily differentiate between App Store products and Stripe ones in the product selector:

  1. App Store products are prepended with "app-store"

  2. And, Stripe ones will have "stripe-".

Another quick note on Stripe products. Sandbox products include "test:" after the price, whereas production products will say "live:" — you can see the difference here:

gradient blur
dashboard-header

The top product is a production Stripe product, whereas the selected one is a sandbox product.

After that, you're all set. Optionally, you can choose one of two flows for how this will work. Under "Web Checkout Location", you can choose either:

  1. In App Browser: Here, Stripe checkout opens in a Safari view within your app. It dismisses (along with your paywall) once a transaction completes.

  2. External: It's the same flow, only Superwall opens up the Safari app to complete the transaction. Once it finishes, you're taken back into the app. If you've setup universal links, no redirect page will be shown — your app will open right back up immediately.

Create a campaign for U.S. customers

Since the ruling only applies to customers in the United States, you can easily create a campaign filter that will match to those customers. Just create a filter where deviceLocale matches en_US, like this:

gradient blur
dashboard-header

An audience matching US customers.

Here, I'm using two paywalls. The normal, in-app purchase based paywall and the same paywall which uses Stripe checkout. This will produce quality data, and it's where we recommend you start before testing app to web flows in more places.

Also notice on the left-hand side how I have another audience filter below the web checkout one (called "All Users"). This means that if someone doesn't match my filter for U.S. customers, Superwall will check if they match the next audience below it. In that one, there are no filters — so it acts as a "catch all" audience, ensuring one of my paywalls from that audience filter still shows up.

Test it out

First off, make sure you're on iOS SDK version 4.3.4 or above. Then, as we showed earlier, add a sandbox product to your iOS paywall. From there, it's just a matter of running the app either in the simulator, or on device, and going through the checkout flow. A quick tip — Stripe's test card number is 4242 4242 4242 4242, so be sure to use that during testing. If you get stuck along the way, check out this doc.

In your iOS app, a few things will happen once a transaction completes:

  1. In your Superwall delegate, two functions are invoked: willRedeemLink and didRedeemLink(result:). Those are two great places to update your interface if you need too.

  2. Then, Superwall's entitlements will be updated via func subscriptionStatusDidChange(from oldValue: SubscriptionStatus, to newValue: SubscriptionStatus). They are now a paying customer.

Here's an example of how this might look:

@Observable
class SWDelegate: SuperwallDelegate {
    enum WebCheckoutStatus: Int, Identifiable {
        case redeeming, redeemed, failed, idle
        var id: Self { self }
    }

    private(set) var isPro: Bool = false

    func subscriptionStatusDidChange(from oldValue: SubscriptionStatus, to newValue: SubscriptionStatus) {
        isPro = newValue.isActive
    }

    // Web Checkout

    func willRedeemLink() {
        withAnimation {
            self.webCheckoutStatus = .redeeming
        }
    }

    func didRedeemLink(result: RedemptionResult) {
        switch result {
        case .success(_, _):
            withAnimation { self.webCheckoutStatus = .redeemed }
        case .error(let code, let error):
            print("Error: \(code) - \(error.message)")
        case .expiredCode(let code, _):
            print("Expired code \(code)")
        case .invalidCode(let code):
            print("Invalid code: \(code)")
        case .expiredSubscription(let code, _):
            print("Expired \(code)")
        }
    }
}

import SuperwallKit

@main
struct Caffeine_PalApp: App {
    @State private var delegate: SWDelegate = .init()

    init() {
        Superwall.configure(apiKey: "YOUR_API_KEY")
        Superwall.shared.delegate = delegate
    }

    var body: some Scene {
        WindowGroup {
           YourView()
        }
    }
}

swift

ungroup Copy

And that's it — now you can offer app to web checkout:

gradient blur
dashboard-header

Stripe Checkout

Wrapping up

Offering app to web flows in Superwall with Stripe checkout is basically a matter of simply adding a Stripe product to an iOS paywall! At Superwall, we want flows like this to be as easy as possible to setup from the developer's perspective, and seamless and understandable from a user perspective. We think this flow strikes a wonderful balance on both ends.

Remember, though, you need to test, test, test! Our resident growth expert Nick recommends simply testing your existing paywall with a web checkout variant. See how that performs, and then you can make more decisions from there. Happy monetizing!

gradient blur

Get a demo

We'd love to show you Superwall

Want to learn more?

  1. Fill out this tiny form →
  2. We'll prepare you a custom demo
  3. Walk you through Superwall
  4. Follow up and answer questions

Key features

  • Drag 'n Drop Paywalls
  • 200+ Custom Templates
  • Unlimited A/B tests
  • Surveys, Charts & More

Select one...

Select one...

By proceeding you consent to receiving emails and our terms.

gradient blur
shape-starshape-starshape-starshape-starshape-star

Customer Stories

Our customers refer to Superwall as their most impactful monetization tool. In their own words:

dashboard-header

Thanks to Superwall, we were able to 2x our iOS app profitability in just six months. It has greatly assisted our growth team in achieving exceptional results by facilitating high-frequency experimentation.

Mojo launch
Bernard Bontemps, Head of Growth
dashboard-header

Really excited about the progress we made recently on paywalls with Superwall. We got more than 50% increase in conversion for upsell screens. This is crazy.

Photoroom launch
Matthieu Rouif, CEO
dashboard-header

Superwall has completely changed the game for us. We’re able to run experiments 10x faster and unlock the ideal monetization model for our users.

RapChat launch
Seth Miller, CEO
dashboard-header

Superwall made testing paywalls so much faster. Instead of releasing a new version of the app each time, we were able to iterate on the winning paywalls much quicker. Thanks to that it increased our revenue per customer by 40%.

Teleprompter launch
Mate Kovacs, Indie Dev
dashboard-header

Superwall lets us move 10x faster on our monetization strategy. We can build and launch multiple paywall iterations without the need for client releases or complicated deploys. Our product iteration loop is days, rather than months because of Superwall.

Citizen launch
Jon Rhome, Head of Product
dashboard-header

Superwall enables Bickster’s marketing team to design and optimize app paywalls, freeing up engineering to concentrate on innovation. As a result, Superwall helped accelerate our install-to-subscription rates, lower engineering expenses, and cured our team’s frustration with the (once) time-consuming process of iterating on paywalls.

Bickster launch
Chris Bick, CEO
dashboard-header

Superwall has revolutionized our monetization strategy. It’s an essential tool that allows rapid paywall testing and optimization, leading to remarkable improvements in our subscription conversions and revenue generation. Can’t recommend Superwall enough for any app-based business.

Coinstats launch
Vahe Baghdasaryan, Sr. Growth
dashboard-header

Superwall has played an integral part of improving our subscription business. Compared to other providers, Superwall has proven superior in facilitating high-frequency experimentation allowing us to achieve an ideal monetization model, resulting in a significant increase in revenue.

Hornet launch
Nils Breitmar, Head of Growth
dashboard-header

Superwall is the single greatest tool we’ve used to help us increase our revenue. Our material wins from Superwall are greater than any tool we’ve worked with to date!

Pixite launch
Jordan Gaphni, Head of Growth
dashboard-header

Shout out to Superwall for helping us dial in our paywall — made a big impact on monetization, increasing revenue by more than 50% 💸

Polycam launch
Chris Heinrich, CEO
dashboard-header

Superwall increases revenue. Full stop. Being able to test paywalls on the fly and quickly analyze results has drastically increased our revenue and improved our monetization of users. Highly recommend this tool!

Hashtag Expert launch
Zach Shakked, Founder
Start for FREE

Simple win-win pricing

Interest aligned pricing. Contact us for a discount.

dashboard-header
Indie
Free
Up to 250 conversions per month
Access to every standard feature
Try it free

Standard Features

  • 250 Conversions a Month
  • Drag 'n Drop Paywall Editor
  • 200+ Paywall Templates
  • Unlimited A/B tests
  • Charts & Analytics
dashboard-header
Startup
$0.20/conversion
Pay as you go pricing that scales
Up to 5,000 conversions a month
Sign Up

Standard Features

  • 5,000 Conversions a Month
  • Drag 'n Drop Paywall Editor
  • 200+ Paywall Templates
  • Unlimited A/B tests
  • Charts & Analytics
dashboard-header
Growth
Flat-Rate
100% custom flat-rate pricing
Terms that make sense for you
Get Pricing

Premium Features

  • Unlimited Conversions
  • We Build Your Paywalls
  • 4 Weekly Growth Meetings
  • Dedicated Slack Channel
  • Custom Integrations