# Webhooks overview (/docs/webhooks)

A **webhook** is an HTTP request Swop sends to a URL on your server when something happens. Instead of asking Swop "is it paid yet?" over and over, you register an endpoint once and Swop tells you.

## The two events [#the-two-events]

| Event | Fires when | What to do |
|---|---|---|
| [`checkout.paid`](/docs/webhooks/events#checkoutpaid) | The buyer's money arrived and the order exists | **Fulfil the order**: ship it, send the download, grant access |
| [`payout.released`](/docs/webhooks/events#payoutreleased) | Swop released **your** money (escrow released, or transfer sent) | **Book the revenue** |

<Callout type="warn" title="checkout.paid doesn't mean you've been paid">
For physical goods sold online, your payout is held in [escrow](/docs/payments/statuses-and-escrow) until the buyer confirms delivery. For card sales that can be days later. Ship on `checkout.paid`; count the money on `payout.released`.
</Callout>

There's also a `ping` event, sent only when you press **Send test** in the Developer page.

## How a delivery works [#how-a-delivery-works]

1. A sale crosses a milestone (paid, or payout released).
2. Within about a minute, Swop queues one delivery per webhook that subscribed to that event.
3. Swop `POST`s JSON to your URL with a `Swop-Signature` header.
4. Your server [verifies the signature](/docs/webhooks/verify-signatures), does its work, and returns any `2xx`.
5. Anything else (or no answer within 10 seconds) is [retried](/docs/webhooks/retries-and-dedup) with backoff.

## Set one up [#set-one-up]

<Cards>
  <Card title="Register an endpoint" href="/docs/webhooks/register-endpoint" description="Add your URL in the Swop app and save the signing secret." />
  <Card title="Verify signatures" href="/docs/webhooks/verify-signatures" description="Working Node and Python verifiers for Swop-Signature." />
  <Card title="Retries and de-duplication" href="/docs/webhooks/retries-and-dedup" description="Backoff schedule, pausing, and handling repeats." />
  <Card title="Event reference" href="/docs/webhooks/events" description="Every field of every payload." />
</Cards>
