Series · 6 parts

Indie SaaS Billing & Multi-Tenant Isolation

Billing and tenant isolation for a solo Laravel + PostgreSQL SaaS: leak-proof scoping with Row Level Security, idempotent Stripe webhooks, plan-model invoice math, proration, dunning and per-tenant limits. Measured failures, not package tutorials.

  • 6 parts
  • 55 min total
  • Updated Oct 24, 2026
  • Not started
Start with Part 1
fig. 01 — indie-saas-billing-tenant-isolation.sys6 parts

Curriculum progress0 of 6 parts completed (0%)

Estimated remaining time: 55 minutes

  • 01 · Start
  • 02 · Unread
  • 03 · Unread
  • 04 · Unread
  • 05 · Unread
  • 06 · Unread

Advertisement

  1. 01
    Part 01 · 10/24/202610 min read

    Laravel tenant scopes leaked in 5 of 7 paths. RLS closed all of them

    Laravel tenant scopes built on a tenantid global scope do not isolate tenants. In a lab with 200,000 invoice rows across 100 tenants, the scope leaked all 200,000 rows in 5 of 7 common query paths.

    Key finding

    A Laravel global scope on tenant_id leaked all 200,000 rows to tenant 7 in 5 of 7 query paths: raw queries, withoutGlobalScopes(), queued jobs and joins.

    Start reading Part 01 →
  2. 02
  3. 03
  4. 04
    Part 049 min read

    Cashier upgrades bill late and can lock customers out

    Laravel Cashier's default swap() and updateQuantity() calls do not charge a customer for an upgrade today. They send prorationbehavior=createprorations, so Stripe adds the charge to the next renewal

  5. 05
  6. 06

Advertisement

Continuous dispatch

Finished or following along?

Get notified when the next measured breakdown goes live. No pitch decks, no fluff, just raw numbers and what they mean.

Recommended follow-ups

Explore all series →

6 parts · 60 min

Designing AI & SaaS Products

System design for AI-powered SaaS at solo scale: LLM unit economics, multi-tenant isolation, usage billing, durable agent jobs, RAG storage and scaling drills. Measured numbers, not interview diagrams.

View roadmap →