Tern is a zero-dependency TypeScript framework for webhook signature verification. One SDK, every platform. No boilerplate, no fragile hand-rolled crypto.
Clerk webhook verification today vs with Tern. Same security, a fraction of the code.
No code change. No redeployment. Set your platform via Vercel feature flags — Tern reads them at runtime. Switch from Clerk to Stripe to GitHub without touching your codebase.
Once your signature is verified, Tern can queue delivery, retry failures, recover from a dead-letter queue, and alert you when things go wrong — automatically.
Purpose-built adapters for every major runtime. Same verification logic, native integration.
App Router adapter. Reads platform & secret from Vercel feature flags at runtime — no redeploy needed.
Express.js middleware. Drop-in request verification before your route handler runs.
Cloudflare Workers adapter using the Web Crypto API. Edge-native, zero Node.js dependencies.
Hono adapter for Node.js and edge runtimes. Tiny footprint, fast routing, and consistent request verification.
Framework-agnostic core. Works in any runtime that supports the Web Crypto API — Deno, Bun, Node.js 18+.
Real, working code for every supported platform and framework. Copy and paste — no adapting needed.
import { createWebhookHandler } from '@hookflo/tern/nextjs'; // app/api/webhooks/stripe/route.ts export const POST = createWebhookHandler({ platform: 'stripe', secret: process.env.STRIPE_WEBHOOK_SECRET!, handler: async (payload) => { // ✓ verified — handle your event // payload.id can be stored for deduplication return { received: true }; }, });
Verified implementations — not guesswork. Each platform is tested against real webhook payloads.
● verified Custom config lets you verify any HMAC-based webhook without waiting for built-in support.
No magic, no bloat. Just the right abstractions in the right places.
platform from Vercel feature flags. Change platforms at runtime — zero code changes, zero redeployments.Open source. MIT licensed. Built and maintained at Hookflo.