Configuring a Webhook
Webhooks are self-serve in the Relay Dashboard. Each App can have one webhook endpoint. Relay posts events to this endpoint for requests made with any API key in the App. To configure one:- Sign in to the Relay Dashboard.
- Open Apps and select the App you want to configure.
- Open the Advanced tab. In the Webhooks section, click Configure.
- Enable the webhook and enter your Webhook URL — an HTTPS endpoint to POST to when the status of a request changes (e.g.
https://my.server/receive-relay-event). - Optionally add Custom Headers to include on every webhook request (e.g.
Authorization: Bearer 0x123), then save.
Webhook Events
Relay Webhooks specifically stream transaction statuses for both cross and same-chain status, though the stages differ slightly.
Only
success and refund are final. A failure can still move back to pending on a retry or on to refund, so do not treat it as the last event for a request. See Get Status for the full lifecycle.
Example Payload
referrer field echoes the value supplied on the originating quote request, or null if no referrer was provided. Use it to attribute webhook events back to the request source (campaign, partner, or integration surface) without an extra lookup.
The details, failReason, and refundFailReason fields mirror the same fields returned by GET /intents/status/v3:
For deposit-address requests, events are sent under the
requestId that owns the fill. If Relay regenerates the quote, events carry the new requestId and nothing is sent for the quote-time one. Match these events to your order with depositAddress.address, and to the funding transfer with depositAddress.depositTxHash. See Tracking Transactions.
By default we post all status updates. If you’re only interested in certain statuses you can filter on the status property in your endpoint.
Verification
Each webhook request includes two headers for verification:
Relay signs each event with the API key used for the request. To verify a webhook is authentic, compute the HMAC-SHA256 hash of
${timestamp}.${body} using that API key as the secret, and compare it to the X-Signature-SHA256 header value.
The App’s webhook receives events for requests made with any active key in the App. Check the signature against each of these keys. During a key rotation, that means both the old and the new key. Relay stops sending events for a key’s requests once you deactivate it, including requests that are still in progress.
Example Verification
Webhook Delivery & Reliability
Relay’s built-in webhook service includes up to 10 retries with exponential backoff. For most integrations, this is sufficient. For production deployments requiring guaranteed delivery, routing, fan-out, or detailed observability, we recommend using a webhook gateway like Hookdeck. A gateway sits between Relay and your server, giving you:- Guaranteed delivery with configurable retry policies
- Routing & fan-out to multiple destinations from a single source
- Event inspection & replay for debugging
- Rate limiting to match your server’s capacity
endpoint and route events to your server from there. See Hookdeck’s getting started guide for setup instructions.