Additional confirmation of the withdrawal
When creating a withdrawal from the payment acceptance widget, a webhook will be sent to the URL specified to confirm the withdrawal when creating the widget.
The body of the webhook will indicate the user who requested the withdrawal, the requested amount, the requested coins and recalculation to the coin selected for withdrawal. You can confirm or reject the output sent by the corresponding value in the request
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
idstringRequiredExample:
Auto-withdrawal ID
d2de09da-cec1-46b7-86d9-a344f4579df7
approvebooleanRequired
The flag of approval (true) or rejection (false) of the withdrawal request
Responses
200Success
application/json
post
POST /api-gateway/auto-withdrawals/approve HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"id": "d2de09da-cec1-46b7-86d9-a344f4579df7",
"approve": true
}
200Success
{
"success": true,
"response": {
"id": "d2de09da-cec1-46b7-86d9-a344f4579df7",
"organizationId": "da2fa0f7-3ac9-493e-b240-7e37555b1cfb",
"type": "WITHDRAWAL",
"status": "PENDING",
"message": null,
"addressRiskLevel": "Low",
"currencyFrom": "USDT",
"networkFrom": "bsc",
"currencyTo": "BTC",
"networkTo": "bitcoin",
"addressFromId": "25a8de42-a359-47f1-bb82-bc9f6c20f1b9",
"addressFrom": "0xD65D24ABCd85165a243C33Cf8133ffBaaa98255D",
"addressTo": "0x22aECc7ff5b435E38be5457C8538256918783F67",
"amountFrom": "1000",
"amountFromUSD": "1000",
"amountTo": "0.1",
"amountToUSD": "990",
"amountToReceive": "0.999",
"rate": "10000",
"blockchainFeeFrom": "0.34",
"blockchainFeeFromUSD": "0.34",
"blockchainFeeToSource": "ADVANCED",
"blockchainFeeTo": "0.001",
"blockchainFeeToUSD": "10",
"serviceFee": "10",
"txId": "0xadcc95b8bcd123e41612c46b057df889e32a73297e973c21e8b38046ac04130a",
"webhookUrl": "https://merchant.domain/webhooks/...",
"approveUrl": "https://merchant.domain/webhooks/...",
"approveResult": {
"apiKey": {
"id": "9d22fec0-c979-46a2-9a71-264e0c4cb75c",
"public": "c9jeO7OJcJb7cnBTVXrgtRzazf60W4Lbsz3/wOYM1m2EsJyZz5wGfbIIuoJ4Ugs6HMowQj8zlv2jf8Vt1ra4Fw=="
},
"request": {
"ip": "123.231.123.100",
"userAgent": "axios/1.6.0"
},
"approve": true,
"time": "2025-06-09T13:18:11.513Z"
},
"requestedClientId": "c2e0461d-344c-45ef-9418-456a678a9a5f",
"requestedCurrency": "EUR",
"requestedAmount": "5500",
"createdAt": "2025-06-09T13:18:11.513Z",
"updatedAt": "2025-06-09T13:18:11.513Z"
}
}
Last updated