Lightsail + Stripe Prototype

Reverse proxy (Caddy) → FastAPI (/api) → Stripe Checkout (subscription) + Webhook + SQLite events.

API status
Checking...

Creates a Checkout Session via POST /api/create-checkout-session.

Demo mode

Use the steps below to run a clean, repeatable demo from scratch. Recommended before sharing this prototype.

Before the demo (server)
cd ~/lightsail-lab
./reset_events.sh
This clears stored webhook events so the Events dashboard starts empty.
Before the demo (Windows PowerShell)
stripe listen --forward-to https://54.234.44.15.sslip.io/api/webhook
Keep this running during the demo so Stripe events are forwarded to the server.
Live demo flow
  1. Click Start Stripe Checkout and complete the checkout (test mode).
  2. On /success, show real session details (mode/status/payment_status/subscription).
  3. Open /events/ and show webhook events stored in SQLite.
Optional: generate events on demand (Windows)
stripe trigger checkout.session.completed
stripe trigger invoice.paid