Skip to main content
Webhooks require a Business tier subscription.

Overview

Borough uses the Standard Webhooks specification for signing webhook payloads. The SDK provides middleware helpers for Express and Next.js to verify signatures and parse events.

Installation

The webhook helpers require the standardwebhooks peer dependency:

Express

Next.js (App Router)

Event types

Event payload

All events share the same shape:

Manual verification

If you’re not using Express or Next.js, verify the signature manually:

Webhook secret

Your webhook secret is returned when you create a subscription. It starts with whsec_ and should be stored securely (e.g., environment variable). Each subscription has its own unique secret.

Retry behavior

Failed deliveries (non-2xx responses) are retried up to 7 times with increasing delays. Ensure your handler returns a 2xx status within 10 seconds to acknowledge receipt. After all retries are exhausted, the delivery is moved to a dead letter queue.