SDK
Adapter Options
Shared adapter options for secrets, limits, and success callbacks.
Adapter Options
All adapters support the same core options.
| Option | Type | Description |
|---|---|---|
secret | string | Secret used for signature verification. Overrides provider/env defaults. |
maxBodyBytes | number | Optional body-size guard. Returns 413 when exceeded. |
onSuccess | (eventType: string) => void | Promise<void> | Called after a successful 200 acknowledgement with body.ok === true (including ignored duplicates, excluding verified-but-unhandled 200 acknowledgements such as Resend). |
Secret resolution order
When verifying signatures, secret lookup order is:
- Adapter options
- Provider options
- Environment variables (
<PROVIDER>_WEBHOOK_SECRET, thenWEBHOOK_SECRETas a fallback; for exampleGITHUB_WEBHOOK_SECRETorRESEND_WEBHOOK_SECRET)
Keep framework and edge/proxy body limits configured in addition to maxBodyBytes.
Canonical reference: Adapters