Relay
SupportGet in TouchTry Relay
Relay PlatformAPI ReferenceRelayKitRelay ProtocolChangelog

Getting Started

What is Relay?How Relay Works

Solutions

Payment Service ProvidersWallets & Wallet ProvidersMultichain AppsChainsCommerce & Payments

Use Cases

Bridging & OnboardingSwapsCall Execution

Features

App FeesFee SponsorshipDeposit AddressesGas Top-UpGasless ExecutionFast FillGasless SwapsPrice StabilizationRouting Integration Models

Security

Transaction ScreeningUnsupported ExchangesBug Bounty ProgramMEV protectionCommunity SupportContract Audits

Resources

Supported ChainsIntegrating using AISupportBrand Assets

API Reference

API OverviewQuickstartApps, API keys, and Rate LimitsAccess TokensUnderstanding Step ExecutionWallet DetectionCost & Fee StructureRefundsInput ValidationTrade TypesSurplus & ShortageHandling Quote ErrorsHandling Rate LimitsHandling Execution ErrorsContract CompatibilityBridging Integration GuideCall Execution Integration GuideTransaction IndexingBase Builder CodesSmart Accounts in RelayTestnet SupportSolana SupportBitcoin SupportHyperliquid SupportLighter SupportDeep LinkingWebsocketsWebhooksMigrating to Requests v3Migrating to Currencies v2Migrating to Token Price v2Supported ChainsContract AddressesSupported Tokens & RoutesTroubleshootingGet QuoteSubmit PermitGet StatusGet RequestsGet Published RequestsGet ChainsGet Chains LiquidityGet CurrenciesGet Currency ClassificationsGet Token PriceTransactions IndexTransactions SingleDeposit Address ReindexGet App Fee BalancesGet Balance EventsClaim App FeesGet UsageFast FillGet Swap SourcesCreate Access TokenExecute Gasless TxsAttest DepositGet Recovery BalancesRequest WithdrawalGet Withdrawal StatusGet Requests (v2)Get PriceGet ConfigGet Execution StatusGet Currencies (v1)Get Token Price (v1)Get Quote

RelayKit

OverviewInstallationcreateClientgetQuoteexecutegetAppFeesclaimAppFeesfastFillexecuteGaslessBatchAdaptersTypescript API TypingsChain UtilsInstallationuseQuoteuseRelayChainsuseRequestsuseTokenListuseTokenPriceuseExecutionStatusInstallationRelayKitProviderSwapWidgetThemingTroubleshooting

Protocol

Relay ProtocolHow It WorksThe Relay ChainDepositoryDeposit AddressesOracleHubAllocatorSecurity CouncilSecurity & AuditsFor AppsProgrammatic WithdrawalsWithdrawing with a SafeOperate a Third-Party Relay OracleAddressesEVM Depository ReferenceSVM Depository ReferenceOverviewArchitectureSecurityRelay Vaults BackendBridgingInteracting with Relay VaultsWithdrawing from Relay VaultsRelayPoolFactoryRelayPoolRelayPoolNativeGatewayRelayBridgeFactoryRelayBridge

Changelog

Changelog
## Documentation Index Fetch the complete documentation index at: https://docs.relay.link/llms.txt Use this file to discover all available pages before exploring further.
## Agent Instructions To quote bridges and swaps, look up chains and tokens, or track Relay transactions from an agent, use the Relay MCP server: npx -y @relayprotocol/relay-mcp. It is read-only and does not sign or broadcast transactions. Setup: https://docs.relay.link/resources/developing-with-ai.md For Relay Protocol's trust model, security architecture, and audits, see https://docs.relay.link/references/protocol/security.md. For address screening, see https://docs.relay.link/security/transaction-screening.md.

Webhooks

Simplify your Integration with Low-Latency Relay Webhooks

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.

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:

  1. Sign in to the Relay Dashboard.
  2. Open Apps and select the App you want to configure.
  3. Open the Advanced tab. In the Webhooks section, click Configure.
  4. 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).
  5. Optionally add Custom Headers to include on every webhook request (e.g. Authorization: Bearer 0x123), then save.

