// use case

Expose your Django dev server to Stripe for Stripe webhooks

Stripe needs a public HTTPS URL to deliver webhook events. Your dev server runs on localhost, so you need a tunnel between them — and a stable URL so you don't have to repaste it into the Stripe dashboard every restart. Django (Python) dev server.
  1. Reserve a stable subdomain

    On the lrok free plan you keep one reserved subdomain forever. Pick a name your Stripe dashboard can hold onto — webhook URLs that survive laptop restarts mean fewer dashboard re-pastes.

    $ lrok reserve dja-stripe
      Reserved https://dja-stripe.lrok.io
  2. Run your Django app

    Start the dev server on port 8000 (the Django default).

    $ python manage.py runserver
  3. Tunnel localhost to the public URL

    lrok forwards https://dja-stripe.lrok.io/webhooks/ → http://127.0.0.1:8000/webhooks/. The flag --hint binds your reserved subdomain to this tunnel.

    $ lrok http 8000 --hint dja-stripe
      Forwarding https://dja-stripe.lrok.io  ->  http://127.0.0.1:8000
  4. Paste the URL into Stripe

    Developers → Webhooks → Add endpoint. Paste https://dja-stripe.lrok.io/webhooks/ as the destination.

  5. Watch deliveries land in the request inspector

    Every webhook Stripe sends shows up at lrok.io/dashboard with full body, headers, status, and latency. Re-deliver any request to your Django handler with one click. Verify the Stripe-Signature header against the raw request body — not the parsed JSON. The /tools/webhook-signature-verifier tool catches mismatches in seconds.

// why lrok for this

lrok's reserved subdomain is free and lives forever, so your Stripe stripe webhooks URL never rotates. $9/mo flat for unlimited tunnels — no SSO tax, no enterprise-only signature verification, no bandwidth metering. The request inspector is built in.

Related workflows