---
id: "tools/paywalls/testing-paywalls"
title: "Testing Paywalls"
description: "This page refers to testing paywalls to ensure they're working as expected before releasing them to production. If you're looking to learn about A/B testing paywalls, see Experiments."
permalink: "/docs/tools/paywalls/testing-paywalls"
slug: "testing-paywalls"
version: "current"
original_source: "docs/tools/paywalls/testing-paywalls.mdx"
---

> **AI agents:** This is the Markdown version of a RevenueCat documentation page. For the complete documentation index, see [llms.txt](https://www.revenuecat.com/docs/llms.txt).

:::info[A/B Testing]
This page refers to testing paywalls to ensure they're working as expected before releasing them to production. If you're looking to learn about A/B testing paywalls, see [Experiments](https://www.revenuecat.com/docs/tools/experiments-v1).
:::

There are several ways to test your paywalls before releasing them to production. Here are a few options to consider:

## 1. Preview in the RevenueCat app

RevenueCat Mobile, the RevenueCat app for [iOS](https://apps.apple.com/us/app/revenuecat-mobile/id6504531798) and [Android](https://play.google.com/store/apps/details?id=com.revenuecat.mobile), previews your paywalls on a real device without building your app. It previews both published and draft paywalls, so you can check a paywall before you publish it. Purchase and restore buttons are simulated: tapping them shows a dialog, and nothing is purchased.

### Scan the QR code from the paywall editor

The quickest way to open a preview is from the paywall editor in the dashboard:

1. Open your paywall in the paywall editor.
2. Click **Preview in app**. If one of your project's mobile apps has a [custom URL scheme](#2-preview-in-your-app), a menu opens: select **RevenueCat app**.
3. Scan the QR code with your phone's camera.

The QR code links to the version of the paywall you're viewing in the editor, either the draft or the published version. It also carries the offer you're previewing in the editor, such as an introductory offer, and opens the full flow of a [multi-step paywall](https://www.revenuecat.com/docs/tools/paywalls/creating-paywalls#multi-step-paywalls).

If RevenueCat Mobile is installed and you're signed in, the preview opens directly. If you aren't signed in yet, the preview opens after you sign in. On a device without the app, the link opens a page with download links for iOS and Android.

### Browse your paywalls in the app

To find a paywall in the app, tap **Projects** in the bottom navigation, select your project, and tap **Paywalls**. The list shows your published and inactive paywalls. Draft paywalls carry a **Draft** badge. Tap a paywall to preview it, or long-press it to pick a presentation style for that preview.

![Paywalls in the RevenueCat app](https://www.revenuecat.com/docs_images/paywalls/paywalls-rc-app.jpeg)

:::info Previewing multi-step paywalls
If your paywall is a [multi-step paywall](https://www.revenuecat.com/docs/tools/paywalls/creating-paywalls#multi-step-paywalls), the RevenueCat app renders the full flow so you can step through each screen and verify your in-paywall navigation before publishing. Make sure your test device is running an app version that supports multi-step paywalls.
:::

Legacy paywalls created with the previous paywall editor aren't available for preview in the Android app.

### Configure the preview

Tap the settings button in the paywalls list to set defaults for all previews:

- **Presentation mode**: Show the paywall as a modal sheet or full screen. On iOS, you can also present it with a navigation push.
- **Color scheme**: Follow the device setting, or force light or dark mode.
- **Offer**: Preview the paywall as a customer with no offer, an introductory offer, or a promotional offer. The preview uses a sample free trial for introductory offers. Promotional offers are currently only simulated on iOS, for packages with an App Store promotional offer.
- **Custom variables**: Set the values the preview uses for your paywall's [custom variables](https://www.revenuecat.com/docs/tools/paywalls/creating-paywalls/variables#custom-variables).

![Paywalls settings in the RevenueCat app](https://www.revenuecat.com/docs_images/paywalls/paywalls-rc-app-settings.jpeg)

While a preview is open, tap **Preview configuration** to change the offer, the language, or the custom variable values for that preview only. On Android, the button appears only when the paywall has more than one language or the project has custom variables.

:::warning[Variable preview values]
Please note that the RevenueCat app uses preview values for any variables your paywall uses, so the prices displayed will not reflect the actual prices of your products. They're only intended to reflect how your paywall will look when real values are inserted in your app.
:::

## 2. Preview in your app

With the latest version of the RevenueCat SDK, you can preview published paywalls in your own app.

:::info Availability
This feature is currently available on the native iOS and Android SDKs starting from version 5.80.0 on iOS and 10.11.0 on Android.
:::

### 1. Copy the custom URL scheme from the RevenueCat Dashboard

You can find this in the RevenueCat dashboard inside your app's settings, under "Custom URL Scheme". It is unique to your app.

### 2. Allow your app to respond to links with your custom scheme

Register the custom URL scheme to your mobile app, [just like you would for Redemption Links](https://www.revenuecat.com/docs/web/redemption-links#2-allow-your-app-to-respond-to-links-with-your-custom-scheme).

### 3. Handle the link in your app

Our SDKs provide APIs to preview the paywall directly in your app.

:::warning Handling paywall links
Please note that it is up to you to decide when your app will accept a link to preview a paywall. If you only want this to work for internal testers, consider adding a condition (such as `#if DEBUG`) to your code before invoking the SDK.
:::

#### iOS

In SwiftUI, you can add an `onOpenURL` handler to your scene's content view to open handle incoming URLs. If you're building a UIKit-based app, handle the URL in your `UISceneDelegate` instance.

**SwiftUI**

```swift
WindowGroup {
    AppContentView()
        .onOpenURL { url in
            if Purchases.shared.presentPaywall(from: url) {
                // A paywall will be presented; no further action is necessary
                return
            }
            // handle other URL logic for your app
        }
}
```

**UIKit**

```swift
func scene(_ scene: UIScene,
           willConnectTo session: UISceneSession,
           options connectionOptions: UIScene.ConnectionOptions) {

    guard let url = connectionOptions.urlContexts.first?.url {
        return
    }

    if Purchases.shared.presentPaywall(from: url, scene: scene as? UIWindowScene) {
        // A paywall will be presented from this scene; no further action is necessary
        return
    }

    // handle other URL logic for your app
}
```

#### Android

In Android, pass the intent to the SDK from your Activity. If the SDK recognizes the intent, it will automatically present the paywall:

**Android**

```kotlin
class MainActivity : Activity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        handlePaywallPreview(intent)
    }

    // This allows your app to respond to the intent
	// if setting certain launch modes in the AndroidManifest.xml.
    override fun onNewIntent(intent: Intent) {
        super.onNewIntent(intent)
        handlePaywallPreview(intent)
    }

    private fun handlePaywallPreview(intent: Intent) {
        Purchases.sharedInstance.presentPaywall(intent, this)
    }
}
```

#### Hybrid SDK Support

Support for previewing paywalls in the hybrid SDKs is coming soon.

## 3. Override a Customer's Default Offering

The simplest way to test a paywall is by overriding an individual customer's offering through their Customer Profile in the RevenueCat dashboard:

1. Navigate to the Customer Profile for your test device
2. In the current offering section, click "Edit"
3. Select the offering containing your test paywall
4. Launch your app and navigate to the paywall to see the paywall of your overridden offering

![Override current offering](https://www.revenuecat.com/docs_images/paywalls/paywalls-override-current-offering.png)

## 4. Create a Targeting Rule for an internal app version

You can create a Targeting Rule to show specific paywalls to internal builds of your app:

1. Create a new [Targeting Rule](https://www.revenuecat.com/docs/tools/targeting#creating-targeting-rules)
2. In the **Audience** section, set **Audience source** to **Custom filters** and add the filters **Last seen app** is your app and **App version** is X.Y.Z, using your internal build's version string
3. Set the Offering to the one containing your test paywall
4. Install the internal build on your test device

This approach is useful for testing paywalls across your team before releasing to production.

![Targeting rule](https://www.revenuecat.com/docs_images/paywalls/paywalls-targeting-rule.png)

## 5. Testing through Xcode and Android Studio

### Xcode

When testing through Xcode, you can:

1. Use the iOS Simulator to test different device sizes and orientations
2. Test different locales to verify translations
3. Test different subscription states using StoreKit Configuration files
4. Test on iPhone Duo with the iPhone Duo simulator, which requires Xcode 27.1 and an iOS 27.1 simulator runtime

To use the iPhone Duo simulator, choose iPhone Duo in Device Hub. Then use the simulator controls to open, close, rotate, and partially fold the device while your paywall is open.

### Android Studio

When testing through Android Studio, you can:

1. Use the Android Emulator to test different device sizes and screen densities
2. Test different locales and languages to verify translations
3. Test different subscription states using Google Play's license testing
4. Preview layouts directly in Android Studio's Layout Editor

## Best Practices

- Test your paywall across different device sizes to ensure proper layout, including foldables such as iPhone Duo (see [Paywalls on iPhone Duo](https://www.revenuecat.com/docs/tools/paywalls/displaying-paywalls#paywalls-on-iphone-duo))
- Verify all purchase flows work as expected (in-app purchases, web purchases, etc.)
- Test localization if your app supports multiple languages
- Verify that variables are properly populated with product information
- Test both light and dark mode if your paywall supports them
- For multi-step paywalls, go through every step and confirm each navigation button leads to the correct step, and that the final step can complete a purchase