Destination restrictions

Relay validates the webhook destination when you save a configuration and again at delivery time, so a configuration that passes save-time checks will still be refused on delivery if the hostname later resolves to a blocked address. Invalid configurations are rejected with a 400 from the save endpoint; invalid destinations detected at delivery time cause the event to be skipped and recorded in delivery logs.

URL requirements:

  • Must use the http or https scheme — other schemes are rejected.
  • Must not embed credentials (https://user:pass@host).
  • Must not resolve to a loopback, private, link-local, or otherwise reserved IP range. Every DNS answer for the hostname is checked at both save time and delivery time.
  • Redirects are not followed. Point the configured URL directly at the endpoint that should receive events.

Custom header restrictions:

  • Header names must match [A-Za-z0-9-]+, and header values must not contain carriage returns or line feeds.
  • The following headers cannot be set as custom headers, because they would override routing or HTTP framing: Host, Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, Proxy-Connection, TE, Trailer, Transfer-Encoding, Upgrade, Content-Length.
[!NOTE] If you host the receiving endpoint behind infrastructure that only exposes an internal-range IP, point the webhook at a publicly reachable gateway or proxy (for example, Hookdeck) rather than the internal host directly.

Webhook Events

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

statusindication
waitingwaiting for origin chain deposit
depositingorigin deposit confirmed via /execute API, fill pending
pendingorigin chain deposit confirmed, fill pending submission
submittedfill submitted on destination chain
successfill succeeded
failurefill failed
refundrefunded

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

{
  "event": "request.status.updated",
  "timestamp": 1774993296140,
  "data": {
    "status": "refund",
    "inTxHashes": [
      "0x..."
    ],
    "txHashes": [],
    "updatedAt": 1774993296121,
    "originChainId": 8453,
    "destinationChainId": 42161,
    "depositAddress": {
      "address": "0x..",
      "depositAddressType": "open", // open / strict
      "depositor": "0x..", //nullable
      "depositTxHash": "0x..", //nullable — origin-chain tx hash of the depositor's transfer into the deposit address
    }, //nullable
    "requestId": "0x...",
    "referrer": "your-referrer", //nullable — echoes the referrer supplied on the originating quote request
    "details": null,
    "failReason": "DOUBLE_SPEND",
    "refundFailReason": "N/A"
  }
}

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`:

FieldDescription
detailsAdditional status context (e.g. decoded revert data on failures). null when no extra detail is available.
failReasonReason a fill failed. Returns "N/A" on non-failure statuses. On failure, fallback, and refund statuses, returns the recorded reason or "UNKNOWN" when no specific reason is available. See `/intents/status/v3` for the enum.
refundFailReasonReason a refund leg failed. Defaults to "N/A" when no refund-leg failure is recorded. See `/intents/status/v3` for the enum.

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:

HeaderDescription
X-Signature-TimestampUnix timestamp of when the webhook was sent
X-Signature-SHA256HMAC-SHA256 signature of the request

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.

import crypto from 'crypto';

function verifyWebhook(req, apiKeys) {
  const timestamp = req.headers['x-signature-timestamp'];
  const signature = req.headers['x-signature-sha256'];
  const body = JSON.stringify(req.body);
  const signatureBuffer = Buffer.from(signature, 'hex');

  return apiKeys.some((apiKey) => {
    const expectedBuffer = crypto
      .createHmac('sha256', apiKey)
      .update(`${timestamp}.${body}`)
      .digest();

    return (
      signatureBuffer.length === expectedBuffer.length &&
      crypto.timingSafeEqual(signatureBuffer, expectedBuffer)
    );
  });
}

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.

This documentation is built and hosted on Mintlify, a developer documentation platform.

PreviousWebsocketsNextMigrating to Requests v3
Relay© 2026 Uneven Labs, Inc. All rights reserved.XGitHubSupport