Verify webhook signatures

Check the x-ibuat-signature header so your endpoint only trusts requests that really come from iBuat.Link.

Updated October 12, 2026

Anyone who learns your endpoint’s URL could send it fake events. Every iBuat.Link delivery is signed with your webhook’s signing secret, so your endpoint can check it before doing anything.

HeaderWhat it holds
x-ibuat-eventThe event name, e.g. sales_closing.recorded
x-ibuat-event-idA unique id. Retries keep it, so use it to skip duplicates.
x-ibuat-timestampUnix time in seconds when the request was signed
x-ibuat-signaturesha256= followed by the HMAC SHA-256 in hex

How to check it

  1. 1

    Read the raw body

    Use the exact bytes you received, before any JSON parsing. Re-encoding the JSON can change it and break the check.

  2. 2

    Build the signed string

    Join the timestamp header, a dot and the raw body: timestamp.body.

  3. 3

    Compute the HMAC

    Make an HMAC SHA-256 of that string with your signing secret as the key, as lowercase hex, and put sha256= in front.

  4. 4

    Compare and check the age

    Compare it with x-ibuat-signature using a constant-time comparison. Also reject requests whose timestamp is more than 5 minutes old.

LanguageCode
Node.js'sha256=' + crypto.createHmac('sha256', secret).update(timestamp + '.' + rawBody).digest('hex')
PHP'sha256=' . hash_hmac('sha256', $timestamp . '.' . $rawBody, $secret)
Python'sha256=' + hmac.new(secret.encode(), (timestamp + '.' + raw_body).encode(), hashlib.sha256).hexdigest()
The expected signature in a few languages

Compare with crypto.timingSafeEqual (Node.js), hash_equals (PHP) or hmac.compare_digest (Python). Answer with a 2xx status within 8 seconds, and do slow work afterwards.

If the secret leaks, use Rotate secret on the webhook’s row and update your endpoint. The old secret stops working immediately.

Full tutorialHow to send iBuat.Link events to your CRM or automation tool with webhooksRead the guide

Related articles

Still need help?

Send us a ticket from your dashboard: the headset button at the top right, then Contact support. We reply there and by email.

Contact support