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

# Webhooks

> Receive signed HTTP POSTs when Fanhaven events happen.

Webhooks push events to your server so you do not have to poll. Manage endpoints from **Settings → API → Webhooks**.

## Setup

<Steps>
  ### Add an endpoint

  Enter an HTTPS URL and choose events, or `*` for every event.

  ### Save the signing secret

  The secret is shown once (and again if you rotate it). Store it with your integration.

  ### Verify signatures

  Each request includes `X-Fanhaven-Signature`: hex HMAC-SHA256 of the **raw body** using the signing secret. Also check `X-Fanhaven-Delivery` if you need an idempotency key.
</Steps>

## Payload

```json theme={null}
{
  "id": "whd_...",
  "type": "fan.created",
  "data": {},
  "created_at": "2026-08-26T12:00:00.000Z"
}
```

Headers:

| Header                 | Description                            |
| ---------------------- | -------------------------------------- |
| `Content-Type`         | `application/json`                     |
| `X-Fanhaven-Signature` | HMAC-SHA256 hex digest of the raw body |
| `X-Fanhaven-Delivery`  | Delivery ID                            |

## Events

| Event                  | Description                       |
| ---------------------- | --------------------------------- |
| `fan.created`          | A fan was created                 |
| `fan.updated`          | A fan record was updated          |
| `transaction.created`  | A sale was completed              |
| `transaction.refunded` | A sale was refunded               |
| `order.created`        | An inventory order was created    |
| `order.updated`        | An inventory order changed status |
| `event.created`        | A tour date was added             |
| `event.updated`        | A tour date was updated           |
| `campaign.sent`        | A campaign finished sending       |

<Info>Webhook event types are defined for fans, transactions, orders, events, and campaigns. Subscribe to the ones your integration needs.</Info>

## Delivery

* HTTP POST, 15 second timeout
* Non-2xx responses are retried up to 3 times
* Recent deliveries appear on the API page when you expand an endpoint

Return `2xx` as soon as you have accepted the payload. Do slower work asynchronously.
