What problem does it solve?
Provides secure, production-ready webhook handlers that reliably process Clerk event payloads and prevent unauthorized or malformed requests by enforcing signature verification and best practices for webhook reliability.
Core Features & Use Cases
- Complete, copy-paste-ready webhook handlers for Next.js App Router and Express that always perform signature verification using verifyWebhook(req) or Svix.
- Built-in handling examples for user events (user.created, user.updated, user.deleted), organization and organizationMembership events, and guidance for session and subscription events.
- Practical use cases include syncing users and org memberships to a database (Prisma examples), sending welcome emails via Resend, and posting notifications to Slack while ensuring idempotency and proper HTTP acknowledgements.
- Operational guidance to make webhook routes public from Clerk middleware, use raw request bodies for Express routes, and treat svix-id as an idempotency key to deduplicate retries.
Quick Start
Create a POST route at /api/webhooks that calls verifyWebhook(req), handles user.created to insert a user record into your database, and returns a 200 response to acknowledge receipt.