Get a commission token

Receiving a commission token to withdraw an orphan transaction

Get a commission token

POSThttps://ocp.onchainpay.io/api-gateway/orphan-deposits/withdrawal-token
Header parameters
Body
id*string

Transaction ID in the system

Example: "4994f081-9684-4f9f-a676-e62bae75f547"
Response
Body
success*boolean

Request success indicator

response*OrphanWithdrawalTokenResponse (object)

The body of the commission token response

Request
const response = await fetch('https://ocp.onchainpay.io/api-gateway/orphan-deposits/withdrawal-token', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "id": "4994f081-9684-4f9f-a676-e62bae75f547"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "response": {
    "currency": "BNB",
    "network": "ethereum",
    "feeSource": "ADVANCE",
    "blockchainFee": "0.00042",
    "blockchainFeeUSD": "0.063",
    "serviceFee": "0.01",
    "serviceFeeUSD": "0.01",
    "amount": {
      "type": "string",
      "example": "0.00612",
      "description": "<p>Transaction amount</p>",
      "__$markdownParsed": true
    },
    "amountTo": {
      "type": "string",
      "example": "0.00612",
      "description": "<p>Transaction amount</p>",
      "__$markdownParsed": true
    },
    "price": "1.1234",
    "token": "U2FsdGVkX1+Qhc+QAM7iF7ZSFG4mQ4BiGzOXCIRAxaQqUlvLMlePhvfmVcmaDhgun3br6eBXvMhYG/g5G4K+Oahb+ofK8+3qu/jaTI9oWkAAZWJ1/0UQsCOTZLzGVosDF40XU6/DbXbNusFohBD+hWmU2rX5yeBw/zTPFaoPm0hyn8yEmRa8+YakijMoTDjhao5UjzMYL4FT5CKBeNx2uA==",
    "expires": "2024-08-15T15:17:13.853Z"
  }
}

Last updated