Creating a cross-chain translation

The method allows you to create a cross-chain transfer. Cross-chain transfer allows you to transfer your assets from one network to another

Creating a cross-chain translation

POSThttps://app.apollopayment.io/api-gateway/bridge/create
Header parameters
Body
advancedBalanceId*string

Identifier of the advance balance specified when creating the commission token

Example: "97ed074e-f6ce-441f-a1eb-1e3211e15f3f"
clientIdstring

Unique transaction identifier in the merchant system, to prevent duplication of creation

Example: "merchant_unique_id"
addressFromId*string

Identifier of the outgoing address in the system, in the specified coin and network when creating the commission token. The specified amount will be debited from this address

Example: "d479f3e4-8671-4028-9dee-0f0cdaea463d"
addressToId*string

Identifier of the destination address in the system where the coins should be delivered

Example: "f6211467-5322-49c4-9206-13bcfda87268"
feeToken*string

Commission Token

Example: "U2FsdGVkX1+ozqJO+xwuNpaUUwZCWExEe1UMME4ck6w/dSUEZW02gmNlHZxi3YDl7Xir8zY3SvHzz6YtK3YhBZJM6vO+eTa7zkUtwNtxRf52gV9J5wfKPQipvwXN+dkiveumH62q6GAfGn9YSyKbY17ybABxKvSEY8B1GXbjglHeaRzqPRwN7NOzl0ChU27WMeBEegQXy98hTJ2A8Kvbjers2pHWUntmNJJSS7wIr6g="
webhookUrlstring

URL address for operation status notification

Example: "https://merchant.domain/webhooks/bridge"
Response
Body
success*boolean

Request success indicator

response*BridgeResponse (object)

Response body of receiving data of cross-chain transfer operation

Request
const response = await fetch('https://app.apollopayment.io/api-gateway/bridge/create', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "advancedBalanceId": "97ed074e-f6ce-441f-a1eb-1e3211e15f3f",
      "addressFromId": "d479f3e4-8671-4028-9dee-0f0cdaea463d",
      "addressToId": "f6211467-5322-49c4-9206-13bcfda87268",
      "feeToken": "U2FsdGVkX1+ozqJO+xwuNpaUUwZCWExEe1UMME4ck6w/dSUEZW02gmNlHZxi3YDl7Xir8zY3SvHzz6YtK3YhBZJM6vO+eTa7zkUtwNtxRf52gV9J5wfKPQipvwXN+dkiveumH62q6GAfGn9YSyKbY17ybABxKvSEY8B1GXbjglHeaRzqPRwN7NOzl0ChU27WMeBEegQXy98hTJ2A8Kvbjers2pHWUntmNJJSS7wIr6g="
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "response": {
    "id": "f994d9a8-9ac4-4132-8499-e40e8d498288",
    "clientId": "merchant_unique_id",
    "advancedBalanceId": "97ed074e-f6ce-441f-a1eb-1e3211e15f3f",
    "currency": "USDT",
    "networkFrom": "ethereum",
    "networkTo": "tron",
    "status": "PENDING",
    "rejectMessage": null,
    "amount": "200",
    "amountUSD": "200",
    "blockchainFee": "2",
    "blockchainFeeUSD": "2.12",
    "serviceFeeUSD": "0.50",
    "webhookUrl": "https://merchant.domain/webhooks/bridge",
    "createdAt": "2024-10-15T16:11:27.601Z"
  }
}

Last updated