Introduction
Integration Guide
- Integration Preparation
- Core Mechanism
- API General Instructions
- Request Examples
- Response Examples
- Core Utility Classes
- Frequently Asked Questions
System Flowchart
Checkout
API List
Withdrawal Notification Callback
{
"tenantUserId": "1945",
"requestUUID": "00f2faf7-b705-4d65-9d82-0b6e372b92e4",
"txId": "598433d2fe70a2e944bbda8b517cca36e0cf7cfe49642b569e73cf1a641148cb",
"type": 3,
"chainName": "TRON",
"symbol": "USDT",
"amount": "2.500000000000",
"fromAddress": "TBmNNTP84QSRW8Dvb1aCBk7GmxQnNS5rAb",
"toAddress": "TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK",
"business": 0,
"callBackId": "250624392590001",
"newAddress": "TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK",
"trackingId": "102003"
}
{
"apiKey": "88c47568-8d24-4983-9b4c-y1ec8b939e9b",
"data": "{\"type\":3,\"callBackId\":\"250624392590001\",\"trackingId\":\"102003\",\"txId\":\"598433d2fe70a2e944bbda8b517cca36e0cf7cfe49642b569e73cf1a641148cb\",\"chainName\":\"TRON\",\"symbol\":\"USDT\",\"amount\":\"2.500000000000\",\"fromAddress\":\"TBmNNTP84QSRW8Dvb1aCBk7GmxQnNS5rAb\",\"toAddress\":\"TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK\",\"requestUUID\":\"00f2faf7-b705-4d65-9d82-0b6e372b92e4\",\"tenantUserId\":\"1945\"}",
"errCode": 0,
"message": ""
}
NOTIFY_WITHDRAW
(type=3)
When a user completes a withdrawal operation through WaaS, WaaS will notify you of the withdrawal details through this callback. The merchant needs to confirm in the response whether this callback has been accepted.
Request Parameters
The request sent by WaaS is an RSA-encrypted Base64 string. Merchants need to decrypt it using their public key to obtain the following business parameters:
Callback type, withdrawal callback=3
Blockchain transaction hash
Chain name, e.g., TRON, ETH, BSC…
Token symbol, e.g., USDT, USDC, PHT…
Actual withdrawal amount
Withdrawal source address
Withdrawal target address
callBackId carried by merchant when requesting withdrawal. Note: Merchant must ensure its uniqueness
New address, replaces toAddress when type=4
Response Parameters
After processing the callback, merchants need to return a JSON-formatted response body. The data
field must return an RSA-encrypted Base64 string (encrypted using the public key provided by WaaS), while other fields are in plain text:
Merchant API key
Encrypted business data, e.g.: BDn6Liv5Z4TJ9vjfd (refer to example on right)
Generated by encrypting the following raw business parameters:
type (Integer) : Callback type
callBackId : Merchant must return callBackId to help WaaS with secondary confirmation
trackingId (String) : Business event identifier
txId (String) : Blockchain transaction hash
chainName (String) : Blockchain name
symbol (String) : Token symbol
amount (Integer) : Withdrawal amount
fromAddress (String) : Withdrawal source address
toAddress (String) : Withdrawal target address
requestUUID (String) : Unique request identifier, merchant must return the same requestUUID in response to help WaaS confirm
tenantUserId (String) : User ID initiating withdrawal (in merchant system, not WaaS system)
Global processing status code:
0
=Success, non-0
=Failure
Error details (required when failed):
- Can return empty string when successful
- Must describe specific error when failed
{
"tenantUserId": "1945",
"requestUUID": "00f2faf7-b705-4d65-9d82-0b6e372b92e4",
"txId": "598433d2fe70a2e944bbda8b517cca36e0cf7cfe49642b569e73cf1a641148cb",
"type": 3,
"chainName": "TRON",
"symbol": "USDT",
"amount": "2.500000000000",
"fromAddress": "TBmNNTP84QSRW8Dvb1aCBk7GmxQnNS5rAb",
"toAddress": "TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK",
"business": 0,
"callBackId": "250624392590001",
"newAddress": "TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK",
"trackingId": "102003"
}
{
"apiKey": "88c47568-8d24-4983-9b4c-y1ec8b939e9b",
"data": "{\"type\":3,\"callBackId\":\"250624392590001\",\"trackingId\":\"102003\",\"txId\":\"598433d2fe70a2e944bbda8b517cca36e0cf7cfe49642b569e73cf1a641148cb\",\"chainName\":\"TRON\",\"symbol\":\"USDT\",\"amount\":\"2.500000000000\",\"fromAddress\":\"TBmNNTP84QSRW8Dvb1aCBk7GmxQnNS5rAb\",\"toAddress\":\"TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK\",\"requestUUID\":\"00f2faf7-b705-4d65-9d82-0b6e372b92e4\",\"tenantUserId\":\"1945\"}",
"errCode": 0,
"message": ""
}
{
"tenantUserId": "1945",
"requestUUID": "00f2faf7-b705-4d65-9d82-0b6e372b92e4",
"txId": "598433d2fe70a2e944bbda8b517cca36e0cf7cfe49642b569e73cf1a641148cb",
"type": 3,
"chainName": "TRON",
"symbol": "USDT",
"amount": "2.500000000000",
"fromAddress": "TBmNNTP84QSRW8Dvb1aCBk7GmxQnNS5rAb",
"toAddress": "TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK",
"business": 0,
"callBackId": "250624392590001",
"newAddress": "TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK",
"trackingId": "102003"
}
{
"apiKey": "88c47568-8d24-4983-9b4c-y1ec8b939e9b",
"data": "{\"type\":3,\"callBackId\":\"250624392590001\",\"trackingId\":\"102003\",\"txId\":\"598433d2fe70a2e944bbda8b517cca36e0cf7cfe49642b569e73cf1a641148cb\",\"chainName\":\"TRON\",\"symbol\":\"USDT\",\"amount\":\"2.500000000000\",\"fromAddress\":\"TBmNNTP84QSRW8Dvb1aCBk7GmxQnNS5rAb\",\"toAddress\":\"TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK\",\"requestUUID\":\"00f2faf7-b705-4d65-9d82-0b6e372b92e4\",\"tenantUserId\":\"1945\"}",
"errCode": 0,
"message": ""
}