# order.cancelled webhook

> The order.cancelled webhook: an order your app heard placed was declined, cancelled or expired before it was served. Undo it in your records.

Source: https://tamr.link/docs/webhooks/order-cancelled

An order you were sent [`order.placed`](https://tamr.link/docs/webhooks/order-placed) for ended without being served: the team declined it before taking it (`declined`), cancelled it after (`cancelled`), the diner took it back before the team took it (`cancelled`, `by: "diner"`), or nobody took it in time (`expired`). Sent once per order, and only for an order whose `order.placed` you were sent.

Undo it in your own records: loyalty points, the order history, a refund your checkout owes. Never the reason staff typed. The waiter page also posts `order.cancelled` (`orderId`, `status`) to your app while the chat is open; from the SDK's next release it is typed in every SDK, and today it arrives through `on`.

## The `data` object

| Field | Type | Description |
| --- | --- | --- |
| `externalUserId` | string or null | 1 to 200 characters. |
| `orderId` | string | 1 to 200 characters. |
| `status` | string | One of `awaiting_payment`, `sent`, `accepted`, `served`, `declined`, `cancelled`, `expired`, `unknown`. An open list: read a value you don't know as `unknown`. |
| `by` | string | One of `restaurant`, `diner`, `time`, `unknown`. An open list: read a value you don't know as `unknown`. |

## Examples

order.cancelled:

```json
{
  "type": "order.cancelled",
  "timestamp": "2026-11-04T20:05:00.000Z",
  "livemode": true,
  "data": {
    "externalUserId": "user-88213",
    "orderId": "ord_01",
    "status": "declined",
    "by": "restaurant"
  }
}
```

The diner took the round back before the team took it.

order.cancelled:

```json
{
  "type": "order.cancelled",
  "timestamp": "2026-11-04T20:06:00.000Z",
  "livemode": true,
  "data": {
    "externalUserId": null,
    "orderId": "ord_02",
    "status": "cancelled",
    "by": "diner"
  }
}
```

A value Tamr adds later reads as unknown.

order.cancelled:

```json
{
  "type": "order.cancelled",
  "timestamp": "2026-11-05T04:00:00.000Z",
  "livemode": false,
  "data": {
    "externalUserId": "user-1",
    "orderId": "ord_03",
    "status": "expired",
    "by": "a-new-reason"
  }
}
```

## A test event

What **Send a test event** in the dashboard sends: `livemode: false`, and every id starting `test_`.

order.cancelled, test:

```json
{
  "type": "order.cancelled",
  "timestamp": "2026-11-16T12:00:00.000Z",
  "livemode": false,
  "data": {
    "externalUserId": "test_user",
    "orderId": "test_order",
    "status": "declined",
    "by": "restaurant"
  }
}
```
