Add a webhook endpoint to a store. Each store can have up to 20 webhooks across all channels.Documentation Index
Fetch the complete documentation index at: https://docs.waffo.ai/llms.txt
Use this file to discover all available pages before exploring further.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
storeId | string | Yes | Store ID (Short ID format STO_xxx) |
channel | string | Yes | One of http, feishu, discord, telegram, slack |
url | string | Yes | Target webhook URL (HTTPS; merchant ensures URL matches the chosen channel) |
events | string[] | Yes | Subscribed event types — e.g. ["order.completed", "refund.succeeded"]. Empty array means no events fire to this webhook. |
testMode | boolean | Yes | true = fires for test transactions; false = fires for production |
secret | string | null | No | Channel-specific credential (e.g. Telegram chat_id). Stored as opaque text. |
Example Request
Success Response (200)
The returned
webhook.id is a UUID, not a Short ID — webhook IDs are not in the IdPrefix scope. Pass it as-is to update-webhook and remove-webhook.Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Webhook UUID |
storeId | string | Owning store UUID |
channel | string | Webhook channel (http, feishu, discord, telegram, or slack) |
url | string | Target webhook URL |
events | string[] | Subscribed event types |
testMode | boolean | true for test transactions, false for production |
secret | string | null | Channel-specific credential (opaque text), null if unset |
createdAt | string | Creation timestamp (ISO 8601) |
updatedAt | string | Last update timestamp (ISO 8601) |
Error Responses
| Status | Description |
|---|---|
| 400 | channel not in the allowed list, url not a valid HTTPS URL, events not a string array, secret not string/null, or store already has 20 webhooks |
| 403 | Caller is not an owner or admin of the store |