Sell premium features inside your extension on your own Stripe account

A paywall in the bundle, a hosted Stripe checkout, a licence verified locally. No backend.

$ npm install @extenshi/pay
No iframe, no remote codeNo account until the payment2% per charge, no monthly fee
How it works

Four steps, one dependency

  1. Connect Stripe in dojo

    Standard onboarding. You get a publishable key.

  2. Add an offer

    Sku, price, features. Created on your Stripe account.

  3. Gate the feature

    requireFeature() opens the paywall when unpaid.

  4. The buyer pays on Stripe

    New tab. The webhook lands, the licence unlocks.

background.ts
import ExtenshiPay from '@extenshi/pay'

const pay = new ExtenshiPay({
  publishableKey: 'pk_ext_…',
  entitlementPublicKey: '<Ed25519 public key from Payments>',
})
await pay.initialize()

// Opens the paywall when the user has not paid.
const ok = await pay.requireFeature('pdf-export', {
  onUnlock: () => enablePdfExport(),
})
Five layouts

The paywall, rendered from the bundle

Light or dark, your accent colour, your strings. Click a render to see it full size.

Agent-driven development

Ask your agent for a paywall

Small enough for Claude Code, Cursor or any coding agent to add in one pass.

Fits in context

One dependency, one public key, four methods. No secrets in the bundle.

Testable without Stripe

mock: true serves offers offline, so the agent ships the gate and its tests first.

Skill or brief

Install the skill or paste the brief. On the MCP server, search_docs finds it.

paste into your agent
Add a paywall to this extension with @extenshi/pay (npm install @extenshi/pay):
gate <feature> with pay.requireFeature('<feature>', { onUnlock }).
Keys: dojo.extenshi.io/payments → independent Pay application; bundle publishableKey and entitlementPublicKey. Existing scaffolds may provide PAY_PUBLISHABLE_KEY in extenshi.config.js.
No key yet: build with { mock: true, mockData } and leave a TODO. No remote code, no Stripe secrets.
Docs: https://docs.extenshi.io/developers/pay-sdk
install the skill (Claude Code)
$ mkdir -p ~/.claude/skills/extension-paywall
$ curl -fsSL https://docs.extenshi.io/skills/extension-paywall/SKILL.md \
    -o ~/.claude/skills/extension-paywall/SKILL.md
What you get

Built for the extension, not for a web page

Store-safe by construction

Templates in the bundle, Shadow DOM, no remote code.

Anonymous until the payment

A random installation id is all the SDK needs.

Licence verified locally

Ed25519-signed entitlement, checked with WebCrypto; valid offline for up to 48 hours.

Your Stripe, your payouts

Refunds, disputes and tax stay in your dashboard.

One-time and subscriptions

Several offers per application, customer portal built in.

Small

Choose the full paywall bundle or a lite client for your own UI.

Privacy

What leaves the extension

Payment calls identify the installation and offer. Optional recovery also sends session credentials.

Email and verification codes are entered on the hosted recovery page. Include that flow in your privacy disclosure when enabled.

  • No sign-up in the extension

    The offer and the paywall are shown to an anonymous installation.

  • Works offline for 48 hours

    The cached entitlement is verified locally and refreshed hourly while online; offline it stays valid for up to 48 hours from issuance.

  • A key that is safe to bundle

    It identifies your Pay application. Installation and recovery credentials authorize purchase access.

Sent

Payment and optional license recovery:

  • publishable key
  • random installation id
  • sku, when a checkout starts
  • locale
  • checkout session id
  • billing profile id, when selected
  • recovery session id and claim challenge
  • recovery claim secret, in a POST body

Never sent

Not collected by the extension SDK:

  • e-mail address
  • user agent fingerprint
  • browsing data
  • extension state
  • page content
Pricing

2% per charge. No monthly fee.

Deducted by Stripe as an application fee on each charge, on top of Stripe’s fees, plus VAT where applicable. No minimum.

Per charge

2%+ Stripe fees

If nobody buys, you pay nothing.

  • $0 monthly
  • ∞ offers & installs
Connect Stripe in dojo

extenshi is not a Merchant of Record and never holds buyer funds. The sale is yours, and so are the taxes on it.

FAQ

Questions developers ask first

Do I need an Extenshi development project?
No. Create an independent Pay application and keep your existing development workflow. You can link an Extenshi project later and configure Pay through your agent.
Will the Chrome Web Store accept it?
The paywall is bundled with the extension: no iframe, remote script or inline handlers. Store approval depends on the whole extension and is not guaranteed.
Who is the seller?
You. Stripe processes the payment on your own Stripe account, and extenshi never receives or holds buyer funds. extenshi is not a Merchant of Record: the sale is between you and the buyer, and the taxes on it are yours to handle.
What does it cost?
2% of each charge, deducted by Stripe as an application fee for extenshi’s services, on top of Stripe’s fees, plus VAT where applicable. No monthly fee, no setup fee.
Does the buyer need an account?
No. The offer is shown to an anonymous installation. The buyer identifies themselves on the checkout page only, never in your extension.
Do I need a backend?
No. Offers, webhooks and the ledger live on extenshi; checkout is hosted by Stripe on your account. Your extension ships the SDK and a publishable key that is safe to bundle.
What happens offline?
The cached entitlement is verified locally with its Ed25519 signature, so paid features keep working for up to 48 hours from signed issuance with the bundled verification key. A lapsed subscription still expires on its date.
One-time or subscriptions?
Both. One-time prices or monthly and yearly plans, several offers per application. Subscribers manage plans in Stripe’s customer portal.
Which payment providers?
Stripe today, via Stripe Connect. The extension only knows its publishable key, so a provider change on the server needs no extension update.
Can my coding agent set this up?
Yes. Grant Pay permissions to let your agent create an application, configure offers and check readiness. You complete seller verification and agreement acceptance in the browser.
What does the extension send?
Payment calls send application and installation identifiers, SKU and locale. Explicit recovery and billing actions also send scoped credentials. Email is entered on the hosted recovery page.

Your extension has users. Let the ones who want more pay.

Connect Stripe, add the offer, gate the feature.

$ npm install @extenshi/pay

2% per charge · no monthly fee · your own Stripe account