Dori Media.

Products

Glovebox Freelegs Parked Funds Fleetmate

Rental software

Rental car software NZ VEVS alternative RCM alternative Booking system migration Campervan and motorhome hire Trailer hire Bike and e-bike hire 4WD and ute hire See it live

Studio

Services Work About Journal Book a call

Engineering note

Webhook-driven state machines

Reliable payments require explicit state transitions, not ad-hoc flags.

Webhooks Payments Laravel Stripe Queues
About 4 min read Published 1 November 2025

Founder, Dori Media · Christchurch · Laravel & Stripe since 2011

On this page

The idea

Every event is a state transition. Make it explicit, logged, and replayable.

The approach

  • Normalize incoming events
  • Map to a single state machine
  • Make transitions idempotent
  • Keep an audit log for every change

Outcome

Fewer double-charges and clearer incident responses.

This note sits under Web apps & platforms. See also all journal writing.

Building something similar?

Want to talk it through?

Booking systems, internal tools, multi-tenant platforms. I build and run them from Christchurch, and I will tell you honestly if you should stay on what you have got.