Rabbinatix
Sign inGet started
Store

Verify a webhook

FreeLogic
@rabbinatix/verify-a-webhook by Rabbinatixupdated Oct 4, 2026

Checks that a webhook really comes from the sender: its HMAC-SHA256 signature must match.

Sign in to add

The sender signs the request body with a secret you both know and sends the signature in a header. HMAC Signature signs the body you received with the same secret; Equals compares the two (the received one trimmed and in lower case, as hex usually is).

Sign the body exactly as it arrived: pass the raw text, not a record that was read and written out again.

Shows: HMAC Signature, Trim, To Lower Case, Equals.

How to use it

Add it to your logic, then add a Call Function step in any logic and pick Verify a webhook. It belongs to no system, so every system can use it. Or download the TypeScript and call it from your own code.

Inputs
body: Text
secret: Text
signature: Text
Outputs
valid: Yes / No
Previewdrag the steps around; scroll to zoom
Function Entry, Input / output. 0 inputs, 4 outputs. step 1 of 6
Verify a webhook
body
secret
signature
HMAC Signature, String. 4 inputs, 1 output. step 2 of 6
HMAC Signature
text
key
algorithm
encoding
result
Trim, String. 1 input, 1 output. step 3 of 6
Trim
text
result
To Lower Case, String. 1 input, 1 output. step 4 of 6
To Lower Case
text
result
Equals, Operators. 2 inputs, 1 output. step 5 of 6
==
A
B
result
Return, Input / output. 2 inputs, 0 outputs. step 6 of 6
Return
valid

Arrow keys: next or previous step in flow order. Alt with arrows: nearest step in that direction. Enter: open. Shift F10: more actions.

100%
Examplesrun live against the logic · 2/2 pass
PassedExampleInputOutput
Genuine{"body":"{\"id\":\"evt_1\",\"amount\":42}","secret":"whsec_test","signature":"5C138837C330F065C84A4AA41C9CA0AAA5985897D40C9BDCF28DDC4BDC4EF069 "}{"valid":true}
Changed body{"body":"{\"id\":\"evt_1\",\"amount\":4200}","secret":"whsec_test","signature":"5c138837c330f065c84a4aa41c9ca0aaa5985897d40c9bdcf28ddc4bdc4ef069"}{"valid":false}
Try it
Versions
In this package
Verify a webhook (entry)