You'd think events fire in the order things happen. They don't. I was building a Paddle integration last week. Subscription billing, nothing fancy. Customer clicks buy, Paddle handles checkout, my app gets webhooks and updates the database. The flow should be simple: Customer completes checkout subscription.created fires subscription.activated fires My app inserts a row on .created , updates status on .activated That's what I built. It worked great in my head. What actually happened In production, subscription.activated arrived before subscription.created about 30% of the time. My handler did a database insert on subscription.created : case ' subscription.created ' : await db . insert ( subscriptions ). values ({ paddleId : event . data . id , status : ' created ' , customerId : event . data . customer_id , }); break ; Enter fullscreen mode Exit fullscreen mode And an update on subscription.activated : case ' subscription.activated ' : await db . update ( subscriptions ) . set ({ status : ' active ' }) .…