> ## 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 Endpoints

> Manage webhook endpoints for HTTP, Feishu, Discord, Telegram, and Slack delivery

Pancake supports multiple webhook endpoints per store across five channels: standard HTTPS (RSA-signed envelope), Feishu, Discord, Telegram, and Slack. Each endpoint is an independent record in `store.store_webhooks` with its own URL, subscribed event list, and `test`/`prod` environment binding.

## Channels

| Channel    | Payload format                                                  | Signature                               | Notes                                                     |
| ---------- | --------------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------- |
| `http`     | JSON envelope `{ id, eventType, eventId, storeId, mode, data }` | RSA-SHA256 (`X-Waffo-Signature` header) | Default channel; preserves the existing webhook contract. |
| `feishu`   | Feishu interactive card                                         | None — URL token                        | Chinese title text, UTC+8 timestamp                       |
| `discord`  | Discord embed                                                   | None — URL token                        | English text, client-local timestamp                      |
| `telegram` | `sendMessage` payload (`text` HTML, `chat_id`)                  | None — bot token in URL                 | English text, UTC; `chat_id` stored in `secret`           |
| `slack`    | Attachments payload                                             | None — incoming-webhook URL token       | English text, UTC                                         |

## URL host

Any HTTPS URL is accepted regardless of channel. The merchant is responsible for matching the URL to the channel's expected platform — if a Discord URL is configured under `channel: "slack"`, the dispatcher will encode the payload in Slack's attachments format and send it to the Discord endpoint, which will respond with an error and the failure is recorded in `webhook_deliveries`.

## Multiple webhooks per URL

The same URL can be configured under multiple webhooks within a store — webhooks fan out, so different event subscriptions, channels, or `testMode` flags can share a URL. Each webhook delivers independently, which means consumers receiving identical payloads on a shared URL must dedupe by `(eventType, eventId)`.

## Limits

Each store may have at most **20 webhooks** across all channels. Exceeding the limit returns 400.

## Listing webhooks

There is no `list-webhooks` endpoint — querying the configured webhook list goes through GraphQL `Store.storeWebhooks` (filtered automatically by environment via `test_mode`):

```graphql theme={"system"}
query GetStoreWebhooks($storeId: String!) {
  store(id: $storeId) {
    storeWebhooks {
      id
      channel
      url
      events
      testMode
      secret
      createdAt
    }
  }
}
```

## Endpoints

<CardGroup cols={3}>
  <Card title="Add Webhook" icon="plus" href="/api-reference/endpoints/webhooks/add-webhook">
    Configure a new webhook endpoint for a store.
  </Card>

  <Card title="Update Webhook" icon="pen" href="/api-reference/endpoints/webhooks/update-webhook">
    Change a webhook's URL, events, or secret.
  </Card>

  <Card title="Remove Webhook" icon="trash" href="/api-reference/endpoints/webhooks/remove-webhook">
    Hard-delete a webhook (history retained).
  </Card>
</CardGroup>
