Editorial placeholder · Draft article
Keep the raw bytes
Read the exact request body before parsing the JSON. Re-serializing JSON can change the signature input.
Check the signature
Use your endpoint secret and the timestamp, event ID and raw body to calculate the HMAC. Compare signatures using a timing-safe function.
Deduplicate delivery
Record the event ID alongside the order update in a transaction. A retried delivery should find the recorded result.