Technical specifications for merchants to handle WaaS callback requests
// Request sent by WaaS to merchant’s callback URL
POST /your-callback-endpoint HTTP/1.1
Host: your-merchant-domain.com
Content-Type: application/x-www-form-urlencoded
X-API-KEY: merchant_api_key_12345
X-API-KEY
401 Unauthorized
if validation failsNote: This API Key is different from the key used by merchants to call WaaS APIs
HttpServletRequest
raw input stream for readingCommon error: Misusing request.getParameter(“data”)
will return null
The WaaS system sends event notifications to the callback URL configured by the merchant. Merchants need to correctly handle these callback requests. The encryption/decryption process is the same as when merchants call WaaS APIs, the main difference is in the way callback data is read.
Callback Type | Idempotency Key Composition | Explanation |
---|---|---|
Deposit Callback | (txid, chain, symbol, toAddress) combined hash | Resolves wrapped contract duplicate deposit issues |
Withdrawal Callback | txid | Globally unique transaction ID controlled by WaaS |
Other Callbacks | (type, trackingId, callBackId…) | All callback types must implement idempotency |
WaaS Tip: Do not use requestUUID that changes each time as idempotency key
Technical specifications for merchants to handle WaaS callback requests
// Request sent by WaaS to merchant’s callback URL
POST /your-callback-endpoint HTTP/1.1
Host: your-merchant-domain.com
Content-Type: application/x-www-form-urlencoded
X-API-KEY: merchant_api_key_12345
X-API-KEY
401 Unauthorized
if validation failsNote: This API Key is different from the key used by merchants to call WaaS APIs
HttpServletRequest
raw input stream for readingCommon error: Misusing request.getParameter(“data”)
will return null
The WaaS system sends event notifications to the callback URL configured by the merchant. Merchants need to correctly handle these callback requests. The encryption/decryption process is the same as when merchants call WaaS APIs, the main difference is in the way callback data is read.
Callback Type | Idempotency Key Composition | Explanation |
---|---|---|
Deposit Callback | (txid, chain, symbol, toAddress) combined hash | Resolves wrapped contract duplicate deposit issues |
Withdrawal Callback | txid | Globally unique transaction ID controlled by WaaS |
Other Callbacks | (type, trackingId, callBackId…) | All callback types must implement idempotency |
WaaS Tip: Do not use requestUUID that changes each time as idempotency key