Define and manage webhook subscriptions entirely in code.
const hp = await hookplane({
providers: {
stripe: {
provider: await stripeProvider({
apiKey: process.env['STRIPE_API_KEY']!,
}),
endpoint: 'https://example.com/hooks/stripe',
events: ['checkout.session.completed'],
endpointConfig: {
name: 'my_endpoint',
eventPayload: 'snapshot',
},
},
},
})Hookplane is 100% declarative.
No more keeping code in sync with dashboards.
Define, manage, and validate webhooks exactly where they’re handled.
Hookplane has end-to-end type safety so, LLMs can safely:
- add new webhook subscriptions
- update event handlers
- reason about real schemas
No MCP required.
Install hookplane and the Stripe provider through your favorite package manager.
npm install hookplane @hookplane/stripeCreate a hookplane.ts file anywhere you would otherwise keep your source files.
Replace <YOUR_ENDPOINT> with any URL you'd like.
// ./src/hookplane.ts
import { hookplane } from 'hookplane'
import { stripeProvider } from '@hookplane/stripe'
const hp = await hookplane({
providers: {
stripe: {
provider: await stripeProvider({
apiKey: process.env['STRIPE_API_KEY']!,
}),
endpoint: '<YOUR_ENDPONT>',
events: ['checkout.session.completed'],
endpointConfig: {
name: 'my_endpoint',
eventPayload: 'snapshot',
},
},
},
})
export default hpAdd an env file (or inject environment variables however you normally do)
echo STRIPE_API_KEY=<YOUR-STRIPE-API-KEY> >> .env.localTry out the hp command.
npx hp planPush your changes with the --bootstrap flag, since this is your first push.
npx hp push --bootstrapGo look at your Stripe dashboard.
You're subscribed to 'checkout.session.completed'.
Alpha: This library is in active development.
Features may not work as expected. APIs may change.