ストアに Webhook エンドポイントを追加します。各ストアでは、すべてのチャネルにわたって最大 20 個の Webhook を持つことができます。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.
リクエストボディ
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
storeId | string | Yes | Store ID(Short ID フォーマット STO_xxx) |
channel | string | Yes | http、feishu、discord、telegram、slack のいずれか |
url | string | Yes | Webhook 送信先 URL(HTTPS。マーチャントは URL が選択したチャネルと一致することを保証) |
events | string[] | Yes | 購読するイベントタイプ — 例:["order.completed", "refund.succeeded"]。空配列の場合、この Webhook にはイベントが配信されません。 |
testMode | boolean | Yes | true = テストトランザクションで発火、false = 本番で発火 |
secret | string | null | No | チャネル固有の認証情報(例:Telegram の chat_id)。不透明なテキストとして保存されます。 |
リクエスト例
成功レスポンス (200)
返される
webhook.id は UUID であり、Short ID ではありません — Webhook ID は IdPrefix のスコープに含まれません。update-webhook および remove-webhook にはそのまま渡してください。レスポンスフィールド
| フィールド | 型 | 説明 |
|---|---|---|
id | string | Webhook UUID |
storeId | string | 所属ストアの UUID |
channel | string | Webhook チャネル(http、feishu、discord、telegram、または slack) |
url | string | 送信先 Webhook URL |
events | string[] | 購読するイベントタイプ |
testMode | boolean | true はテストトランザクションで発火、false は本番で発火 |
secret | string | null | チャネル固有の認証情報(不透明テキスト)、未設定の場合は null |
createdAt | string | 作成タイムスタンプ(ISO 8601) |
updatedAt | string | 最終更新タイムスタンプ(ISO 8601) |
エラーレスポンス
| ステータス | 説明 |
|---|---|
| 400 | channel が許可リストにない、url が有効な HTTPS URL でない、events が文字列配列でない、secret が string/null でない、またはストアの Webhook 数が既に 20 に達している |
| 403 | 呼び出し元がストアの owner または admin ではありません |