How to add a free trial to your Chrome extension
Three trial models for extensions, where to store trial state so it survives a service worker restart, and the code to gate features and convert trials to paid.
A free trial is the change most likely to help a paid extension. Users cannot try before they buy in the Chrome Web Store, there is no refund flow they trust, and a paywall on first open converts terribly. A trial fixes all three.
It is also easy to build wrong: state in the wrong place, a trial that resets on reinstall, or a paywall that fires before the user has seen anything worth paying for. Here is the working version.
Pick the model first
Three models, three different businesses. Pick by how your extension is used, not by what is easiest to build.
Time-based, no card
The user installs, gets everything for 7 or 14 days, then hits the paywall.
Best for extensions used daily, where value is obvious within a week: tab managers, writing tools, screenshot tools.
Watch out for extensions people use once a month. A 14-day timer on a quarterly-use tool expires before the user’s second session, and they churn without ever seeing the value.
Usage-quota
The user gets N actions free (20 exports, 100 summaries, 5 reports) with no deadline.
Best for anything with a countable unit of value, and anything with a real per-use cost to you (an API call to an LLM, an OCR job). The quota doubles as your cost ceiling.
Watch out for making the quota so generous the free tier is the product. If most users never hit it, it is not a trial, it is a free tier, and that is a different decision.
Card-required trial
The user enters payment details up front and is charged when the trial ends. Handled by a PayPal subscription plan with a trial period, not by your code.
Best for higher prices ($15/month and up) and B2B tools.
Watch out for the conversion math. Card-required trials produce far fewer starts and far higher conversion of those starts. For a $5/month consumer extension the arithmetic usually favors no card; above $15/month it usually favors the card.
Where trial state lives
This is where most implementations break. In Manifest V3 your service worker is terminated after 30 seconds of inactivity and every global variable goes with it, so trial state cannot live in memory. See the service worker lifecycle guide for the full rules.
Your options, from weakest to strongest:
| Where | Survives SW restart | Survives reinstall | Survives a determined user |
|---|---|---|---|
| Global variable | No | No | No |
chrome.storage.local | Yes | No | No |
chrome.storage.sync | Yes | Usually (if sync is on) | No |
| Your server, keyed to an install | Yes | Yes | Yes |
The honest tradeoff: any client-side trial can be reset by uninstalling and reinstalling, or by clearing extension storage. That is fine, and you should build it anyway. The user who works out how to reset your trial was never going to pay; the 99% who would not think of it are your actual market. Only use a server-side trial if a single trial genuinely costs you money (paid API calls), in which case make it server-authoritative from the start.
The ExtensionBill SDK puts you in the server-side row: the install trial is recorded on ExtensionBill’s servers against the extension’s install ID, so it survives worker restarts and edits to extension storage. A full uninstall and reinstall creates a new install, which is the same tradeoff as above and the right one for most extensions.
Implementation: time-based trial
With the ExtensionBill SDK you don’t store a timestamp yourself. Turn on the
install trial and set its length (say 14 days) in your dashboard, then start it
from the extension with bill.startTrial(). The server records when it started
and when it ends, and every getUser() result carries the current state in
user.trial:
// user.trial
{
available: false, // true until this install has used its trial
active: true, // inside the trial window right now
startedAt: '2026-10-01T09:12:44.000Z',
endsAt: '2026-10-15T09:12:44.000Z',
daysLeft: 3
}
// bill.js
import { ExtensionBill } from '@extensionbill/sdk'
export const bill = ExtensionBill({ publishableKey: 'pk_live_…' })
// popup.js
import { bill } from './bill.js'
async function renderPopup() {
const user = await bill.getUser()
if (user.paid) {
render(<Premium />)
} else if (user.trial.active) {
render(<Premium banner={`${user.trial.daysLeft} days left in your trial`} />)
} else if (user.trial.available) {
render(
<StartTrial
days={14}
onStart={async () => {
await bill.startTrial()
renderPopup()
}}
/>
)
} else {
render(<Paywall onUpgrade={() => bill.openCheckout()} />)
}
}
renderPopup()
startTrial() returns the updated user and throws an ExtensionBillError with
code trial_unavailable if trials are switched off or this install already used
its trial, so a double click can never extend it. You can also call it on the
first popup open instead of behind a button; an explicit “Start my 14-day
trial” tends to make the deadline feel fair rather than sprung on the user.
Three details that matter:
- Keep one trial clock.
user.trial.endsAtis set once, on the server, when the trial starts. Never keep a countdown of your own that you decrement; it drifts and breaks when the worker restarts. - Check
user.paidfirst. A paid user whose trial ended long ago must never see an expiry screen.bill.hasAccess(user)covers both cases (paid or trialing) when you only need a yes or no. - Do the same check in the background worker before running any premium scheduled work, not just in the popup. The popup is UI, not enforcement.
Implementation: usage quota
const FREE_USES = 20
async function consumeUse() {
const { used = 0 } = await chrome.storage.local.get('used')
await chrome.storage.local.set({ used: used + 1 })
return FREE_USES - (used + 1)
}
async function canUse(user) {
if (user.paid) return { allowed: true, remaining: Infinity }
const { used = 0 } = await chrome.storage.local.get('used')
return { allowed: used < FREE_USES, remaining: Math.max(0, FREE_USES - used) }
}
Show the remaining count in the UI from the first use, not just when it runs out. “17 of 20 free exports left” sets up the upgrade; a paywall that appears from nowhere on export 21 reads as a bait and switch and earns one-star reviews.
Implementation: card-required trial
Do not build this one. Add a recurring price with trial days (say 14) to your product under Sell → Products. ExtensionBill creates the PayPal billing plan with a free trial cycle first, and your extension code stays exactly the same:
// The price ID comes from Sell → Products; its plan includes the 14-day trial.
await bill.openCheckout(monthlyPriceId)
The buyer approves the subscription in PayPal checkout, and from then on PayPal runs the trial clock, takes the first charge when the trial ends, and retries failed payments. If you enable trial reminders, ExtensionBill emails the buyer a few days before the trial ends.
Access starts as soon as the buyer approves, so onPaid fires at the start of
the trial, and user.subscription.trialEndsAt tells you when the first charge
is due. A trial that converts needs no code: the subscription simply stays
active. The case to handle is the one where access goes away, because the buyer
canceled during the trial or the first charge failed for good. There is no
separate cancel event; compare the previous state in onChange:
// background.js
import { bill } from './bill.js'
bill.startBackground()
bill.onPaid((user) => {
// The subscription is approved and the trial has started. Unlock Pro.
})
bill.onChange((user, prev) => {
if (prev?.paid && !user.paid) {
// The trial or subscription ended without payment. Downgrade gracefully.
}
})
Whichever model you pick, the sale is yours. PayPal processes the payment, but you are the seller, so VAT, GST, or sales tax where the buyer lives is your obligation. If you’re registered somewhere, ExtensionBill can add an optional tax percentage line to checkout and receipts; see Taxes for what that covers.
What to gate, and what never to gate
The trial that converts gives away the whole product and takes it back. The trial that does not convert gives away a crippled version and asks the user to imagine the good one.
Gate: volume, automation, export, sync, history, team features, the higher-cost operations.
Never gate: the first successful outcome. The user has to complete the core job once, fully, before any wall appears. If your extension summarizes pages, the first summary is complete and good. If it exports data, the first export lands as a real file.
Never silently degrade. Cutting quality without saying so produces bad reviews from people who think the product is broken, which costs you more than the conversion is worth.
The expiry screen is the sales page
When the trial ends, most developers show a disabled UI and an “Upgrade” button. That is the highest-intent moment your extension will ever have and it deserves more:
- Name what they did with it: “You made 34 exports in 14 days”
- State the price plainly, including the currency and the billing period
- Say what happens to their existing data (nothing, ideally)
- One button, going straight to checkout, no intermediate page
- Keep read-only access to what they already created; deleting or locking their own data converts nobody and generates refund requests
<Paywall
headline="Your 14-day trial has ended"
proof={`You made ${stats.exports} exports with Pro features`}
price="$4/month, cancel any time"
onUpgrade={() => bill.openCheckout()}
/>
Reminders, without being obnoxious
Two prompts convert nearly as well as five, and cost you no reviews:
- Day 7 of 14 (or 50% of the quota): a dismissable banner in the popup, noting what is left.
- Day 13 (or 90% of quota): a clear notice with the upgrade button.
Use chrome.alarms if you want to check the trial clock in the background,
never setTimeout, which does not survive worker termination. And gate the
whole thing behind a “seen it” flag in chrome.storage.local so a user who
dismisses is not shown the same banner on every popup open.
Common mistakes
- Checking the trial only in the popup. Premium background jobs keep running for expired users. Check in the worker too.
Date.now()compared against a synced timestamp with no tolerance. Clock skew between devices can push a user one day over. Add a small grace window.- Resetting the trial on update. Anchor on the trial start time
(
user.trial.startedAtwith the SDK), not on a value you rewrite inonInstalled, which fires on every version update. - No offline path. If the network is down, keep the last known status
instead of locking a paying customer out. The SDK does this for you: it
caches a signed copy of the user’s state, so
getUser()keeps answering offline for up to 72 hours. - A trial with no clear end. “Trial” with no stated length reads as a free tier, and users react badly when it stops.
Wiring it up
The mechanics of checkout, paid-status checks, and webhooks are covered step by step in how to add payments to a Chrome extension. For choosing between one-time licenses, subscriptions, and freemium in the first place, start with how to monetize a Chrome extension in 2026.
ExtensionBill gives you getUser(), startTrial(), openCheckout(), and the
onPaid event on top of your own PayPal Business account, with no backend to
run. Read the quickstart to get started.