# Send store events to your server with webhooks
Add a webhook endpoint in Settings, choose its events, copy the signing secret, and see how Crate delivers and retries events.
A webhook sends an HTTP request to your server when something happens in your store, such as an order being paid. Your server can then update a spreadsheet, start a delivery or sync a license key, without asking Crate for changes on a timer.
Webhooks are included on every plan. Only the store owner and teammates who can manage settings can add them.
> [!IMPORTANT]
> Confirm your email address before you add a webhook. Until you do, Crate refuses with "Confirm your email address first, we sent a link to …".
## Before you start
You need an address on your server that:
- starts with `https://`,
- is reachable from the public internet,
- accepts `POST` requests with a JSON body, and
- answers within 10 seconds.
## Step 1: Open Webhooks
1. In your dashboard, open **Settings**.
2. Under **Developer**, choose **Webhooks**.
A store with no endpoints shows **No webhooks yet**.
```screenshot developers/webhooks-overview/01-webhooks-empty
alt: The Webhooks page in Settings with the empty state No webhooks yet and the Create webhook button
caption: Webhooks sits under Developer in Settings, next to API keys.
```
## Step 2: Add the endpoint
1. Click **Create webhook**.
2. In **URL**, enter your server's address.
3. Under **Webhook events**, tick the events you want. Leave every box empty to receive all events.
4. Click **Create webhook**.
```screenshot developers/webhooks-overview/02-create-webhook-dialog
alt: The Create webhook window with the URL field and the list of webhook events such as order.placed, order.paid and order.fulfilled, each with a checkbox
caption: Tick the events this endpoint needs, or none to get them all.
```
> [!NOTE]
> Some events in the list aren't sent yet. [Webhook events](/docs/developers/webhook-event-types) shows which ones Crate sends today.
## Step 3: Copy the signing secret
After you create the endpoint, a **Signing secret** box appears at the top of the page. It shows the secret once.
1. Click **Copy signing secret**.
2. Store the secret on your server, next to your other secrets.
Your server uses the secret to check that each request really came from Crate. [Verify webhook signatures](/docs/developers/verify-webhook-signatures) shows how.
```screenshot developers/webhooks-overview/03-signing-secret
alt: The Signing secret box above the webhook list, with the secret blurred and a Copy signing secret button
caption: The secret is shown once. Copy it before you leave the page.
```
Crate also emails the store owner that a webhook endpoint was added.
## Step 4: Manage the endpoint
Each endpoint appears as a card. The card shows the endpoint's host, an **Enabled** or **Disabled** badge, the full URL, its events, the number of deliveries, and when it was created.
Open the card's menu to:
- **Disable** the endpoint. Crate stops sending to it until you choose **Enable**.
- **Rotate signing secret**. Crate creates a new secret and shows it once. The old secret stops verifying straight away, so update your server right after.
- **Delete** the endpoint. It stops receiving events. This can't be undone.
```screenshot developers/webhooks-overview/04-webhook-card-menu
alt: A webhook card with its host name, the Enabled badge, the URL, events, delivery count and created time, with the menu open showing Disable, Rotate signing secret and Delete
caption: Disable, rotate the secret or delete from the card's menu.
```
## How delivery works
When an event happens, Crate sends a `POST` request with a JSON body to every enabled endpoint that subscribes to it. Each request carries these headers:
| Header | Meaning |
| --- | --- |
| `X-Crate-Topic` | The event, such as `order.paid`. |
| `X-Crate-Event` | A unique id for this event. It stays the same on every retry. |
| `X-Crate-Timestamp` | When the request was signed, in seconds since 1 January 1970. |
| `X-Crate-Signature` | The signature your server checks. |
Your server should answer with a `2xx` status. Crate treats other answers like this:
| Your server answers | What Crate does |
| --- | --- |
| `2xx` | Marks the delivery as delivered. |
| `5xx`, a timeout, or no connection | Retries, waiting longer each time, up to 5 attempts in all. |
| Any other status, such as `4xx` | Marks the delivery as failed and doesn't retry. |
> [!TIP]
> A retry can reach you more than once. Store each `X-Crate-Event` id you handle, and skip one you've already seen.
## Read attempt history
Open an endpoint, then select a delivery in its logs. The response summary shows the latest result. **Attempt history** shows up to ten latest recorded attempts from the past 90 days, including their time and HTTP code or error category. For example, a `503`, a response timeout and a later `200` stay separate even after the delivery succeeds.
An attempt is recorded when a delivery finishes with a response or a handled connection or destination error. A queue confirmation alone does not mean the endpoint received anything. A blocked destination can have an attempt recorded without an HTTP request being sent.
Older deliveries and gaps in recording can have no retained attempt details; Crate does not reconstruct missing outcomes from the latest summary. The attempt history does not store response bodies, request payloads, endpoint URLs or signing secrets. The delivery's existing **Request** section shows its recorded request separately.
## Troubleshooting
- **"Endpoint URL must be an https URL."** Use an address that starts with `https://`.
- **"Endpoint URL must be a public host."** or **"Endpoint URL must resolve to a public address."** The address points at a private network or your own computer. Use a public address.
- **"Endpoint URL must not contain credentials."** Remove the user name and password from the address.
- **Nothing arrives.** Check that the endpoint is **Enabled**, that it subscribes to the event, and that the event is one Crate sends today.
- **Requests arrive but fail the signature check.** Your server holds an old secret, or it changes the body before it checks it. See [Verify webhook signatures](/docs/developers/verify-webhook-signatures).
