[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Open Source](/c/open-source/45)

# Tern: A cross-platform webhook verification SDK for Next.js

31 views · 4 likes · 3 posts


Prateek32177 (@prateek32177) · 2026-03-09 · ♥ 1

Every webhook provider has a different signature algorithm, different header format, and different secret format. `Stripe` is not `GitHub` is not `Clerk` is not `Shopify`.

You end up writing the same verification boilerplate from scratch every single time.

## The Solution
Tern absorbs all of it. One SDK, 16+ providers, same pattern every time:

```tsx
import { createWebhookHandler } from '@hookflo/tern/nextjs'

export const POST = createWebhookHandler({
  platform: 'stripe',
  secret: process.env.STRIPE_WEBHOOK_SECRET!,
  handler: async (payload) => {
    return { received: true }
  },
})
```

Switch to `Clerk`? Change one word. Add `GitHub`? Change one word. Zero new boilerplate.

## Reliability Layer
**The part most libraries ignore**

What happens after verification? Your handler throws, the provider retries, events get lost, and customers end up in broken states.

Tern has an optional reliability layer — queue, automatic retries, dead letter queue, replay, and Slack or Discord alerts. All opt-in. No lock-in.

Zero dependencies. `MIT` licensed. Open source.

[github.com](https://github.com/Hookflo/tern)

![](upload://aoU7GVSIo1Lu5os9GxqHYPEGvtj.png)

### [GitHub - Hookflo/tern: Zero-dependency webhook signature verification and...](https://github.com/Hookflo/tern)

Zero-dependency webhook signature verification and reliability SDK

[tern.hookflo.com](http://tern.hookflo.com)


Amy Egan (@amyegan) · 2026-03-09 · ♥ 2

Nice idea! Thanks for sharing the repo


Selçuk Çukur (@selcukcukur) · 2026-03-17 · ♥ 1

Thanks for sharing the repo