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.
从门店中移除 Webhook。该操作为硬删除 —— 记录会立即从 store.store_webhooks 中删除,无软删除标记。历史 webhook_deliveries 记录保留以供审计(storeWebhookId 外键被置为 null)。
POST /v1/actions/store/remove-webhook
认证方式: API Key(需要 owner 或 admin 角色)
请求体
| 字段 | 类型 | 必需 | 说明 |
|---|
id | string | 是 | Webhook UUID |
请求示例
import { WaffoPancake } from "@waffo/pancake-ts";
const client = new WaffoPancake({
merchantId: process.env.WAFFO_MERCHANT_ID!,
privateKey: process.env.WAFFO_PRIVATE_KEY!,
});
const { webhook } = await client.webhooks.remove({
id: "11111111-2222-3333-4444-555555555555",
});
// webhook 包含删除前的记录快照
成功响应 (200)
返回删除前一刻的 Webhook 实体(便于调用方确认所删除的内容)。结构与 add-webhook 相同。
响应字段
| 字段 | 类型 | 说明 |
|---|
id | string | Webhook UUID |
storeId | string | 所属门店的 UUID |
channel | string | Webhook 通道 |
url | string | 目标 Webhook URL |
events | string[] | 订阅的事件类型 |
testMode | boolean | true 对测试交易触发,false 对生产交易触发 |
secret | string | null | 通道特定凭据,未设置时为 null |
createdAt | string | 创建时间戳(ISO 8601) |
updatedAt | string | 最后更新时间戳(ISO 8601) |
错误响应
| 状态码 | 说明 |
|---|
| 400 | id 不是合法 UUID |
| 403 | 调用方不是该门店的 owner 或 admin |
| 404 | Webhook 不存在 |