Skip to main content

Notification message

Set callback URL

Request URL:

http://wallet.unn.com:8080/v2/wallet/config

Request method: POST

Header

parametertyperequireddescription
tokenstringtrueAccess Token

Request parameters

parametertyperequireddescription
callbackstringtruecallback address

Request Example

curl --location 'http://wallet.unn.com:8080/v2/wallet/config' \
--header 'token: service.eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMHhBNTZhQThiN0YzRmIwNDEzZEE0MTc1MjdDOWIwQzkzOUM4MDI0NEU5IiwiZW50ZXJwcmlzZV9saXN0IjpbeyJjaGFpbiI6IkVSQzIwIiwiY29udHJhY3RfYWRkciI6IjB4YzI3MTkzNTE1ODAwRjhiMTVBYzE5Qjc5MEJiNTFkODA0M2U2QmI5MiIsImVudGVycHJpc2UiOiI2NGYyOTc0YjhkZDg5NGJjNjExNWUyNjAiLCJpc19vd25lciI6ZmFsc2UsInBlcm1pc3Npb24iOlsxXSwiaWQiOiI2NTAxMTE1MmQyNjhhMTZmMGZhMTEwMjkifSx7ImNoYWluIjoiVFJDMjAiLCJjb250cmFjdF9hZGRyIjoiVENtRkhNdzk4aEE3em1HRVBmVWh4WEZjakJLaEphQ01uaCIsImVudGVycHJpc2UiOiI2NGYyOTc0YjhkZDg5NGJjNjExNWUyNjAiLCJpc19vd25lciI6ZmFsc2UsInBlcm1pc3Npb24iOlsxXSwiaWQiOiI2NTAxMTE1MmQyNjhhMTZmMGZhMTEwMjkifV0sImNyZWF0ZVRpbWUiOjE2OTUyNjMzNjYsImV4cCI6MTY5Nzg1NTM2NiwiYWNjb3VudF9uYW1lIjoiIn0.dkGAMfHMR6YQZjSMsxxLb-aCwn55FjyF7RIn_ebo7Yg' \
--header 'Content-Type: application/json' \
--data '{
"body": {
"callback": "http://43.198.64.79:30104/unn_pay/notify"
}
}'

return parameters

parameter nametypedescription
idstringID

Back to example

{
"code": 200,
"message": "success",
"data": {
"entity": {
"id": "64901a10a859a3412833ba1a"
}
}
}

message format

Test Message

message format

parametertyperequireddescription
typeinttrueMessage type: 0-Test message, 1-deposit notification, 2-withdrawal notification
content_typestringtruejson
contentdicttruemessage content
--heartbeatinttrueheartbeat timestamp

message example

{
"type": 0,
"content_type": "json",
"content": {
"heartbeat": 1695697870
}
}

Deposit Notification

message format

parametertyperequireddescription
typeinttrueMessage type: 0-Test message, 1-deposit notification, 2-withdrawal notification
content_typestringtruejson
contentdicttruemessage content
--merchant_idstringtrueMerchant ID
--uidstringtrueUser ID
--txn_idstringtrueTransaction ID
--chainstringtrueERC20/TRC20
--from_addrstringtruepayment address
--to_addrstringtruetransfer address
--valuestringtrueamount of local currency to transfer
--token_addrstringtruetransfer token contract address
--token_valuestringtruetransfer token quantity
--statusstringtrue1-pending,2-success,3-failed
--exchangedicttrueexchange data

message example

{
"type": 0,
"content_type": "json",
"content": {
"merchant_id": "6510f473dd0e3494c90c72fa",
"uid": "2b063E",
"txn_id": "0x7aff9094356518b3eadadab4cce701f8040d79ba2c79d0c2451982fa3d61e94c",
"chain": "ERC20",
"from_addr": "0x52C540Ed7A198e48B57F60a791aaE83a5A2b063E",
"to_addr": "0x0F42Db9fB309E6E3a1E2E47B69ED4dd5d7aE4b14",
"value": "0",
"token_addr": "0x85E3fC24B618cE2aEad700d51710756dFC88F765",
"token_value": "100000000",
"status": 2,
"exchange": {}
}
}

Withdrawal Notification

message format

parametertyperequireddescription
typeinttrueMessage type: 0-Test message, 1-deposit notification, 2-withdrawal notification
content_typestringtruejson
contentdicttruemessage content
--idstringtrueOrder ID
--txn_idstringtrueTxn ID
--chainstringtrueNetwork ERC20/TRC20
--uidstringtrueUser ID
--to_addrstringtruetransfer address
--valuestringtrueamount of local currency to transfer
--token_addrstringtruetransfer token contract address
--token_valuestringtruetransfer token quantity
--statusstringtrue3-reject,4-failed,5-success
--detaildicttruedetail

message example

{
"type": 0,
"content_type": "json",
"content": {
"id": "6478417858624eeddde32df3",
"txn_id": "0x7aff9094356518b3eadadab4cce701f8040d79ba2c79d0c2451982fa3d61e94c",
"status": 5,
"chain": "ERC20",
"uid": "2b063E",
"to_addr": "0x0F42Db9fB309E6E3a1E2E47B69ED4dd5d7aE4b14",
"value": "0",
"token_addr": "0x85E3fC24B618cE2aEad700d51710756dFC88F765",
"token_value": "100000000",
"detail": {}
}
}