Skip to main content
Important: Always validate webhook signatures before processing the payload. This ensures the request came from Nayax Energy Core and hasn’t been tampered with.

Signature Format

The X-Webhook-Signature header contains a timestamp and signature:
  • t - Unix timestamp when the signature was generated
  • v1 - HMAC-SHA256 signature

Validation Algorithm

  1. Extract the timestamp (t) and signature (v1) from the header
  2. Construct the signed payload: {timestamp}.{raw_request_body}
  3. Compute HMAC-SHA256 of the signed payload using your webhook secret
  4. Compare your computed signature with the provided signature
  5. Optionally, verify the timestamp is within an acceptable window (e.g., 5 minutes)

Code Examples

Node.js / TypeScript

Python

Go