Sample extensions
Reference Chrome extensions built with the crxpay SDK.
Reference extensions you can clone, install, and read end-to-end. Each one is a complete MV3 extension with a working paywall, real entitlement gating, and the corresponding crxpay dashboard config in a crxpay/ folder.
Repositories
The samples live under github.com/lilacchio/crxpay-sdk/tree/main/examples. Clone the monorepo and pick an example to play with:
git clone https://github.com/lilacchio/crxpay-sdk
cd crxpay-sdk/examples
ls
What's covered
| Sample | What it shows |
|---|---|
popup-only | Smallest possible integration — popup-only extension with one paywall, one entitlement. Start here if you're new. |
content-script | Calling subscription.hasEntitlement() from a content script via the page bridge. Demonstrates the MV3 CORS workaround. |
react-paywall | Full React paywall using @crxpay/react-paywall — <PaywallProvider> + theming + branded paywall. |
trials | Card-required and no-card trial patterns side-by-side. |
license-keys | Selling lifetime license keys (one-time payments) alongside subscriptions. |
Running a sample locally
cd examples/popup-only
pnpm install
pnpm build # outputs dist/
# Then in Chrome: chrome://extensions → "Load unpacked" → select dist/
Each sample's README.md explains how to wire its publishableKey to a test crxpay account.
Requesting a sample
If you're trying to solve a problem the samples don't cover (e.g. a sidebar UI, in-page paywall, or a specific framework), open an issue on GitHub and tell us what you're stuck on. We'll either add a sample or write a focused recipe in the docs.
Was this page helpful?
Your feedback shapes what we document next.