Monetize a browser extension without a payment backend
Add the Payhook upgrade button to a Chrome, Firefox, or Safari extension, open hosted Stripe checkout, and gate Pro features without a custom license server.
#payhook#unlock-button#monetization#browser-extension#stripe-checkout
Payhook gives you a hosted unlock button, Stripe checkout, and entitlement checks so your Chrome, Firefox, or Safari extension never implements payment infrastructure.
This is the monetization layer for the beginner tutorials on this blog. Build the useful free version first, then use Payhook to unlock Pro without shipping card forms, webhooks, or license servers.
Prerequisites
- A working extension: Chrome, Firefox, or Safari
- Optional: Chrome extension MV3 starter if you want to inspect the files
- Stripe connected and a product configured in dashboard.payhook.link
- Optional: Payhook MCP for agent-driven setup
High-level flow
User clicks Upgrade → unlock.payhook.link (Stripe Checkout) → Payhook records payment → Extension checks entitlement → Pro features unlock
Integration outline
- Install the SDK:
npm install @payhook/extension(npm). - In the dashboard, create a publishable key:
phk_test_…while developing,phk_live_…for the store build. - In the background service worker, create one
PayhookSessionand callpayhook.config('phk_test_…'). Products, trials, and branding come from the dashboard, not from code. - From the popup, ask the background to call
payhook.openUnlock(); it opens hosted Stripe checkout at unlock.payhook.link. - Gate Pro UI with
payhook.getAccessState()(paid or active trial). No custom license API needed.
The package README has the full Manifest V3 setup, including the manifest permissions.
Agent prompt (copy to your coding agent)
Integrate Payhook into this browser extension as the premium unlock and payment flow.
- Add the Payhook UpgradeButton in the extension popup for paid tiers
- Gate Pro features with Payhook entitlement checks (no custom license server)
- Open hosted Stripe checkout via unlock.payhook.link - do not build a custom Stripe backend
- Install @payhook/extension from npm and follow its README
- Payhook: https://dashboard.payhook.link
- MCP: https://mcp.payhook.link
Verify locally
- Load the unpacked extension
- Click upgrade and complete test checkout (test mode in dashboard)
- Confirm Pro gates unlock after payment