Features

Webhook Signature Verification

Verify the signature of incoming webhook requests

Pro Feature

This feature is only available on paid plans. Please schedule a demo or email us to get started.

Fern’s SDKs export helper function to verify the signature of incoming webhook requests. There are three benefits to using this feature:

  1. Security: Users can ensure that the incoming webhook request is from your server.
  2. Ease of Use: Instead of making consumers write signature verification logic, you can use the SDK’s helper function.
  3. Strongly Typed: The SDK will parse the incoming payload and return a strongly typed object.

Each SDK exports a constructEvent function that takes in the incoming payload and the signature. The function will return a strongly typed object that represents the incoming webhook event.

1const payload = client.webhooks.constructEvent({
2 body: req.body,
3 signature: req.headers['x-imdb-signature'],
4 secret: process.env.WEBHOOK_SECRET
5})