Methods
| Method | Description |
|---|---|
register(webhook) | Register a new webhook |
list() | List all registered webhooks |
get(id) | Get a webhook by ID |
update(id, webhook) | Update a webhook |
toggle(id) | Toggle a webhook on or off |
delete(id) | Delete a webhook |
listNotifications(params?) | List webhook notifications |
getNotification(id) | Get a specific notification |
Register a webhook
Thesecretis only returned onregister. Store it securely — you need it to verify incoming webhook signatures.
List webhooks
Update a webhook
Toggle a webhook
Enable or disable a webhook without deleting it:Delete a webhook
Notifications
List all notifications that have been sent to your webhooks:Signature verification
The SDK exports utilities to verify incoming webhook signatures using HMAC-SHA256 with timing-safe comparison.Signature header format
The webhook signature is sent in theOak-Signature header with the format:
Verify a signature
Verify and parse in one step
parseWebhookPayload combines signature verification with JSON parsing, returning a Result:
Express.js example
Always verify webhook signatures before processing payloads. Useexpress.raw()(notexpress.json()) to preserve the raw body for signature verification.
Webhook data types
RegisterRequest
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL to receive webhook events |
description | string | No | Human-readable description |
Webhook data (response)
| Field | Type | Description |
|---|---|---|
id | string | Webhook ID |
url | string | Registered URL |
description | string | Description |
secret | string | Signing secret (only on register) |
is_active | boolean | Whether the webhook is active |
Notification
| Field | Type | Description |
|---|---|---|
id | string | Notification ID |
event | string | null | Event type |
category | string | null | Event category |
data | any | Event payload |
is_acknowledged | boolean | Whether the notification was acknowledged |
Event types
TheWebhook.EventType type includes 75+ events across these namespaces:
customer.*— customer lifecycle eventsprovider_registration.*— provider registration eventspayment.*— payment lifecycle eventstransaction.*— transaction eventsdispute.*— dispute eventskyc.*— KYC verification eventstransfer.*— transfer eventssell.*— sell (off-ramp) eventsbuy.*— buy (on-ramp) events
Event categories
TheWebhook.Category type includes 12 categories:
payment_lifecycle, provider_registration_lifecycle, and others that group related events for filtering and routing.