For anyone landing here, I would separate three layers: webhook authentication: did this request really come from Stripe? freshness/idempotency: is the event recent and not already processed? business logic: only then create records, grant access, fulfil orders, etc.