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
Deposit Notification Callback
{
"requestUUID": "fbd70fb4-c302-4228-bd61-6326e0539551",
"chainName": "TRON",
"symbol": "TRX",
"amount": "2.500000000000",
"business": 0,
"toAddress": "TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP",
"fromAddress": "TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK",
"riskLevelTo": 3,
"riskLevelFrom": 3,
"txId": "b00a4aa3d6426f6409a83ae72a79de5b559a2c339ebc89b8b75427c2600978e3",
"tenantUserId": "2049",
"type": 1,
"txIndex": -1,
"newAddress": "TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP",
"trackingId": "6484"
}
{
"apiKey": "88c47568-8d24-4983-9b4c-y1ec8b939e9b",
"data": "{\"type\":1,\"callBackId\":null,\"trackingId\":\"6484\",\"state\":null,\"txId\":\"b00a4aa3d6426f6409a83ae72a79de5b559a2c339ebc89b8b75427c2600978e3\",\"txIndex\":-1,\"chainName\":\"TRON\",\"symbol\":\"TRX\",\"amount\":\"2.500000000000\",\"fromAddress\":\"TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK\",\"toAddress\":\"TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP\",\"tenantType\":null,\"requestUUID\":\"fbd70fb4-c302-4228-bd61-6326e0539551\",\"tenantUserId\":\"2049\"}",
"errCode": 0,
"message": ""
}
NOTIFY_DEPOSITED
(type=1)
When a user deposits digital currency into their deposit address in WaaS, WaaS will notify you of the deposit details through this callback. The merchant needs to inform WaaS 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:
Blockchain transaction hash
Chain name, e.g., TRON, ETH, BSC…
Token symbol, e.g., USDT, USDC, PHT…
Deposit amount
Deposit source address (user’s external address)
Deposit target address (user’s deposit address in WaaS)
Source address risk score (0-100)
Target address risk score (0-100)
Transaction index
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’s unique API identifier
Encrypted business data, e.g.: i2H9eQf22gLnJoTeo1WbWVR6wmNv (refer to example on right)
Generated by encrypting the following raw business parameters:
type (Integer) : Callback type
trackingId (String) : Business event identifier
txId (String) : Blockchain transaction hash
txIndex (Integer) : Transaction sequence number in block
chainName (String) : Blockchain name
symbol (String) : Token symbol
amount (Integer) : Deposit amount
fromAddress (String) : Deposit source address
toAddress (String) : Deposit target address
requestUUID (String) : Unique request identifier, merchant must return the same requestUUID in response to help WaaS confirm
tenantUserId (String) : User ID initiating deposit (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
{
"requestUUID": "fbd70fb4-c302-4228-bd61-6326e0539551",
"chainName": "TRON",
"symbol": "TRX",
"amount": "2.500000000000",
"business": 0,
"toAddress": "TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP",
"fromAddress": "TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK",
"riskLevelTo": 3,
"riskLevelFrom": 3,
"txId": "b00a4aa3d6426f6409a83ae72a79de5b559a2c339ebc89b8b75427c2600978e3",
"tenantUserId": "2049",
"type": 1,
"txIndex": -1,
"newAddress": "TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP",
"trackingId": "6484"
}
{
"apiKey": "88c47568-8d24-4983-9b4c-y1ec8b939e9b",
"data": "{\"type\":1,\"callBackId\":null,\"trackingId\":\"6484\",\"state\":null,\"txId\":\"b00a4aa3d6426f6409a83ae72a79de5b559a2c339ebc89b8b75427c2600978e3\",\"txIndex\":-1,\"chainName\":\"TRON\",\"symbol\":\"TRX\",\"amount\":\"2.500000000000\",\"fromAddress\":\"TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK\",\"toAddress\":\"TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP\",\"tenantType\":null,\"requestUUID\":\"fbd70fb4-c302-4228-bd61-6326e0539551\",\"tenantUserId\":\"2049\"}",
"errCode": 0,
"message": ""
}
{
"requestUUID": "fbd70fb4-c302-4228-bd61-6326e0539551",
"chainName": "TRON",
"symbol": "TRX",
"amount": "2.500000000000",
"business": 0,
"toAddress": "TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP",
"fromAddress": "TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK",
"riskLevelTo": 3,
"riskLevelFrom": 3,
"txId": "b00a4aa3d6426f6409a83ae72a79de5b559a2c339ebc89b8b75427c2600978e3",
"tenantUserId": "2049",
"type": 1,
"txIndex": -1,
"newAddress": "TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP",
"trackingId": "6484"
}
{
"apiKey": "88c47568-8d24-4983-9b4c-y1ec8b939e9b",
"data": "{\"type\":1,\"callBackId\":null,\"trackingId\":\"6484\",\"state\":null,\"txId\":\"b00a4aa3d6426f6409a83ae72a79de5b559a2c339ebc89b8b75427c2600978e3\",\"txIndex\":-1,\"chainName\":\"TRON\",\"symbol\":\"TRX\",\"amount\":\"2.500000000000\",\"fromAddress\":\"TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK\",\"toAddress\":\"TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP\",\"tenantType\":null,\"requestUUID\":\"fbd70fb4-c302-4228-bd61-6326e0539551\",\"tenantUserId\":\"2049\"}",
"errCode": 0,
"message": ""
}