What is signed
The signed text is the UTF-8 string:
rawBody is the exact request body. Do not parse and stringify the JSON before you verify. A re-serialized body will not match.
The HMAC key is the signing secret string, using its UTF-8 bytes. Do not decode the secret from base64 first. Compare the full sha256= header value in constant time.
Reject the request when Eaze-Event-Id does not match id in the verified body.
Timestamp and duplicates
Eaze Customs does not enforce a clock window on your server. Reject a timestamp that is more than 5 minutes from the current time. That limits replay of a captured request. Use the timestamp header, not a timestamp you find only after parsing an unverified body. Storeid after a valid signature. Automatic retries and a portal Retry send the same event ID again. There is no guarantee of order or of exactly-once delivery. If you have already handled that ID, acknowledge the delivery and do not apply it again.
Keep the secret in a secret manager. When you rotate it in the portal, the previous secret stops working immediately. Update your receiver before the next delivery.
Node.js
Use the raw body. This TypeScript example keeps the body as received bytes. Return401 before you do any business work when verification fails. Eaze Customs waits up to 5 seconds for your response.
Python
compare_digest two strings that you rebuilt from parsed JSON.
C#
rawBody must be the unchanged request text.
After a valid signature
- Store
idso a later delivery of the same event does not apply twice. - Return a 2xx response.
- Read
clientRefanddata.resource.id. - Call the authorized GET for that resource.