Stripe + Auth Starter

A complete Chrome extension with authentication, Stripe Checkout, and a premium paywall — ready to run in 5 minutes. Gate any feature behind billing.requireAccess("pro") and ChromeShip handles the rest.

Requires ChromeShip Pro

Upgrade to Pro to get the starter kit.

What you get

  • Auth popup — email sign-up, sign-in, and Google OAuth. Session persisted across surfaces.
  • Stripe Checkout — one-click "Upgrade to Pro" button that opens Stripe Checkout.
  • Customer Portal — users manage their subscription without leaving the extension.
  • Paywall — gate any feature behind billing.requireAccess("pro").
  • Webhook ready — Stripe events verify signatures, create entitlements, and deduplicate.
  • Migrationschromeship_entitlements and chromeship_stripe_events tables pre-configured.

Gate a feature

The only code you write. Wrap any premium feature — the starter handles checkout, entitlements, and the portal.

import { billing } from "@/integrations/stripe";
import { ChromeShipError } from "@/integrations/shared";

async function runPremiumFeature() {
  try {
    await billing.requireAccess("pro");
    // User paid — run the feature
  } catch (error) {
    if (error instanceof ChromeShipError && error.code === "entitlement_required") {
      await billing.checkout({ mode: "payment", product: { name: "Pro" }, amount: 19900 });
    }
  }
}

Change the price

Set your own price and plan name in Settings → Environment. No code changes needed.

STRIPE_PRICE_ID=price_xxx       // or use inline pricing
STRIPE_WEBHOOK_SECRET=whsec_xxx
SUPABASE_PROJECT_REF=abcdefghijkl
SUPABASE_ACCESS_TOKEN=sbp_xxx

Setup

  1. Enable Supabase and Stripe integrations in the Integrations tab.
  2. Set your Stripe keys and Supabase production credentials in Environment.
  3. Deploy migrations from the Functions tab.
  4. Deploy stripe-webhook and register its URL in your Stripe dashboard.
  5. Deploy stripe-checkout and stripe-entitlements.
  6. Your extension is now paid. Gate features with billing.requireAccess("pro").

Customize the plan

Change "pro" to any plan name across your code. The starter uses a single plan, but you can gate different features behind different plan keys — billing.requireAccess("enterprise"), billing.requireAccess("teams") — and Stripe handles the rest.