Webhook Signature Verification
Fern’s SDKs export helper function to verify the signature of incoming webhook requests. There are three benefits to using this feature:
- Security: Users can ensure that the incoming webhook request is from your server.
- Ease of Use: Instead of making consumers write signature verification logic, you can use the SDK’s helper function.
- 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.