Withdraw Webhook Notification
CCPayment will post the webhook notification when the withdrawal was packed on blockchain.
Webhook notification
Content-Type
Y
string
application/json; charset=utf-8
Appid
202302010636261620672405236006912
Y
string
Merchant's unique credential. Find it on the Developer page.
Timestamp
1677152490
Y
string
Timestamp in seconds (10-digit). The request is valid for two minutes.
Sign
871f0223c66ea72435208d03603a0cb00b90f6ac4a4ba725d00164d967e291f6
Y
string
SHA-256 (appId + appSecret + timestamp+body (json string))
```json
{
"pay_status": "success",
"order_type": "API Withdrawal",
"order_id": "202307310832281685931420435083264",
"record_id": "202307310832281685931420447666176",
"withdraw_amount": "0.05",
"net_receivable": "0.05",
"network_fee": "0",
"network_fee_crypto":"USDT",
"network_coin_id":"8e5741cf-6e51-4892-9d04-3d40e1dd0128",
"network_fee_value":"0.12",
"chain": "POLYGON",
"contract": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
"crypto": "USDC",
"to_address": "9454818",
"memo": "",
"txid": "internal transfer",
"merchant_order_id": "1690792347702",
"merchant_pays_fee": false
}
```pay_status
string
Payment status: success, failed
order_type
string
API Withdrawal
order_id
string
CCPayment order id
record_id
string
Trading record: one transaction generates one unique record_id
withdraw_amount
string
Withdrawal amount, the amount will be deducted from the merchant account.
network_fee
string
Network fee.
network_coin_id
string
Coin ID for network fee crypto.
network_fee_value
string
Network fee value in usd.
net_receivable
string
Amount received by payee
chain
string
Chain for this transaction
contract
string
Contract
crypto
string
Crypto symbol
to_address
string
Destination address of withdrawal
memo
string
Memo/tag; unique identification for address
txid
string
Txid
merchant_order_id
string
Order ID in Merchant's system. A unique ID for every order
merchant_pays_fee
bool
Ture: the network fee charged from the merchant. False when not specified: the network fee charged from the user. The received amount = withdrawal amount- network fee
Return Appid, Sign, Timestamp in the header of the response. The signature method SHA-256 (appid+appSecret+Timestamp+body).
Please use the data with caution if the signature verification fails. It indicates that the data has been tampered with.
Example
$this->response->setString("success")this.response.setString("success");this.response.SetString("success")self.response.set_string("success")this.response.setString("success");
Due to scarce objective reasons, merchants may occasionally fail to receive webhook notifications. But such cases are extremely rare. If it involves a refund order, it is recommended that merchants confirm the actual notification delivery status first through the Order Information Interface API or the Webhook Notification Log to avoid misjudgment caused by missing notifications.
Last updated