Docs overview
Docs: add payments to your browser extension
Add PayPal payments to your browser extension with no backend. Start with the quickstart, pick your stack, then add trials, subscriptions and license keys.
Start here
Step 1 Quickstart
Create an app, connect PayPal sandbox, add the SDK and take a test payment in about five minutes.
Start the quickstart
Quick start
Set up your app and PayPal, then take a first sandbox payment.
- Introduction ExtensionBill adds PayPal payments, subscriptions, trials and license keys to your browser extension without a backend of your own.
- Quickstart (5 minutes) Create an app, connect PayPal sandbox, add the SDK to your extension and complete a test purchase in about five minutes.
- Connect PayPal Create PayPal REST app credentials for Sandbox and Live, paste them into ExtensionBill, and let it register the PayPal webhook for you.
- Products & pricing Create products and one-time or subscription prices in the dashboard, and keep them in sync with PayPal in each environment.
- Testing with PayPal sandbox Test purchases, subscriptions, refunds, webhooks, trials and licenses end to end with PayPal sandbox accounts and test cards.
- Going live checklist What to set up before accepting real PayPal payments, how to turn on Live, and what to monitor after launch.
Frameworks
Copy-paste setup for your UI framework.
- Pick your stack Use ExtensionBill from React, Preact, Vue, Svelte, Angular, Solid, Lit or plain JavaScript. One background setup, a tiny binding per framework.
- React Add ExtensionBill payments to a React browser extension with the useUser hook.
- Preact Add ExtensionBill payments to a Preact browser extension with the useUser hook.
- Vue Add ExtensionBill payments to a Vue 3 browser extension with the useUser composable.
- Svelte Add ExtensionBill payments to a Svelte browser extension with the userStore store.
- Angular Turn an Angular CLI app into an extension popup and gate features with injectUser signals from @extensionbill/sdk/angular.
- Solid Gate features in a SolidJS extension popup with createUser from @extensionbill/sdk/solid.
- Lit Gate features in a LitElement extension popup with the UserController reactive controller from @extensionbill/sdk/lit.
- Vanilla JS Gate features in a framework-free extension popup with createUserStore or bill.onChange from @extensionbill/sdk and plain DOM rendering.
Guides
Add the features buyers expect, one task per page.
- Checking access Gate features in your popup, content scripts, options page and background with getUser, hasAccess and onChange, and keep server features safe.
- Paywall UI Drop a ready-made, CSP-safe upgrade screen into your popup or options page with mountPaywall, or build your own from getPlans().
- Free trials Offer a no-card install trial or a PayPal subscription trial, show trial status in your extension, and pick the right kind.
- Restore purchases Let buyers restore purchases in another browser or profile with an email code or a license key, and understand how devices are counted.
- License keys Issue license keys with every purchase, let buyers activate them in your extension, limit devices with seats, and validate keys from your own server.
- Customer portal The hosted self-service page where buyers view purchases and receipts, manage subscriptions and license keys, and how to open it from your extension.
- Discount codes Create percent or fixed-amount discount codes, limit them by price, date and redemptions, and pre-fill them from your extension.
Go deeper
Not needed to get paid. Explore and customize, look things up, or get help.
Advanced
How it works under the hood, and how to customize it.
- SDK configuration Build files, client options, environment variables per build tool, a local backend, the no-bundler setup and Manifest V3 details for @extensionbill/sdk.
- Checkout & one-time payments How a hosted checkout session runs from openCheckout to a captured PayPal payment, and what ExtensionBill does after the buyer pays.
- Subscription lifecycle Statuses, trials, renewals, failed payments, plan changes, cancellation and pausing for PayPal subscriptions, and how each one affects access.
- Refunds & disputes Issue full or partial refunds, keep refunds made in PayPal in sync, and respond to PayPal disputes and chargebacks from the dashboard.
- Taxes You are the seller and responsible for sales tax, VAT and GST. Here is the optional flat tax rate ExtensionBill can apply and how to export data for filings.
- Emails Every email ExtensionBill sends to your buyers and to you, when it is sent, how it is branded, and how to turn each one on or off.
- Install analytics How ExtensionBill counts installs, active users and uninstalls, collects uninstall feedback, and what data it does and doesn't collect.
- Webhooks Receive signed ExtensionBill events on your own server when orders, subscriptions, licenses, installs and disputes change.
- Security model Which keys and tokens live where, how a PayPal payment becomes verified access, and what client-side gating can and cannot protect.
Reference
Every SDK method, Server API endpoint and error code.
- SDK reference Every method, framework binding, type and option of the @extensionbill/sdk package, with the context each one works in.
- Server API Query customers, installs, orders, subscriptions and licenses, and grant or revoke access from your own backend with a secret key.
- Error codes Every ExtensionBill error code, its HTTP status, what it means and how to fix it.
Help
Answers to common questions and quick fixes.