API reference
Every public entry point, what it exports, and where its contract is documented.
Each process imports only the entry point it needs. A receiver never loads database code, and only the two better-auth entry points import Better Auth, an optional peer.
good-webhooks:createWebhooks(), for management and delivery together on PostgreSQL.good-webhooks/delivery:createDelivery(), the sender alone, fed by anyEndpointSource.good-webhooks/management: the management contracts andcreateManagement()for custom storage.good-webhooks/management/postgres: standalone endpoint management without delivery tables.good-webhooks/better-auth: the Better Auth server plugin and trusted management provider.good-webhooks/better-auth/client: the Better Auth client plugin for browsers.good-webhooks/verify:parseWebhook()andverifyWebhook()for receivers.good-webhooks/migrations:getPostgresMigration(),getPostgresUpgrade(), and the SQL files.
Every expected failure is a WebhookError with a stable code.
Conventions
- Constructors validate options and return. They never open connections, apply migrations, or start workers.
- Database and provider failures can propagate as other error types.
- Trusted provider results use
Datevalues. Better Auth route responses use ISO strings. - Scope arguments are
nullfor application scope or{ type, id }for a named scope. Selecting a scope never authorizes the caller. See scopes.