Overview: a paywall test you run by asking
0:03:00Every paywall change is a guess until real customers respond to it. RevenueCat Experiments take the guessing out: they show two to four offerings to randomly assigned customers and compare what happens across the whole subscription lifecycle, from the first purchase to revenue months later.
With the RevenueCat AI Toolkit installed, your AI agent can do most of the setup for you. You describe the test in plain words, and three skills in the toolkit take it from there:
| Skill | What it does in this codelab |
|---|---|
revenuecat-experiments | Prepares the control and treatment offerings, creates the experiment as a draft, and starts, pauses, resumes, or stops it. It publishes the treatment paywall so it can be served, and tells the agent to start an experiment only after your explicit go-ahead. |
revenuecat-paywall-design | Makes the one change to the treatment paywall and renders it to check the result. |
revenuecat-experiment-analysis | Reads the experiment setup, your overall charts, and the results, then reports back with links to the dashboard. |
You usually do not need to name the skills: the agent picks the matching one. If it does not, name the skill in your message.
The test loop. The agent does the busy work; starting the test and rolling out the winner are your decisions.
What you will do
- Check the requirements, and learn why a test run on your own device shows no revenue.
- Pick one change worth testing.
- Have the agent build a treatment variant from the paywall your customers see today.
- Preview the variant, then create the experiment as a draft.
- Start it, read the results, and roll out the winner without losing it when the test stops.
The examples use a made-up dog training app, called Example Pet App here. Its current offering is
default, and the test changes one thing: the paywall's purchase button label, from "Continue" to
"Unlock all training plans". The treatment lives in a copied offering called cta_unlock.
Before you start
0:05:00Four things need to be true before the agent can run a test that means anything.
1. A Pro or Enterprise plan
RevenueCat's docs: "Experiments is available to Pro & Enterprise customers."
2. The AI Toolkit, version 2.3.1 or later
The experiment skills arrived in toolkit 2.2.0. Version 2.3.1 corrected two things this codelab depends on: the treatment is copied from the published paywall instead of unfinished draft edits, and the analysis looks at the published paywalls and reports "Paywall viewers". This codelab was written against 2.6.0, the latest release. The version number alone does not tell you which skill text you have: at the time of writing (December 2026), agents that install from the repository's main branch, such as Claude Code and Codex, report 2.6.0 but get a newer experiments skill than the 2.6.0 release, which Gemini CLI installs. The steps here work with both. To install the toolkit or update it, follow the AI Toolkit codelab, and make sure the agent is signed in to your RevenueCat account.
3. A RevenueCat Paywall on your current offering
The agent changes paywalls built with RevenueCat Paywalls. If your current offering has no RevenueCat Paywall attached, for example because your app draws its own paywall in code, the agent cannot change it, and the change has to be made in your app. A legacy RevenueCat paywall shows up to the agent as no paywall, so it cannot edit that either. Depending on the toolkit build, the agent may ask whether your app draws its own paywall or uses a legacy one, or assume the app draws it in code. If yours is a legacy RevenueCat paywall, say so: the agent can build a brand-new paywall for the treatment, which makes the test compare two whole designs. RevenueCat recommends at least iOS 5.27.1, Android 8.19.2, React Native 8.11.3, or Flutter 8.10.1 for these paywalls (see the Paywalls docs), so check your app's SDK before you test a new paywall against a legacy one. To build a paywall the agent can edit, see the Paywalls V2 codelab.
4. An app that shows the current offering
This is the requirement that silently breaks the most tests. From
the docs: "Offering experiments require you to use Offerings and have a dynamic paywall in your
app that displays the current Offering for a given customer." RevenueCat changes what current returns
for each enrolled customer, on the server. If your code asks for an offering by its identifier instead, every
customer gets that one offering and the variants never show.
// Works with Experiments: "current" is decided per customer.
Purchases.shared.getOfferings { offerings, error in
if let offering = offerings?.current {
// show the paywall for this offering
}
}
// Bypasses Experiments: everyone gets this one offering.
Purchases.shared.getOfferings { offerings, error in
if let offering = offerings?.offering(identifier: "default") {
// the variants never show here
}
}
// Works with Experiments
Purchases.sharedInstance.getOfferingsWith({ error ->
// handle the error
}) { offerings ->
offerings.current?.let { offering ->
// show the paywall for this offering
}
}
// Bypasses Experiments: offerings["default"] returns the
// same offering for every customer.
If you present RevenueCat Paywalls with RevenueCatUI, the defaults already do the right thing: on iOS,
PaywallView() with no offering argument loads the current offering, and on Android the paywall uses
the current offering unless you call setOffering on PaywallOptions.Builder. Apps that use
Placements and call currentOffering(forPlacement:) work too; step 6 covers what
to check for them.
SDK versions
Enrolling new customers only, the default, "doesn't require any minimum SDK version". The docs recommend at least iOS 3.5.0, Android 3.2.0, Flutter 1.2.0, React Native 3.3.0, and Unity 2.0.0. Enrolling new and existing customers needs these minimum versions, and customers on older versions are not enrolled:
| iOS | Android | Flutter | React Native | KMP | Capacitor | Unity | Web (JS) |
|---|---|---|---|---|---|---|---|
| 5.66.0 | 9.26.1 | 9.15.0 | 9.14.0 | 2.9.0 | 12.3.0 | 8.8.0 | 1.55.0 |
Set your expectations: results need real customers
Traffic matters too. The paywall design skill puts it plainly: "At thousands of new users per day, A/B testing with RevenueCat Experiments is the best validation. At hundreds per day, tests can still be directional. Below that, ship and observe conversion over time."
Choose one change to test
0:04:00A test tells you whether one change helped. The experiments skill is strict about it: "Keep the variants identical except for the one aspect under test, otherwise results cannot be attributed to the change." The docs agree: "Test only one variable at a time."
Illustration: the control and the treatment are identical except for the button label. The app, its name, and its prices are made up.
Ideas from the paywall design skill
The revenuecat-paywall-design skill audits paywalls in order of impact, and its findings make good
single-variable tests:
| Test | Why, in the skill's words |
|---|---|
| A specific button label instead of "Continue" or "Subscribe" | The CTA is the "single highest-impact element", and generic copy "tells users what to DO, not what they GET". |
| Trial wording on the button, if a free trial exists | "Mention the trial in the CTA." Trial info "buried in small print" is "a conversion miss". |
| A button color nothing else on the page uses | "A CTA that blends in with the page accent kills conversion." |
| A clearly recommended plan | "Equal-weight cards cause decision paralysis." |
| One concrete savings signal on the recommended plan | "Use ONE clear anchoring signal", such as a per-period price comparison. |
| A headline about the customer's outcome | Headlines that describe the product should "address the user". |
Prefer a change big enough to matter. The docs note that "bigger changes will validate faster", while small differences "will often show ambiguous results". You can test up to four variants at once, as long as they differ in the same variable, for example three different button labels. "More variants need more customers to reach significance."
Changes that need more than a paywall edit
- Price, free trial, or introductory offer. These live on store products, so the treatment needs
different products. The agent checks for existing products, creates missing ones with the
revenuecat-store-stateskill, and swaps them into the copied offering. That skill shows you the planned store changes and waits for your explicit confirmation before it applies them. - A completely different design. The agent can generate a new paywall for the treatment. The test then compares two whole designs, so a win tells you which paywall is better, not which detail made the difference.
Build the treatment variant
0:06:00Ask for the variant in one message. Name the control, the new offering's identifier, the change, and what must stay the same. Asking the agent to hold off on the experiment keeps this step to the variant, so you create the draft yourself in step 6:
I want to A/B test my paywall. Use the current offering as the control. For the treatment, copy it into a new offering with the identifier cta_unlock and change only the purchase button text from "Continue" to "Unlock all training plans". Don't change anything else, and don't create the experiment yet.
Here is what the experiments and paywall design skills tell the agent to do:
- Use your current offering as the control, as is. The agent finds it with
list-offerings. When the control is "what production does today", the skill says to use the current offering directly and not to copy it. - Reuse before copying. If an existing offering already matches the treatment, the agent uses it.
- Copy the control.
duplicate-offeringcreates a new offering with the same packages and products, plus a copy of the paywall as an unpublished draft. The agent passessource_paywall_version: published, so the copy starts from the paywall customers see now, not from edits you have not published yet. Only a paywall that was never published is copied from its draft. - Make the one change.
edit-paywall-airuns in the background. The agent asks for "only the minimum changes required" (the edit tool also expects context about your app with every request) and checks on the task withget-paywall-ai-taskabout every 10 to 15 seconds. Edits that generate images can take several minutes. The agent does not resend the same edit unless the task failed. - Look at the result. The skill tells the agent to verify the edit by looking at the paywall, which step 5 covers.
- Publish the treatment paywall with
publish-paywall.
Illustration: the tool calls behind one request. Wording and offering names are invented; the tool names are real.
Other ways to make a variant
| Path | When to use it | What the agent does |
|---|---|---|
| Copy the offering, edit its paywall | One change to today's paywall (the path above) | duplicate-offering,
then edit-paywall-ai |
| Copy a specific paywall | You start from a paywall, for example "copy this paywall" | duplicate-paywall
from the published version when it has one, optionally with its own offering. Multipage paywalls cannot be duplicated. |
| A brand-new paywall | You want to test a different design | Copies the offering without its paywall, then
create-paywall-ai. It checks on the task about every 30 seconds, and image-heavy designs can take 5 to
10 minutes. |
| Different products | Price, trial, or intro offer tests | Store products through
revenuecat-store-state, then swaps them into the copied packages |
You should see a new offering, cta_unlock in this example, next to your current one,
with a published paywall. Your current offering and its paywall are unchanged, and the new offering is not current.
Preview before you launch
0:03:00
The agent checks its own work with render-paywall-screenshot, a read-only tool that draws a static
picture of one paywall. It is worth knowing what that picture can and cannot tell you:
- Draft or published. The tool renders the draft by default, or the published version on request. If the requested version is empty, it falls back to the other one.
- Light or dark, with or without the offer. It can render the dark color scheme and the introductory offer screen.
- Prices may be samples. It shows real USD prices when they are available, and otherwise sample values. Offer text always uses sample values. Do not read your prices off a render.
- Above the fold, one paywall. It does not cover scrolling content, and it cannot verify settings
such as which package is selected by default. For those settings, the agent reads the paywall configuration with
get-paywall. Neither tool covers multipage paywalls.
The paywall design skill treats the render as the agent's own check, not something to show you. To look for yourself, ask for the dashboard links. Each render result includes a link to that paywall in the paywall editor:
Compare the published control paywall with the treatment paywall. Tell me everything that differs, and give me the dashboard links to both.
You should see the agent report a single difference, the button label, plus two links that open
each paywall in the dashboard. If it finds anything else, ask it to fix the treatment before you continue. If your
paywall is translated, ask the agent to check the button text in every language with get-paywall, so the
treatment differs in every locale.
Create the experiment as a draft
0:05:00A draft enrolls nobody. "Creating never starts the experiment", and the agent can adjust a draft with
update-experiment, so take the time to get it right.
Create the experiment as a draft named "Paywall CTA copy". The control is the current offering and the treatment is cta_unlock. It's a paywall design test. Enroll 50% of new customers. Put my hypothesis in the notes: a button that says what you get converts more paywall viewers than "Continue". Ask me before starting it.
The agent fills in the create-experiment call like this:
| Setting | What to know |
|---|---|
| Variants | Variant A is the control. Add B, and optionally C and D, for two to four variants in total. |
| Experiment type | paywall_design. Its recommended primary metric is Initial conversion rate,
with Realized LTV per customer and Paywall viewers as secondary metrics. |
| Enrollment type | New customers only, unless you explicitly ask to include existing customers, which needs the SDK versions from step 2. |
| Enrollment percentage | The share of matching customers to enroll, split evenly between the variants: 50% in an A/B test puts 25% in each. The docs set a minimum of 10%. The agent's tool schema accepts 1 to 100, so do not ask for less than 10%. |
| Audience | Everyone, or a saved Audience. Custom filters built just for one experiment are available in the dashboard only. |
| Notes | Your hypothesis, for whoever reads the results later. |
Illustration: the agent summarizes the draft and asks before it starts anything. Names and settings are examples.
Targeting a segment
To test on a segment, such as one country, ask the agent to look at it first. It uses a read-only preview to see who matches, and offers to save the segment as an Audience, which it creates only if you accept. A new-customers-only test checks eligibility once, "the first time they open your app", so filters on data a new customer does not have yet, such as purchase history or custom attributes you set later, will not match.
If your app uses placements
An experiment can serve a different offering at each placement. The docs advise that you "specify your desired Offering for each Placement that your app uses, even if the Offering for a given Placement should be the same on both the Control and Treatment." The Placements docs add that the identifier your app passes "must exactly match the value set in the Dashboard". When it does not, the app gets the offering set "for all other cases" instead, so a typo can go unnoticed. Name your placements in the request:
My app uses these placements: onboarding_end, feature_gate. Look up which offering my Targeting rules serve at each placement today. In both variants, serve that same offering at every placement and for all other cases, except at onboarding_end in the treatment, where you serve cta_unlock.
This assumes cta_unlock is a copy of the offering onboarding_end serves today. If that is not
your current offering, copy that offering in step 4 instead.
How long will it take?
Open the draft in the dashboard before you start it. When the primary metric is Initial conversion rate, Trial conversion rate, or Conversion to paying, RevenueCat estimates the customers each variant needs and the expected duration, from your recent baseline conversion, the smallest lift you want to detect, and the chance to win you want. The agent can pass the same inputs when it creates the experiment. New experiments start at the bottom of the enrollment priority list, so other running experiments can make it take longer.
Get the draft right now
The docs lock most of the setup once the experiment starts, and the agent's tools only change the variants and audience of a draft:
| Change | Draft | After start |
|---|---|---|
| Name, notes, primary and secondary metrics | Yes | Yes |
| Enrollment percentage | Yes | Yes |
| Variants (offerings) | Yes | No |
| Audience and enrollment type | Yes | No |
Some experiments have iterations. For those, the dashboard can start a new iteration with different variants or a different audience. The agent cannot start one, and a new iteration's results start from zero and are not comparable with earlier iterations.
Start the experiment
0:03:00
Before starting, the experiments skill has the agent verify each variant: "treatment paywalls are published,
packages contain the intended products, and any new products are available on the stores." Then it waits for you.
Starting enrolls real customers, so the skill tells the agent to run start-experiment only after your
explicit confirmation. That is an instruction the agent follows, not a lock: ask for the draft and the start in
separate messages, say "ask me before starting" when you request the draft, and keep your agent's tool approval on
for start-experiment as a second check. When you are ready, give the go-ahead in words:
Yes, start the Paywall CTA copy experiment.
You should see the experiment's status change from draft to running.
What happens next
- New customers are enrolled "the moment they open the app for the first time". In a new and existing customers test, existing customers who qualify are enrolled when the SDK next requests offerings.
- Each enrolled customer's current offering becomes their variant's offering. Your app makes the same call as before, and no app release is needed.
- Everyone else is checked against the next experiment in priority order, then gets your Targeting rules or default offering.
- A customer is in at most one offering experiment. New experiments start at the bottom of the priority list, which you can reorder on the Experiments page in the dashboard.
Illustration: with 50% enrollment and all customers as the audience, half of the matching new customers are split between the two variants.
Pause or stop
Pausing stops new enrollment, keeps enrolled customers on their variant, and keeps collecting data. You can resume as many times as you like. Stopping is permanent: the experiment "can never be restarted". The experiments skill does not require the agent to ask again before it pauses or stops, so say "stop" only when you mean it, and "pause" when you might want to continue.
Read the results
0:05:00Ask in plain words:
How is the paywall CTA test doing?
The revenuecat-experiment-analysis skill runs six steps in order. It skips only the first one, when it
already knows which experiment you mean:
- Finds the experiment.
- Reads its setup, including the offerings, products, and paywalls, and renders each variant's published paywall, which is what customers were actually served.
- Pulls your overall revenue, conversion, and trial charts for the same period, for context.
- Fetches the experiment results.
- Interprets them. The skill's instruction is simply "Use your best judgment."
- Reports back with links to the relevant charts and dashboard pages.
Illustration: every number here is fictional. Chance to win only appears for the conversion-rate metrics.
What the results contain
The results come in four groups: Initial conversion, Paid customers, Revenue, and Proceeds. The ones to know first:
- Customers: everyone enrolled in each variant, including sandbox and TestFlight customers.
- Paywall viewers: customers with a production paywall view in each variant. The API calls this
metric "Exposed customers"; the analysis skill tells the agent to call it Paywall viewers. RevenueCat Paywalls track
views automatically, custom paywalls need
trackCustomPaywallImpression, and both need a supported SDK version: customers on older SDKs "can't report paywall views". - Initial conversion rate: the percent of enrolled customers who started a trial or paid.
- Conversion to paying: the percent of enrolled customers who made at least one payment.
- Realized LTV per customer: net revenue so far divided by customers. The docs say it "should frequently be your primary success metric".
Narrow the view with a follow-up:
Show the CTA test results for Paywall viewers only, for iOS and Android separately.
New-customers-only experiments show every enrolled customer by default, and new and existing customer experiments default to Paywall viewers in the dashboard. Customers who never saw a paywall can dilute the effect you are measuring.
Chance to win and credible intervals
Chance to win is "the probability that a treatment variant is performing better than the control". A 95% credible interval shows how far the variant likely moved the metric: entirely above 0% is green, entirely below is red, and straddling 0% is grey, meaning the direction is still unclear. Both exist only for three metrics: Initial conversion rate, Trial conversion rate, and Conversion to paying. Revenue metrics have neither.
How high is high enough? The analysis skill sets no fixed threshold: it tells the agent to "use your best judgment", and the decision to roll out is yours. The results docs offer a starting point: "Many developers consider 95% Chance to Win sufficient to declare a winner, but the right threshold depends on what you're testing and your risk tolerance."
Give it time
- "There's no time limit on tests." Think about the timescale that matters: the docs' example is a yearly plan that wins early on revenue while a monthly plan wins in the long run.
- Trials converted "will lag behind trials started due to the length of the trial offered."
- "'No result' from an experiment is still a result": the change probably was not big enough to matter.
Stop and roll out the winner
0:04:00
Illustration: the order matters. Roll out the winner first, then stop.
If the treatment won
cta_unlock wherever the treatment used it, at each placement and for all other cases, and leave every other placement as it is. Or use Review and mark as winner > Create targeting rule in the dashboard, which serves the winning offering, and its placements, to the experiment's audience and adds the rule at the top.Through the agent: if no active Targeting rule covers your customers, ask for both actions in one message, in this order:
Make cta_unlock the current offering, then stop the Paywall CTA copy experiment.
The agent calls update-offering with is_current: true, which "makes this the default
offering served to apps, replacing the previous current offering", and then stop-experiment.
Making an offering current is project-wide: every app in the project, existing customers, and customers outside the
experiment's audience get it, unless a Targeting rule matches them. If you tested on a segment, or on new customers
only, decide whether that is the rollout you want. A Targeting rule for the experiment's audience limits it to those
customers. Editing an existing rule reaches everyone that rule matches.
You should see cta_unlock listed as the current offering and the experiment status as
stopped.
In the dashboard: open the experiment's results, click Review and mark as winner, and pick a rollout option: Set as default offering, Create targeting rule to serve the winner to the experiment's audience, or Mark winner only. Marking the winner on the experiment's record is a dashboard action; the agent has no tool for it. Then check the experiment's status. If it is still running, it keeps enrolling new customers, and part of them still get the control: stop it, or pause it to keep enrolled customers on their variants while results mature.
create-targeting-rule starts inactive and goes to the bottom unless a position is given, so ask for an
active rule at the position you want.If the control won, or there is no clear winner
Stop the Paywall CTA copy experiment.
Enrolled customers go back to your Targeting rules or default offering, which still serve the control.
Not ready to stop?
Pause instead. Enrollment stops, enrolled customers stay on their variant, and data keeps coming in. You can stop later, once you have decided.
After the stop
- Results keep updating for 400 days, so Realized LTV can mature. Ask the agent about the experiment again later.
- Run the next test. The docs suggest "comparing the winning Offering against another similar Offering".
Troubleshooting
0:04:00| Symptom | Likely cause | Fix |
|---|---|---|
| You never see variant B on your own device | Your test customer existed before the experiment started, fell outside the enrollment percentage, or was assigned to the control | Expected. To view the treatment on a
device, set an Offering Override to cta_unlock on that customer in the dashboard (step 5). |
| Variant B customers get the control's paywall, so B never appears in production | The app asks for an offering by its identifier instead of the current offering | Fetch offerings.current, or the offering for a placement (step 2).
The docs call displaying the current offering "required to ensure customers are evenly split between variants". |
| The variant appears on one screen but not another | A placement identifier in the experiment does not exactly match the string the app passes | Make the identifiers match exactly. Ask the agent to list the experiment's placements and compare them with the strings in your code. |
| Customers are enrolled, but conversions and revenue are zero | Sandbox and Test Store purchases are excluded from results | Expected while testing. Results need real customers on your production app. |
| Paywall viewers stays at 0 | On iOS, views from the Simulator, TestFlight, and sandbox installs do not count. Apps on SDKs older than the step 2 minimums cannot report views at all. | Expected while testing. Otherwise
update the SDK, and with a custom paywall call trackCustomPaywallImpression. |
| Results are all empty, with no chance to win | The experiment is still a draft, or there is not enough data yet | Start it. Chance to win appears "once you've collected enough data to produce reliable results". |
| Variant B customers do not see the new paywall | The treatment paywall was never published | Ask the agent to publish the treatment paywall. "A variant only serves the published version." |
| Publishing the treatment fails | The paywall has validation errors | Nothing was published. The result lists the errors and how to fix them; fix and publish again. |
| The agent says it cannot edit the paywall | The current offering has no RevenueCat Paywall attached, or a legacy one | Change an app-drawn paywall in your app. For a legacy RevenueCat paywall, tell the agent: it can build a brand-new treatment paywall instead (step 2). |
| The agent cannot change variants or the audience | The docs lock them once the experiment starts, and the agent's tools change them only on a draft | Stop and create a new experiment, or, if the agent reports that the experiment has an iteration, start a new iteration in the dashboard. To continue testing the same offerings after a stop, duplicate the experiment in the dashboard. |
| The agent cannot create experiments | Experiments need a Pro or Enterprise plan | Check your plan. |
| The agent cannot create experiments, edit a running one, or create or edit paywalls | The account is past the Pro plan's $2,500 MTR free allowance without a successful payment | Settle the billing. Until then, viewing results and stopping experiments still work, but charts are restricted, so the agent's analysis can fail at its chart step. Accounts in their first month get a 30-day grace period. |
| Fewer enrollments than expected | Your backend creates customers through the REST API before the SDK, or higher-priority experiments enroll them first | Let the SDK create customers first, and check the enrollment priority order on the Experiments page. |
| Existing customers are not enrolled | This codelab's experiment enrolls new customers only, so customers who installed before the start are never enrolled. In a new and existing customers test, their app is on an SDK below the minimum | Expected for a new-customers-only test. For a new and existing customers test, update the SDK to at least the versions in step 2. |
Conclusion
0:03:00You ran a paywall A/B test by talking to your agent:
- The control was your current offering, untouched, and the treatment was a copy of the published paywall with exactly one change.
- The agent published the treatment paywall, which is safe because no customer can see it before enrollment starts, and it waited for your explicit yes before starting the experiment.
- You read Paywall viewers, conversion, and revenue, with chance to win for the conversion-rate metrics, and gave the test the time real traffic needs.
- You rolled out the winner before stopping, as the default offering or through the Targeting rule that serves your customers, because stopping alone sends everyone back to what Targeting or the default offering serves.
Keep going
- Build with the RevenueCat AI Toolkit: install or update the toolkit and its other skills.
- Build a High-Converting Paywall with Paywalls V2: design the paywall you test.
- Run a Holiday Sale That Starts and Ends on Its Own: serve an offering on a schedule with Targeting.
- Boost Your App Revenue with RevenueCat: more monetization levers to test.
Documentation
- Getting started with Experiments
- Configuring experiments, including rolling out a winner
- Experiment results
- Displaying products
- RevenueCat AI Toolkit and the MCP tools reference
- RevenueCat/ai-toolkit on GitHub, where the skills this codelab follows are published