(DEPRECATED) Sync withdraw

DEPRECATED

This method is deprecated due to unreliability and long waiting time for the operation, the method will be disabled in the future

The method allows you to create a request to withdraw coins from an address

(DEPRECATED) Sync withdraw

post
Header parameters
x-api-public-keystringOptional

Public API-key

x-api-signaturestringOptional

Signing the request body with a private API-key

Content-typestringOptional

Request content type

Example: application/json
Body

Withdrawal request body

addressIdstringRequired

Identifier of the address from which the coins should be withdrawn

Example: 258e95ed-a3c2-4c85-bf6f-09f8b8f1c0be
addressstringRequired

Address for sending coins

Example: 0x00000005707bf50efa35a2db020ede9ac08ae226
tagstring | nullOptional

Tag (memo) address (relevant for networks that support the tag, such as Ripple)

amountstringRequired

Withdrawal amount

Example: 123.12
feeTokenstringRequired

Fee token that was not created when requesting /request-fee

Example: U2FsdGVkX1+vPIiq/7dwkv3tpvPiGUKv3S6HZWEtQtNk/L3Ohew8fIzUoFTKRPv6kdl2Zs4n8vZKfWfAYCa+UI8SSG+yfiwf8qiQW600rVGUdvD10Mm0CTklhd8ZZqcnz9Z9bUGm8OnatpXLrAx1uPhVoUdKwKQ/Xs1Vzmkjj3Y=
feeInAmountbooleanOptional

(Relevant for withdrawing coins) Deduct the network commission from the withdrawal amount or from the payer's funds. By default, the network commission is deducted from the withdrawal amount.

Responses
200Success
application/json
post
POST /api-gateway/make-withdrawal HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 341

{
  "addressId": "258e95ed-a3c2-4c85-bf6f-09f8b8f1c0be",
  "address": "0x00000005707bf50efa35a2db020ede9ac08ae226",
  "tag": null,
  "amount": "123.12",
  "feeToken": "U2FsdGVkX1+vPIiq/7dwkv3tpvPiGUKv3S6HZWEtQtNk/L3Ohew8fIzUoFTKRPv6kdl2Zs4n8vZKfWfAYCa+UI8SSG+yfiwf8qiQW600rVGUdvD10Mm0CTklhd8ZZqcnz9Z9bUGm8OnatpXLrAx1uPhVoUdKwKQ/Xs1Vzmkjj3Y=",
  "feeInAmount": true
}
200Success
{
  "success": true,
  "response": {
    "id": "f2ca718f-cda4-4d0f-be0f-dd9c578c63b9",
    "addressId": "258e95ed-a3c2-4c85-bf6f-09f8b8f1c0be",
    "currency": "USDT",
    "network": "ethereum",
    "tx": "0xb502e6ba8745a99f3484d75c027c55cacc26d6342b3a129f97d802899435ef12",
    "status": "pending",
    "address": "0x00000005707bf50efa35a2db020ede9ac08ae226",
    "tag": null,
    "amount": "123.12",
    "feeCurrency": "0x00000005707Bf50EfA35a2db020eDe9Ac0780b9f",
    "feeSource": "advanced_balance",
    "feeAmount": "1.12",
    "createdAt": "2025-06-09T13:18:11.522Z"
  }
}

Last updated