Stripe billing for organisation plans
Shipped· 2 months ago
Free / Team / Business tiers based on number of public projects, monthly active voters, and seats. Org-scoped billing portal. Trial flag on organizations.
Comments (1)
- Elsama· 2 months ago
Shipped in PR #58 (supersedes #58's source PR #30) and deployed to production.
What is live now:
- org_billing table (migration 0072) tracking Stripe customer/subscription state per org, written only by the webhook via the service role.
- /api/billing/checkout, /api/billing/portal, /api/billing/webhook (Stripe-Signature HMAC verified by hand).
- Billing settings page with monthly/yearly toggle, upgrade-to-Checkout buttons and a Manage button that opens the Stripe Customer Portal.
- Capability ranks + entitlement reconciliation so a webhook event sets organizations.plan automatically.
To activate (owner action): set these in /opt/hollahoop/.env and pm2 reload:
- STRIPE_SECRET_KEY (sk_live_...)
- STRIPE_WEBHOOK_SECRET (whsec_... from the Dashboard webhook endpoint -> https://hollahoop.app/api/billing/webhook)
- STRIPE_PRICE_STARTER_MONTHLY / STRIPE_PRICE_STARTER_YEARLY / STRIPE_PRICE_PRO_MONTHLY / STRIPE_PRICE_PRO_YEARLY (recurring Price ids)
Until those are set, checkout/portal return a clean stripe_not_configured response and nothing breaks. Verified live: webhook -> {"error":"webhook_not_configured"}, checkout -> {"error":"org_required"}.
Join the discussion
Sign in to leave a comment on this thread.