Developers

Gateway HTTP API

The Gateway Kit and the TypeScript SDK wrap the same gateway contract documented here — supported-assets, gateway/start, the per-owner poll, plus the rate, quote, and balance endpoints. This page is the raw HTTPS reference; reach for the SDK when you want the same calls with typed models and an HttpClient underneath.

Reach for the raw API when you are not on React: a Vue, Svelte, or mobile frontend, a non-JavaScript backend, or any server-side service that provisions and polls the Gateway directly.

Note

Building a custom UI inside a React app? You don't need the raw API. The Gateway Kit runs headlessuseDeposit(), useDepositState(), useWithdraw() drive these same endpoints while you render your own UI, with no dialog markup shipped. See Headless integration and the live headless demo.

Request flow

Fetch the chain + token catalogue once, provision the UDA on wallet connect, then poll until the settlement is terminal.
  1. GET /v1/uda/supported-assets — once per session. Powers chain and token pickers with names, logos, and decimals before the user connects a wallet.
  2. POST /v1/gateway/start — once per wallet connect. Returns deposit addresses and accepted assets per source chain. Idempotent for the same owner + destination.
  3. GET /v1/gateway/<owner> — poll every ~2 seconds while a payment may be in flight. Stop when is_terminal === true.

Base URL and environments

EnvironmentBase URL
Sandbox / devhttps://api.stridge.dev
Productionhttps://api.stridge.com

Authentication

Every request must include your gateway key:

X-Gateway-Key: <your-gateway-key>

Create and rotate keys in the Stridge Dashboard.

Note

The gateway key is browser-safe. Unlike the server-only API key, it is designed to ship in client-side JavaScript — a public env var such as NEXT_PUBLIC_STRIDGE_GATEWAY_KEY is the intended pattern. Three Dashboard controls keep a public key safe to expose:

  • Origin allowlist — register the domains allowed to call the Gateway with this key. Requests from any other origin are rejected, so a copied key is useless from a site you don't control.
  • Whitelisted destination addresses — restrict settlement to a fixed set of addresses you approved.
  • Owner-pegged destination — when enabled, owner must be a wallet address and every destination.to_address must equal it, so the key can only ever settle funds back to the depositor's own wallet — never to an attacker's address.

Configure these in the Stridge Dashboard under the Gateway Kit connection settings; see Gateway Kit security for the full model. Proxying the calls through your own backend is still supported, but no longer required to keep the key safe.

GET /v1/uda/supported-assets (catalogue)

Purpose: Return every chain Stridge can route through and the tokens configured on each. Use this to build chain and token pickers before wallet connect — labels, logos, and decimals for the UI.

Request

GET /v1/uda/supported-assets
X-Gateway-Key: <your-gateway-key>

Response (200) — illustrative shape:

{
  "assets": [
    {
      "eip155_id": 56,
      "network_id": "9006",
      "network_name": "bsc",
      "network_symbol": "BSC",
      "native_currency": {
        "symbol": "BNB",
        "name": "BNB",
        "decimals": 18,
        "logo": "https://…/bnb.png"
      },
      "assets": [
        {
          "symbol": "USDT",
          "address": "0x55d398326f99059fF775485246999027B3197955",
          "decimals": 18,
          "name": "Tether USD",
          "logo": "https://…/usdt.png"
        }
      ]
    }
  ]
}

Naming gotcha: the outer assets array is a list of chains. Each chain has an inner assets array: the ERC-20 tokens on that chain. Same key name, two different meanings.

FieldMeaning
assets[i].eip155_idEIP-155 chain id (for example 56 for BSC).
assets[i].network_idStridge network id — use in destination.network_id for gateway/start.
assets[i].native_currencyNative gas token metadata (ETH, BNB, …).
assets[i].assets[j]A token row: use address + decimals for sends; logo + name in the UI.

POST /v1/gateway/start (provision the UDA)

Purpose: Create or fetch the Universal Deposit Address and per–source-chain deposit addresses for a given owner and destination. Idempotent on (owner, destination) — repeat calls return the same UDA.

Request

POST /v1/gateway/start
X-Gateway-Key: <your-gateway-key>
Content-Type: application/json
{
  "owner": "0x4bf2588cbCbcA8845B477E530A1392fd70CfBBDa",
  "destination": {
    "to_address": "0x4bf2588cbCbcA8845B477E530A1392fd70CfBBDa",
    "network_id": "9006",
    "asset_symbol": "USDT"
  }
}
FieldRequiredNotes
owneryesTypically the connected wallet; normalised to lowercase on the server.
destination.to_addressyesWhere funds ultimately settle (often the same as owner).
destination.network_idyesStridge network id of the destination chain (from the catalogue).
destination.asset_symbolyesDestination token symbol (for example USDT).
metadatanoOpaque JSON echoed on poll, ≤ 4 KB.

