AI Workflows — Deep Dive

The architecture

Back to Digital bundles, user roles & automated delivery
Bundles & Delivery

Boring architecture beats clever architecture. Stripe + webhook + Supabase + email — that's the spine.

Context

Stripe handles checkout, subscriptions and bumps. A webhook hits a server function that provisions the correct user roles in Supabase, generates license keys or download links, and triggers a delivery email through Resend or Postmark. The customer's dashboard reflects new access in real time.

The spine

Stripe Checkout → signed webhook → server function in TanStack Start → user + role + entitlement rows in Supabase → delivery email via Resend/Postmark → customer dashboard reflects access in real time. No queue server, no microservices, no Kubernetes.

Why webhooks need signatures

Every webhook handler verifies the Stripe signature with constant-time comparison before reading the payload. No exceptions. A webhook without a signature check is an unauthenticated 'give me a free product' endpoint.

Checklist

  • Verify webhook signatures, every time
  • Store entitlements as data, not as code
  • Make every delivery email idempotent
  • Log every webhook event for audit & replay

More aspects

Sound like your next move?

Book a call