Callbacks

Status callbacks

When an order's status changes we send an HTTP request to your callback URL, so you don't need to poll.

Setting the callback URL

Set a callback URL for each API key under “API”:

  • It must be a public https:// or http:// URL; HTTPS is recommended.
  • It can't point to private or local addresses.
  • Click “Test callback” to send a ping event.
  • “Callback log” shows the result of each delivery and lets you resend failed events.

Request format

HTTP
POST /your/callback HTTP/1.1
Content-Type: application/json
User-Agent: Speed-Webhook/1
X-SPEED-TIMESTAMP: 1763100000000
X-SPEED-SIGN: 5d0c6a...e9

{"event":"order.status","status":"COMPLETED","order":{"orderNo":"PX261115F9QFHKEU","clientOrderId":"shop-1001","status":"COMPLETED", ...}}

Event types

eventDescriptionPayload
order.statusOrder status changedstatus is the new status; order is the full Order object
pingTest push from the consoletimestamp
JSON
{
  "event": "order.status",
  "status": "COMPLETED",
  "order": {
    "orderNo": "PX261115F9QFHKEU",
    "clientOrderId": "shop-1001",
    "status": "COMPLETED",
    "receiveAmount": "0.01512518",
    "receiveFinal": true,
    "payoutTx": "b7a4...0d"
  }
}

Verifying the signature

Text
X-SPEED-SIGN = hex( HMAC-SHA256( Secret, X-SPEED-TIMESTAMP + raw request body ) )
  • Compute it over the raw body bytes — don't parse and re-serialize the JSON.
  • Compare signatures in constant time to avoid timing attacks.
  • Check that X-SPEED-TIMESTAMP is close to the current time (within 5 minutes is recommended) to prevent replays.
  • verifyWebhook in the SDKs does all of the above; see the Quickstart for examples.

Test vector: Secret sk_test_0123456789abcdef, timestamp 1700000000000, body {"event":"ping","timestamp":1700000000000} → signature f00bd1ef8c9f4c38f7eeef11938f047b54d360fd7802107012963838ec3292bb.

Responses and retries

  • Return any HTTP 2xx status within 10 seconds once processed.
  • On timeout or a non-2xx response we retry after 10 seconds, 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours.
  • After all retries fail, automatic delivery stops; you can resend from the “Callback log”.

Best practices

  • Acknowledge first, process later: return 2xx quickly and move slow work to a queue.
  • Be idempotent: each status of an order is sent once, but retries can deliver it more than once. Deduplicate on orderNo + status.
  • Don't rely on ordering: events can arrive out of order. Trust the full order payload and call Get order when in doubt.
  • Poll as a fallback: for unfinished orders with no callback for a while, look them up every 1–5 minutes.

Need help with your integration? Contact support: [email protected]