Skip to content
Webhooks SDK
Esc
↑↓navigate↵open⌘Jpreview

Nitro

A webhook endpoint for any Nitro-powered framework — Nitro itself, Analog, SolidStart, TanStack Start.

Works for anything with Nitro server routes. Add a route file and wrap your handler:

import { createWebhookHandler } from 'webhooks-sdk'
import { stripe } from 'webhooks-sdk/stripe'
import { toNitroHandler } from 'webhooks-sdk/nitro'

const handler = createWebhookHandler({
  provider: stripe({ secret: process.env.STRIPE_WEBHOOK_SECRET! }),
  on: {
    'payment_intent.succeeded': async (event) => {
      await fulfill(event.payload.data.object)
    },
  },
})

export default defineEventHandler(toNitroHandler(handler))

That’s the whole integration. There is no body-parser to disable and no raw-body workaround: the adapter reads the untouched bytes, verifies the signature, and answers the provider — your on handlers get the parsed event envelope.

Nitro v2 (h3 v1) and Nitro v3 (h3 v2) are both supported from this one import — details on the h3 page if you’re curious.

Last updated on September 1, 2026

Was this page helpful?