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
- Retrieve the raw request body exactly as received.
- Compute a HMAC SHA256 hash using your Webhook Secret.
- Compare your computed hash with the value in the
X-Genuka-Signatureheader.- If they match → the request is authentic.
- If not → discard the request.
Example in Node.js (Next.js App Router)
| Error | Cause | Solution |
|---|---|---|
401 Unauthorized | Signature invalid or missing | Ensure you are using the correct Webhook Secret |
400 Bad Request | Malformed payload | Check that your endpoint reads the raw request body properly |
| Request not received | Server offline or URL incorrect | Verify your deployment and webhook URL in the Genuka dashboard |
