If your app receives webhooks (Stripe, PayPal, GitHub, a payment IPN, anything), there is a subtle bug class that keeps shipping to production. A recent WordPress CVE is a perfect, minimal teaching example, so let's use it to make sure none of us write it.

The pattern (this is the part to remember)

Authenticating a webhook = "this message really came from the provider"

Validating a webhook = "the data in this message matches what I expect"

Doing the first WITHOUT the second is how money walks out the door.