Skip to main content

Installation

Install Hookstack SDK in your project:

Quick Setup

1. Configure Environment

First, set up your signing secret. This is used to verify incoming webhooks:

2. Create Your First Webhook Handler

3. Configure Your Webhook URL

Create a new webhook in your Hookstack dashboard and copy the generated Webhook URL. Set up your webhook URL in your provider’s dashboard and ensure you’ve configured the signing secret correctly:

Security Features

Hookstack provides robust security features out of the box:

Signature Verification

Cryptographic verification of webhook signatures using HMAC-SHA256

Timestamp Validation

Protection against replay attacks with timestamp verification

Version Control

Support for multiple signature versions for seamless upgrades

Raw Body Handling

Proper handling of raw request bodies for signature verification

Next Steps

Security Guide

Learn about our security features and best practices

Advanced Usage

Custom handlers, middleware, and error handling

TypeScript Guide

Type definitions and payload interfaces

Best Practices

Production deployment and monitoring

Troubleshooting

Common causes of signature verification failures:
  1. Incorrect HOOKSTACK_SIGNING_SECRET
  2. Modified request body (ensure raw body parsing)
  3. Missing or incorrect headers
  4. Clock drift between servers (check timestamp)
For Express applications, ensure you use express.raw() middleware:
Using express.json() will modify the request body and break signature verification.
For time-intensive processing:
The Next.JS example provides a nice example of how to handle this when deploying to Vercel, using the waitUntil() async processing function.