Skip to content
Zutra HyperSaaS — 6 languages, auth UI, dashboard, 69 tests
Get it on Gumroad

Zutra v1.3.0 — 6 languages, auth UI, dashboard, 69 tests. Saves 80+ hours.

See what's included

Stripe

Wire up Stripe billing — products, prices, and the customer portal.

The pricing page and plan cards are already built. You connect Stripe and update plan CTAs in config.ts.

1. Get your keys

In Stripe Dashboard → Developers → API keys:

# .env
PUBLIC_STRIPE_KEY=pk_live_...
STRIPE_SECRET_KEY=sk_live_...     # server-side only, never PUBLIC_

Use pk_test_ / sk_test_ keys during development.

2. Create products and prices

In Stripe, create one product per plan with a recurring monthly price and a recurring annual price. Copy the Payment Link URL for each paid plan.

3. Wire up plan CTAs

// src/config.ts
{
  id:      "pro",
  cta:     "Start 14-day trial",
  ctaHref: import.meta.env.PUBLIC_STRIPE_PRO_LINK ?? "/signup?plan=pro",
}

Add PUBLIC_STRIPE_PRO_LINK=https://buy.stripe.com/... to .env.

4. Customer portal

Enable the Stripe Customer Portal in Billing → Customer Portal → Activate.

# .env
PUBLIC_STRIPE_PORTAL_URL=https://billing.stripe.com/p/login/...

Use this URL on the “Manage billing” button in the dashboard.

For subscription lifecycle events (payment failed, cancelled, renewed), set up a webhook endpoint:

https://yourdomain.com/api/webhooks/stripe

Events to listen for:

  • customer.subscription.created
  • customer.subscription.updated
  • customer.subscription.deleted
  • invoice.payment_failed