Skip to Content
Athanor

Webhooks

The order's facts pushed to your endpoint as they happen, on the Standard Webhooks spec, signed with a key you can verify offline, retried for three days, replayable from Settings.

Polling the feed tells you what an order is; a webhook tells you the moment it changed. Register an endpoint for the events you want, verify it once, and every matching fact arrives as a signed POST.

Webhooks follow the Standard Webhooks spec, so any library that implements it verifies ours.

Events

TypeWhen
order.direction_issuedThe direction of investment was issued (or reissued).
order.direction_signedThe holder signed it.
order.lockedPrices locked; the funding clock started.
order.fundedThe custodian's funds landed.
order.releasedMetal released to delivery.
order.shippedThe wholesaler shipped.
order.deliveredThe depository confirmed receipt.
order.delivery_exceptionDelivery is late past the exception date.
order.cancelledThe order was cancelled, with its reason.

A custodian's facts are not published yet; webhooks are a dealer's.

The message

POST /your/endpoint
Content-Type: application/json
webhook-id: WHM_01KJ…
webhook-timestamp: 1796000000
webhook-signature: v2a,M2VhN2…
{
  "type": "order.locked",
  "timestamp": "2026-11-30T14:02:11.000Z",
  "data": {
    "id": "T3JkZXI6T1JEX…",
    "reference": "ATH-24-0912",
    "status": "locked",
    "action": "locked",
    "url": "https://app.athanor.trade/orders/T3JkZXI6…"
  }
}

data is thin: the order's global id (what OrderStatus takes), its reference, its status, and the action. Read the record for the rest; a webhook is a notice, not a copy.

Verifying

The signature is v2a: Ed25519 over endpoint_id.webhook_id.webhook_timestamp.payload, one key per environment. The public key is on Settings → API → Webhooks and at GET /api/webhooks/keys, prefixed whpk_. The endpoint id is the one given to you at registration; it is part of what is signed, so a message for one endpoint cannot be replayed at another.

Reject a message whose timestamp is more than five minutes from now, and treat webhook-id as the idempotency key: a retry carries the same id.

Registering

From Settings → API → Webhooks, or over the API with dealer:webhooks:manage:

mutation RegisterWebhook($input: RegisterWebhookInput!) {
  registerWebhook(input: $input) {
    id
    url
    events
    status
  }
}

The URL must be HTTPS, carry no credentials, and resolve to public addresses only; it is checked at registration and again before every send. The endpoint starts verifying: Athanor sends a request carrying a webhook-challenge header and no message, and the endpoint must answer 2xx with webhook-challenge-response set to the HMAC the spec defines over the challenge. Then it is active. VerifyWebhook runs the challenge again on demand.

Delivery and retries

An attempt has 20 seconds. 2xx is delivered. 410 disables the endpoint. 429, 502, 503 and 504 throttle, honouring Retry-After. Anything else, a 3xx included (redirects are never followed), is a failure.

After a failure the message is retried on the spec's schedule: 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 14 hours, 20 hours, 24 hours, about three days in all. After that it is set aside as dead. Settings → API → Webhooks shows every endpoint's recent deliveries and lets you replay a dead one, which puts it back at the start of the schedule.

Answering well

Answer 2xx as soon as the message is stored, before acting on it; a slow handler is a failed delivery. Handle a message twice without harm: the same webhook-id may arrive again after a retry. Order facts arrive in order from one endpoint, but read the record when in doubt rather than reconstructing state from notices.

On this page