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: "368e742d-5780-412a-a406-d290a23f1e3b"
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: "8c666a6f-63b4-464e-ad9a-091373f9b761"
addressToId*string

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

Example: "8bf24590-3069-4413-8ef0-d917899ba945"
feeToken*string

Commission Token

Example: "U2FsdGVkX1/lmb19U5mmx4zaKT/kLCqtuckTpjMpBX8j4i5xY7Oyf9qAWbG6lNJh8p3IusOmpa3bjE5KLmPBlRnFX1ryhUZB9SOVl9Wy7lSFoqi3b8YKGrIKeannDG01OW7VSRCEYYivGxcFpl9qVzivBz3Mhx9VsPMG1l7n7s5Yj69HL0Xg1Vx/Kj4/MmvfLgsPxJQxFETCQmRcFLdyClnjg7kjvv7rZ6BMhWUXdho="
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": "368e742d-5780-412a-a406-d290a23f1e3b",
      "addressFromId": "8c666a6f-63b4-464e-ad9a-091373f9b761",
      "addressToId": "8bf24590-3069-4413-8ef0-d917899ba945",
      "feeToken": "U2FsdGVkX1/lmb19U5mmx4zaKT/kLCqtuckTpjMpBX8j4i5xY7Oyf9qAWbG6lNJh8p3IusOmpa3bjE5KLmPBlRnFX1ryhUZB9SOVl9Wy7lSFoqi3b8YKGrIKeannDG01OW7VSRCEYYivGxcFpl9qVzivBz3Mhx9VsPMG1l7n7s5Yj69HL0Xg1Vx/Kj4/MmvfLgsPxJQxFETCQmRcFLdyClnjg7kjvv7rZ6BMhWUXdho="
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "response": {
    "id": "6ee6cdaf-12e0-492b-a7f1-02ae6875fc06",
    "clientId": "merchant_unique_id",
    "advancedBalanceId": "368e742d-5780-412a-a406-d290a23f1e3b",
    "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-09-24T12:09:08.860Z"
  }
}

Last updated