Skip to main content
Building applications at scale requires integrating with Relay’s system at instant speed. Rather than polling the API for status updates, webhooks push transaction lifecycle events directly to your server the moment they happen. Configure a webhook endpoint and Relay will notify your backend in real time as quotes are processed — lightweight, no polling, low latency.

Integrating Relay Webhooks

Each API key can have a single webhook endpoint configured. In order to configure a webhook you’ll need the following: Once you have this information reach out to Relay to configure your API key with a webhook endpoint.

Webhook Events

Relay Webhooks specifically stream transaction statuses for both cross and same-chain status, though the stages differ slightly.

Example Payload

The 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: 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: To verify a webhook is authentic, compute the HMAC-SHA256 hash of ${timestamp}.${body} using your API key as the secret, and compare it to the X-Signature-SHA256 header value.
Example Verification
Requests that fail verification should be rejected with a non-2xx status code.

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
To set this up, use your Hookdeck ingestion URL as the Relay webhook endpoint and route events to your server from there. See Hookdeck’s getting started guide for setup instructions.