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

Nuxt

A webhook endpoint in one server/api file — no body-parser config, no raw-body workaround.

Add a route file under server/api and wrap your handler:

import { createWebhookHandler } from 'webhooks-sdk'
import { stripe } from 'webhooks-sdk/stripe'
import { toNuxtHandler } from 'webhooks-sdk/nuxt'

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(toNuxtHandler(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.

Current Nuxt releases (h3 v1) and the Nitro v3 / h3 v2 line 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?