Async withdrawal
The method allows you to create a request to withdraw coins from an address and get the execution result to the specified webhookUrl
Header parameters
x-api-public-keystringOptional
Public API-key
x-api-signaturestringOptional
Signing the request body with a private API-key
Content-typestringOptionalExample:
Request content type
application/json
Body
Output request body
addressIdstringRequiredExample:
Identifier of the address from which the coins should be withdrawn
3632eaf6-402b-4479-9b3d-a54c9eba4c95
addressstringRequiredExample:
Address for sending coins
0x00000005707bf50efa35a2db020ede9ac08ae226
tagstring | nullOptional
Tag (memo) address (relevant for networks that support the tag, such as Ripple)
amountstringRequiredExample:
Withdrawal amount
123.12
feeTokenstringRequiredExample:
Fee token that was not created when requesting /request-fee
U2FsdGVkX18smjfTUAnbux+5Fdv0eMop4PX0LByZKvUB000NzQ2kbDBGJhsrG/2gBQg6tRbbHvXimkxosVvrpPcCLCuj+gK2FjFa+/C8Q4++pHpMS/YsZM1vlveCnRhHFMbLnrR9ueJalK9AbmSQN/KZB9L+FSOPtCcVrNwIDAU=
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.
webhookUrlstringOptionalExample:
URL to send webhook when output status changes
https://merchant.domain/webhooks/withdraw
Responses
200Success
application/json
post
POST /api-gateway/make-withdrawal-async HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 398
{
"addressId": "3632eaf6-402b-4479-9b3d-a54c9eba4c95",
"address": "0x00000005707bf50efa35a2db020ede9ac08ae226",
"tag": null,
"amount": "123.12",
"feeToken": "U2FsdGVkX18smjfTUAnbux+5Fdv0eMop4PX0LByZKvUB000NzQ2kbDBGJhsrG/2gBQg6tRbbHvXimkxosVvrpPcCLCuj+gK2FjFa+/C8Q4++pHpMS/YsZM1vlveCnRhHFMbLnrR9ueJalK9AbmSQN/KZB9L+FSOPtCcVrNwIDAU=",
"feeInAmount": true,
"webhookUrl": "https://merchant.domain/webhooks/withdraw"
}
200Success
{
"success": true,
"response": {
"id": "dd1c9cb6-3253-4949-a104-2da7aa799461",
"addressId": "3632eaf6-402b-4479-9b3d-a54c9eba4c95",
"currency": "USDT",
"network": "ethereum",
"tx": "null",
"status": "pending",
"address": "0x00000005707bf50efa35a2db020ede9ac08ae226",
"tag": null,
"amount": "123.12",
"feeCurrency": "0x00000005707Bf50EfA35a2db020eDe9Ac0780b9f",
"feeSource": "advanced_balance",
"feeAmount": "1.12",
"webhookUrl": "https://merchant.domain/webhooks/withdraw",
"createdAt": "2025-06-09T11:38:26.562Z"
}
}
Last updated