Response (200 existing or 201 created) — core fields:

{
  "data": {
    "uda_id": "uda_01HV3XW8QF5Z3CK1TQ8K4SCN5T",
    "owner": "0x4bf2588cbcbca8845b477e530a1392fd70cfbbda",
    "status": "active",
    "destination": { },
    "deposit_addresses": [
      {
        "eip155_id": "1",
        "network_name": "ethereum",
        "address": "0x9587…68cDB",
        "accepted_assets": [
          { "symbol": "USDC", "address": "0xA0b8…eB48", "decimals": 6 }
        ]
      }
    ]
  }
}

The same deposit address may repeat across EVM chains (deterministic for (tenant, owner)), but you should still show the entry for the chain the user pays from so the correct network is clear in the wallet. Match deposit_addresses[].eip155_id to the user's chosen source chain, then render address (QR, copy) and list accepted_assets.

GET /v1/gateway/<owner> (live status)

Purpose: Return the UDA, overall status, is_terminal, and a flat list of settlements (newest first).

Request

GET /v1/gateway/0x4bf2588cbcbca8845b477e530a1392fd70cfbbda
X-Gateway-Key: <your-gateway-key>

Polling: call about every 2 seconds while a transfer might be open; stop when is_terminal === true.

Matching the right settlement: settlements is full history for that UDA. If the user has sent before, settlements[0] is not always "this payment." After the user broadcasts, find the row where from.tx_id equals their transaction hash (case-insensitive).

const mine = data.settlements.find(
  (s) => s.from?.tx_id?.toLowerCase() === userTxHash.toLowerCase(),
)
if (!mine) {
  // Stridge has not indexed the deposit yet — keep polling.
}

UDA and settlement status

UDA-level status examples:

statusMeaning
idleNo deposits yet (settlements may be empty).
from_detectedSource transaction seen, not yet confirmed.
from_confirmedSource transaction confirmed.
routingStridge is choosing a path.
to_pending / to_fundedDestination leg in progress.
completedFlow finished; is_terminal is true.
failedTerminal failure; inspect settlement error.

Per-settlement fields you typically use: status, from.tx_id / from.network_name / from.asset_symbol / from.raw_amount, to.tx_id / settled_at, route.scenario / route.provider, events[] (timeline), and error when status === "failed".

route.scenario examples: same_chain_same_token, same_chain_diff_token, cross_chain_same_token, cross_chain_diff_token.

events (on the active settlement) may include types such as deposit.confirmed, settlement.created, settlement.routing, and settlement.completed — useful for granular UI steps.

End-to-end TypeScript

const BASE = 'https://api.stridge.dev' // or https://api.stridge.com
const key = process.env.STRIDGE_GATEWAY_KEY! // gateway key — browser-safe (see above)
const headers = {
  'X-Gateway-Key': key,
  'Content-Type': 'application/json',
} as const

// 1) Catalogue — cache for the session
const { assets: chains } = await fetch(`${BASE}/v1/uda/supported-assets`, {
  headers: { 'X-Gateway-Key': key },
}).then((r) => r.json())

// 2) After wallet connect — idempotent
const start = await fetch(`${BASE}/v1/gateway/start`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    owner: walletAddress,
    destination: {
      to_address: walletAddress,
      network_id: selectedDestinationNetworkId,
      asset_symbol: selectedDestinationSymbol,
    },
  }),
}).then((r) => r.json())

const uda = start.data
const fromChain = uda.deposit_addresses.find(
  (d) => d.eip155_id === String(selectedSourceEip155),
)

// 3) User sends to fromChain.address using an accepted asset or native token
// 4) Poll and match by tx hash
const poll = async () => {
  const { data } = await fetch(
    `${BASE}/v1/gateway/${encodeURIComponent(walletAddress)}`,
    { headers: { 'X-Gateway-Key': key } },
  ).then((r) => r.json())

  if (data.is_terminal) {
    // stop — inspect settlements for the latest terminal state
  }
  const mine = data.settlements?.find(
    (s) => s.from?.tx_id?.toLowerCase() === userTxHash.toLowerCase(),
  )
  return mine
}
Was this page helpful?