Skip to main content

Create Bridge Transaction

Initiate a bridge transaction to on-ramp fiat to stablecoin or off-ramp stablecoin to fiat. Bridge transactions are processed in two phases: conversion and delivery.

Endpoint

POST /v1/bridge

Request Headers

HeaderRequiredDescription
X-API-KeyYesYour API key
Content-TypeYesapplication/json
Idempotency-KeyNoUnique identifier for idempotent retries

Request

curl -X POST https://api.thiqwave.com/v1/bridge \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unique_request_id" \
  -d '{
    "quote_id": "quote_5555555555",
    "direction": "onramp",
    "source_currency": "AED",
    "destination_currency": "USDC",
    "destination_network": "polygon",
    "destination_address": "0x742d35Cc6634C0532925a3b844Bc123e5fA42f9c",
    "amount": 100000,
    "metadata": {
      "user_id": "user_789"
    }
  }'

Request Body

FieldTypeRequiredDescription
quote_idstringYesQuote ID from a prior quote request. Locks in rates and fees.
directionstringYes"onramp" (fiat to stablecoin) or "offramp" (stablecoin to fiat).
source_currencystringYesFiat code (onramp) or stablecoin (offramp).
source_networkstringConditionalRequired if source is stablecoin (offramp). Blockchain network.
source_addressstringConditionalRequired if source is stablecoin. Wallet to debit.
destination_currencystringYesStablecoin (onramp) or fiat code (offramp).
destination_networkstringConditionalRequired if destination is stablecoin. Blockchain network.
destination_addressstringConditionalRequired if destination is stablecoin. Wallet to credit.
destination_accountobjectConditionalRequired if destination is fiat. Bank account object: account_holder, account_number, bank_code, country.
amountinteger (fiat) or string (stablecoin)YesAmount in appropriate unit.
metadataobjectNoKey-value pairs for your reference.

Response

{
  "bridge_id": "bridge_1234567890",
  "quote_id": "quote_5555555555",
  "status": "pending",
  "direction": "onramp",
  "source_currency": "AED",
  "source_amount": 100000,
  "destination_currency": "USDC",
  "destination_network": "polygon",
  "destination_address": "0x742d35Cc6634C0532925a3b844Bc123e5fA42f9c",
  "destination_amount": "959.00",
  "created_at": "2026-04-09T14:30:00Z",
  "completed_at": null
}

Response Fields

FieldTypeDescription
bridge_idstringUnique bridge transaction identifier.
quote_idstringAssociated quote ID.
statusstringCurrent status: pending, converting, completed, failed.
directionstring"onramp" or "offramp".
source_currencystringSource currency.
source_amountinteger | stringAmount in source currency.
destination_currencystringDestination currency.
destination_networkstring | nullDestination blockchain (if stablecoin).
destination_addressstring | nullDestination wallet (if stablecoin).
destination_accountobject | nullDestination bank account (if fiat).
destination_amountinteger | stringAmount in destination currency.
created_atstringISO 8601 timestamp of creation.
completed_atstring | nullISO 8601 timestamp of completion.

Bridge States

StatusDescription
pendingBridge transaction initiated.
convertingConversion in progress.
completedFunds converted and delivered to destination.
failedBridge failed. Check details for reason.

Notes

  • Ensure the quote is not expired before creating a bridge transaction.
  • For onramp, provide destination wallet or account details where stablecoins will be delivered.
  • For offramp, provide source wallet details where stablecoins will be debited.
  • Monitor bridge status via the Get Bridge Transaction endpoint or webhooks.