A Nuxt module for Stripe, with local webhook testing support out of the box.
- ⛰ Use Stripe with Nuxt
- ⛰ Support local webhook testing out of the box.
- ⛰ Nuxt Devtools support to explore webhook events.
- Clone this repository
- Enable Corepack using
corepack enable - Install dependencies using
pnpm install - Run
pnpm dev:prepareto generate type stubs. - Use
pnpm devto start playground in development mode.
The classy MIT License
Version 4 is an upcoming major update that will introduces breaking changes.
- Webhook handler has been refactored.
The helper defineStripeWebhook is now stripeWebhookHandler, the second parameter has been removed, the callback how accept as its first parameter the StripeEvent and as its second parameter the context object.
// The new callback signature
type StripeWebhookHandler = (
event: Stripe.Event,
context: {
$event: H3Event
stripe: Stripe
}
)
=> any