Receive webhooks
Set up the receiver before your first send. WhatsApp delivery to a recipient and webhook delivery to your application are separate processes.
Register and verify
Implement an HTTPS receiver and the verification challenge described by Configure webhook. Your backend uses webhooks:manage to configure the workspace endpoint and Verify webhook to complete verification. Check Webhook health before expecting delivery.
Events from before the first webhook configuration are not recorded for partner recovery. Register early.
Verify the exact request bytes
The signature is HMAC-SHA256 using the webhook signing secret over:
X-Delivery-Id + LF + X-Delivery-Timestamp + LF + exact raw body bytes
Compare against X-Partner-Signature-256 (sha256= plus the hex digest) in constant time. Verify the raw body before parsing JSON; reserializing JSON changes the signed bytes. Validate the delivery ID format (del_ followed by 8–40 lowercase letters/digits) and reject timestamps more than five minutes from your synchronized clock. During secret rotation, accept a valid signature from an authorized current/overlap secret; the signature header can contain comma-separated values.
Process once, acknowledge promptly
Persist valid events durably before acknowledging success. Deduplicate by X-Delivery-Id, which remains unchanged on retries and replay; retain processed IDs for at least the 30-day replay window. Do not deduplicate by signature because timestamps and signatures change per attempt.
Events are raw Meta-shaped payloads and may arrive out of order. Use event timestamps and avoid regressing a message from read to delivered. Match outbound updates using provider message IDs and correlation data where available.
Monitor and recover
Use Delivery details and webhook health to investigate failures. Fix the underlying receiver problem before resuming or replaying. Resume and replay are different operations: rejected or exhausted deliveries need explicit replay, while resume releases eligible endpoint-paused deliveries. Do not assume the backlog is unlimited.
Poll Message status for unresolved outbound messages as well: local failures and expiry do not produce Meta callbacks. Template review events are not yet verified end to end; use template reads to confirm approval.