- Create a unique HMAC secret key. with a hexadecimal string of at least 32 characters.
- Provide this key to your Nayax Architect.
- Confirm the following technical specifications with your Architect:
- Field Order: The exact sequence of payload fields used for the hash.
- Encoding: The string encoding format (standard is UTF-8).
- Delimiters: The specific characters used to separate fields in the payload.
- Store your secret key securely (e.g., in an environment variable). Never hardcode it in your source code.
- Nayax generates a hash by combining the notification data with your secret key.
- Nayax sends the webhook with the signature included in the headers or payload.
- Your application receives the webhook and recalculates the hash using your local secret key.
- If your calculated hash matches the one sent by Nayax, the request is authentic.
Important: If the hashes do not match, the request should be treated as unauthorized and discarded. Always validate the HMAC before processing any notification.