# App2Web

Link U.S. customers from iOS paywalls to Safari for Stripe checkout.

For customers on the United States App Store storefront, you can add calls to action in your iOS paywalls that open Stripe checkout outside of your app in Safari or the user's default browser.

Do not present Stripe Checkout inside your iOS app using an in-app browser, `SFSafariViewController`, `WKWebView`, or another embedded web view. For external purchase links, the checkout flow should leave the app and open in the external browser.

> **Note**

Apple's App Review Guidelines allow United States storefront apps to include buttons, external links, or calls to action for purchase methods other than in-app purchase. Review [Guideline 3.1.1(a)](https://developer.apple.com/app-store/review/guidelines/#business) before submitting your app.



<img src="__img0" />

## Configure Web Checkout

First, follow the [web checkout setup guide](/docs/web-checkout#getting-setup) to create a Stripe app and configure your web checkout settings. Specifically, you'll need to complete the first three steps. This includes installing the [Superwall Stripe app](https://marketplace.stripe.com/apps/superwall), setting up your app's settings, and adding your Superwall web paywall domain to Stripe if you want Apple Pay to appear in checkout.

## Add a Stripe product to an iOS paywall

Select a paywall and add a Stripe product to it. This lets users start an external browser checkout flow from the paywall. Stripe products are prepended with "stripe" in the product selector:<img src="__img1" />

## Create a campaign for U.S. customers

Since the policy applies to customers on the United States storefront, create a campaign filter that matches those customers. Use `storeFrontCountryCode` equals `USA`, like this:> **Note**

For App Review, explain that U.S. storefront customers can tap a paywall call to action that opens an external browser for Stripe checkout. Non-U.S. storefront customers should continue using Apple in-app purchase unless another regional policy applies.

<img src="__img2" />

## Respond to Checkout

From there, the flow works the same way as web checkout. Once the payment succeeds in the external browser, the [Superwall delegate](/docs/sdk/guides/using-superwall-delegate) functions `willRedeemLink()` and `didRedeemLink(result:)` will be called when the user returns through the deep link. You can use these functions to show any specific UI as described in our [Post-Checkout Redirecting](/docs/sdk/guides/web-checkout/post-checkout-redirecting) docs.Additionally, entitlement and subscription status will update automatically. For lifetime one-time products, the linked entitlement becomes active without an expiration. For consumables, inspect `CustomerInfo.nonSubscriptions` and grant the purchased quantity in your own system. If you're using a `PurchaseController`, refer to [the docs here](/docs/sdk/guides/web-checkout/linking-membership-to-iOS-app#using-a-purchasecontroller).



If you need to test checkout, learn how [here](/docs/web-checkout/web-checkout-testing-purchases).

Apple Pay [#apple-pay]

App2Web checkout opens from your iOS paywall into the Superwall-hosted Stripe checkout page. If you want Apple Pay to appear there, add your `*.superwall.app` web paywall domain to Stripe's payment method domains before testing or launching.

See [Apple Pay domain setup](/docs/web-checkout/web-checkout-configuring-stripe-keys-and-settings#apple-pay-domain-setup) for the full setup steps.

Localized checkout prices [#localized-checkout-prices]

App2Web supports [Stripe Adaptive Pricing](/docs/web-checkout/web-checkout-adaptive-pricing) for the external Stripe checkout step. Enable Adaptive Pricing in Stripe, then users who leave the app for checkout can see localized currency based on their location.

Keep the campaign filter aligned with Apple's external purchase rules. Adaptive Pricing changes the currency shown during Stripe checkout; it does not change which users should be eligible to see an external purchase link in your app.

Prefill customer information [#prefill-customer-information]

When starting checkout from an iOS paywall (App2Web), you can prefill customer information in two ways:

Email [#email]

Stripe will automatically prefill the email field if you set the user's `email` as a [User Attribute](/docs/sdk/quickstart/setting-user-properties) in your app before initiating checkout.

Stripe Customer ID [#stripe-customer-id]

If you already have a Stripe customer ID for your user, you can set it as the `stripe_customer_id` user attribute. This will associate the checkout session with the existing Stripe customer, automatically prefilling their saved information and payment methods:

```swift
Superwall.shared.setUserAttributes([
    "email": user.email,
    "stripe_customer_id": user.stripeCustomerId
])
```

> **Note**

When both `stripe_customer_id` and `email` are provided, the Stripe customer ID takes precedence. The checkout session will use the existing customer's information rather than creating a new customer.