> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tickable.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Receive real-time notifications for events in your organization

Webhooks let you receive HTTP POST requests when things happen in your Tickable account, like a new order or a scanned ticket.

## Supported Events

| Event              | Description                         | Status      |
| ------------------ | ----------------------------------- | ----------- |
| `order.created`    | A new order has been placed         | Coming soon |
| `order.confirmed`  | An order payment has been confirmed | Available   |
| `ticket.scanned`   | A ticket was scanned at the door    | Coming soon |
| `ticket.cancelled` | A ticket was cancelled              | Coming soon |

## Creating a Webhook

You can create webhooks via the API or from the [Tickable dashboard](https://app.tickable.nl/settings/developers).

```bash theme={null}
curl -X POST https://api.tickable.io/webhooks \
  -H "Authorization: Bearer tk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhook",
    "event_types": ["order.confirmed"],
    "description": "Production webhook"
  }'
```

<Warning>
  Your webhook endpoint must be publicly accessible and respond with a `2xx` status code within 10 seconds.
</Warning>

## Receiving Webhooks

When an event occurs, Tickable sends a POST request to your URL:

```json theme={null}
{
  "event_type": "order.confirmed",
  "timestamp": "2026-04-09T14:30:00Z",
  "data": {
    "order_id": "550e8400-e29b-41d4-a716-446655440000",
    "event_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
  }
}
```

### Example Handler

<CodeGroup>
  ```javascript Express theme={null}
  app.post('/webhook', express.json(), (req, res) => {
    const { event_type, data } = req.body;

    switch (event_type) {
      case 'order.confirmed':
        console.log('Order confirmed:', data.order_id);
        break;
    }

    res.sendStatus(200);
  });
  ```

  ```python Flask theme={null}
  @app.route('/webhook', methods=['POST'])
  def webhook():
      payload = request.get_json()
      event_type = payload['event_type']

      if event_type == 'order.confirmed':
          print(f"Order confirmed: {payload['data']['order_id']}")

      return '', 200
  ```
</CodeGroup>

## Managing Webhooks

### List All Webhooks

```bash theme={null}
curl https://api.tickable.io/webhooks \
  -H "Authorization: Bearer tk_live_YOUR_API_KEY"
```

### Delete a Webhook

```bash theme={null}
curl -X DELETE https://api.tickable.io/webhooks/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -H "Authorization: Bearer tk_live_YOUR_API_KEY"
```

## Best Practices

<Tip>
  Always respond quickly to webhook requests. If you need to do heavy processing, acknowledge the webhook with a `200` and process the data asynchronously.
</Tip>

* **Respond fast** — return `200` immediately, process in the background
* **Handle duplicates** — webhooks may be delivered more than once, use the event ID to deduplicate
* **Subscribe only to what you need** — reduce noise by selecting specific event types
