Register an endpoint in Settings → Developer → Webhooks. The signing secret (whsec_…) is shown once. Every delivery carries an MB-Signature header — an HMAC-SHA256 of the raw request body with your secret. Always verify before trusting a delivery.
The official SDKs wrap this as verifyWebhook / verify_webhook.
Verify against the raw request body, before any JSON parsing/re-serialization.