Skip to main content

Verify Webhooks

When Genuka sends webhook events to your application, it is important to verify that the request is genuine and has not been tampered with.
We achieve this by signing each webhook request with a secret key associated with your application.

Signature Header

Every webhook request from Genuka includes a special header:

X-Genuka-Signature

This header contains a hash signature generated with your Webhook Secret (provided when you create your application in the Genuka Developer Dashboard).

Verification Process

  1. Retrieve the raw request body exactly as received.
  2. Compute a HMAC SHA256 hash using your Webhook Secret.
  3. Compare your computed hash with the value in the X-Genuka-Signature header.
    • If they match → the request is authentic.
    • If not → discard the request.

Example in Node.js (Next.js App Router)