Merchant APIs

APIs provided by merchant to be called back by wallet manager servers to send notification or verify requests.

Request Header

  • X-Message-XXX: 5 extended headers mentioned in Message Format

  • Content-Type: application/json

APIs

Deposit status callback

Deposit status callback

POST /MERCHANT_URL/

Request Body

Name
Type
Description

type*

Constant

deposit_status

data*

JSON Object

data/id*

Long

Record ID

data/merchant_id*

Long

Merchant ID

data/chain_type*

Enum

eg. 2 (ETH)

data/chain_id*

Long

data/client_id*

String

eg. 8000001

data/wallet_address*

String

data/from_address*

String

data/asset_name*

String

eg. "USDC"

data/amount*

String

data/decimals*

Integer

data/status*

Enum

eg. 2 (ConfirmedSuccess)

data/updated_time*

Long

data/block_number*

Long

data/block_hash*

String

data/block_time*

Long

data/tx_status*

Boolean

tx status on chain

data/tx_hash

String

data/ref_no*

String

transaction reference No.

data/client_tag

String

data/wallet_tag

String

data/risk_level

Enum

enum_risk_level

{
   "result":true
}
Request Examples
{
	"type": "deposit_status",
	"data": {
		"id": 1654,
		"merchant_id": 3,
		"chain_type": 2,
		"chain_id": 4,
		"client_id": "1661931442815",
		"trans_type": 1,
		"wallet_address": "0x0ADEAcA39D7cBEFBf9097c937Bcc26399Ba8eF80",
		"from_address": "0xD912d5e14dEb355700e0362a7f898b0454b63684",
		"asset_name": "UNI",
		"amount": "10000000000000000000",
		"decimals": 18,
		"status": 2,
		"updated_time": 1661935021,
		"block_number": "11297681",
		"block_hash": "0x4b14c1d0f8009010e6e1e2866bec278defba8f3e82dc94a359814be7775ff476",
		"block_time": 1661932721,
		"tx_hash": "0xe8539c054bca34de343b8f15b7fe2736a76b7e66a4c476be96204c0a3a645138",
		"risk_level": 0
	}
}

Operation status callback

Operation status callback

POST /MERCHANT_URL/

Request Body

Name
Type
Description

type*

Constant

operation_status

data*

JSON Object

data/batch_id*

Long

data/operation_type*

Enum

enum_operation_type

eg. 1 (Withdraw)

data/operation_seq*

Integer

Operation sequence in a batch

data/merchant_order_id*

String

data/merchant_id*

Long

data/chain_type*

Enum

enum_chain_type

2 (ETH)

data/chain_id*

Long

data/asset_name*

String

eg. "USDT"

data/amount*

String

eg. "30000000"

data/decimals*

Integer

eg. 6

data/wallet_version

Integer

data/path

String

eg. "m/44'/60'/0'/0/0"

data/from_address*

String

data/to_address*

String

data/invoker_address

String

data/client_data

String

data/status*

Enum

enum_operation_status

2 (Submitted)

data/update_time

Long

eg. 1658215829310

data/transactions

JSON Object

data/transactions/block_number

Long

eg. 10441055

data/transactions/block_hash*

String

eg. "0x712002f4ae00b664d7bed3f82d9403bec80c74fcef976a9ba4924f0cdfc497f5"

data/transactions/block_time*

Long

eg. 1658142658

data/transactions/tx_status*

Boolean

data/transactions/tx_hash

String

eg. "0x3cdcde2c66a1c9bdbe872051ef6e24de2787b7b635fc514cd73d58a9bc14bbc9"

data/transactions/status*

Enum

enum_operation_transaction_status

4 (CoinfirmSuccess)

data/transactions/remarks

String

{
   "result":true
}

Request Examples

The operation status chart please refer to enum_operation_status

Requested Status (status = 1)
{
   "type":"operation_status",
   "data":{
      "batch_id":346552,
      "operation_type":1,
      "operation_seq":1,
      "merchant_order_id":"20230710133156096ILZN",
      "merchant_id":69,
      "chain_type":2,
      "chain_id":1,
      "asset_name":"USDT",
      "amount":"55000000",
      "decimals":6,
      "wallet_version":1,
      "path":"m/44'/60'/0'/0/100",
      "from_address":"0x61130584714b1a2e1e3bCA6e91A184CDe9d92d26",
      "to_address":"0x5e29d580b2dfb8fa42459eb3da68ecfb6f43b065",
      "invoker_address":"",
      "client_data":"20230710133156096ILZN",
      "status":1,
      "updated_time":1688967116
   }
Submitted Status (status = 2)
{
   "type":"operation_status",
   "data":{
      "batch_id":346552,
      "operation_type":1,
      "operation_seq":1,
      "merchant_order_id":"20230710133156096ILZN",
      "merchant_id":69,
      "chain_type":2,
      "chain_id":1,
      "asset_name":"USDT",
      "amount":"55000000",
      "decimals":6,
      "wallet_version":1,
      "path":"m/44'/60'/0'/0/100",
      "from_address":"0x61130584714b1a2e1e3bCA6e91A184CDe9d92d26",
      "to_address":"0x5e29d580b2dfb8fa42459eb3da68ecfb6f43b065",
      "invoker_address":"",
      "client_data":"20230710133156096ILZN",
      "status":2,
      "updated_time":1688967116
   }
}
Signed Status (status = 6)
{
   "type":"operation_status",
   "data":{
      "batch_id":346552,
      "operation_type":1,
      "operation_seq":1,
      "merchant_order_id":"20230710133156096ILZN",
      "merchant_id":69,
      "chain_type":2,
      "chain_id":1,
      "asset_name":"USDT",
      "amount":"55000000",
      "decimals":6,
      "wallet_version":1,
      "path":"m/44'/60'/0'/0/100",
      "from_address":"0x61130584714b1a2e1e3bCA6e91A184CDe9d92d26",
      "to_address":"0x5e29d580b2dfb8fa42459eb3da68ecfb6f43b065",
      "invoker_address":"",
      "client_data":"",
      "status":6,
      "updated_time":1688967117,
      "transactions":[
         {
            "block_number":null,
            "block_hash":null,
            "block_time":null,
            "tx_hash":"0x7ac1b4bc171b1ae248c109d4cec6e98a39cdfd24b80f3a3567d8856113389c72",
            "tx_status":false,
            "status":1,
            "remarks":null
         }
      ]
   }
}
Executing Status (status = 3)
{
   "type":"operation_status",
   "data":{
      "batch_id":346552,
      "operation_type":1,
      "operation_seq":1,
      "merchant_order_id":"20230710133156096ILZN",
      "merchant_id":69,
      "chain_type":2,
      "chain_id":1,
      "asset_name":"USDT",
      "amount":"55000000",
      "decimals":6,
      "wallet_version":1,
      "path":"m/44'/60'/0'/0/100",
      "from_address":"0x61130584714b1a2e1e3bCA6e91A184CDe9d92d26",
      "to_address":"0x5e29d580b2dfb8fa42459eb3da68ecfb6f43b065",
      "invoker_address":",
      "client_data":"20230710133156096ILZN",
      "status":3,
      "updated_time":1688967129,
      "transactions":[
         {
            "block_number":"17661207",
            "block_hash":"0x7e004f814957e7f08439583a86902afb45d6bcf9da63edc6e3dcf6cbf4ec4ebe",
            "block_time":1688967119,
            "tx_hash":"0x7ac1b4bc171b1ae248c109d4cec6e98a39cdfd24b80f3a3567d8856113389c72",
            "tx_status":false,
            "status":2,
            "remarks":null
         }
      ]
   }
}
Completed Status (status = 4)
{
   "type":"operation_status",
   "data":{
      "batch_id":346552,
      "operation_type":1,
      "operation_seq":1,
      "merchant_order_id":"20230710133156096ILZN",
      "merchant_id":69,
      "chain_type":2,
      "chain_id":1,
      "asset_name":"USDT",
      "amount":"55000000",
      "decimals":6,
      "wallet_version":1,
      "path":"m/44'/60'/0'/0/100",
      "from_address":"0x61130584714b1a2e1e3bCA6e91A184CDe9d92d26",
      "to_address":"0x5e29d580b2dfb8fa42459eb3da68ecfb6f43b065",
      "invoker_address":"",
      "client_data":"20230710133156096ILZN",
      "status":4,
      "updated_time":1688968165,
      "transactions":[
         {
            "block_number":"17661207",
            "block_hash":"0x7e004f814957e7f08439583a86902afb45d6bcf9da63edc6e3dcf6cbf4ec4ebe",
            "block_time":1688967119,
            "tx_hash":"0x7ac1b4bc171b1ae248c109d4cec6e98a39cdfd24b80f3a3567d8856113389c72",
            "tx_status":true,
            "status":4,
            "remarks":null
         }
      ]
   }
}

Batch operation status callback

Batch operation status callback

POST /MERCHANT_URL/

Request Body

Name
Type
Description

type*

Constant

operation_batch_status

data*

JSON

data/batch_id*

Long

data/operation_type*

Enum

data/merchant_id*

Long

data/chain_type*

Enum

data/chain_id

Long

data/asset_name*

String

data/client_data

String

date/status

Enum

enum_operation_batch_status

eg. 2 (Submitted)

data/update_time

Long

{
   "result":true
}

Examples

The batch operation status chart please refer to enum_operation_batch_status

Request Status (status = 1)
{
   "type":"operation_batch_status",
   "data":{
      "batch_id":346552,
      "operation_type":1,
      "merchant_id":69,
      "chain_type":2,
      "chain_id":1,
      "asset_name":"USDT",
      "client_data":"20230710133156096ILZN",
      "status":1,
      "updated_time":1688967116
   }
}
Submitted Status (status = 2)
{
   "type":"operation_batch_status",
   "data":{
      "batch_id":346552,
      "operation_type":1,
      "merchant_id":69,
      "chain_type":2,
      "chain_id":1,
      "asset_name":"USDT",
      "client_data":"20230710133156096ILZN",
      "status":2,
      "updated_time":1688967116
   }
}
Signed Status (status = 6)
{
   "type":"operation_batch_status",
   "data":{
      "batch_id":346552,
      "operation_type":1,
      "merchant_id":69,
      "chain_type":2,
      "chain_id":1,
      "asset_name":"",
      "client_data":"",
      "status":6,
      "updated_time":1688967117
   }
}
Executing Status (status = 3)
{
   "type":"operation_batch_status",
   "data":{
      "batch_id":346552,
      "operation_type":1,
      "merchant_id":69,
      "chain_type":2,
      "chain_id":1,
      "asset_name":"USDT",
      "client_data":"20230710133156096ILZN",
      "status":3,
      "updated_time":1688967129
   }
}
Completed Status (status = 4)
{
   "type":"operation_batch_status",
   "data":{
      "batch_id":346552,
      "operation_type":1,
      "merchant_id":69,
      "chain_type":2,
      "chain_id":1,
      "asset_name":"USDT",
      "client_data":"20230710133156096ILZN",
      "status":4,
      "updated_time":1688968166
   }
}

Verify withdraw request

Verify withdraw transaction

POST /MERCHANT_URL/

Request Body

Name
Type
Description

type*

Constant

verify_withdraw_transaction

data

JSON Object

data/merchant_id*

Long

Merchant ID

data/operation_type*

Enum

enum_operation_type

2 (Withdraw)

data/chain_type*

Enum

enum_chain_type

eg. 2 (ETH)

data/chain_id*

Long

data/total_operation*

Integer

data/client_data

String

data/request_time*

Long

data/operations*

JSON Array

data/operations/merchant_order_id*

String

Unique order id for each merchant

data/operations/merchant_id*

Long

data/operations/operation_seq*

Integer

data/operations/operation_type*

Enum

enum_operation_type

2 (Withdraw)

data/operations/batch_id*

Long

data/operations/wallet_version

Integer

data/operations/wallet_path*

String

data/operations/asset_name*

String

data/operations/amount*

String

data/operations/decimals*

Integer

data/operations/from_address*

String

data/operations/to_address

String

data/operations/request_time*

Long

data/batch_id*

Long

data/operations/to_wallet_tag

String

wallet tag for XRP wallet.

{
   "result":true
}
Request example
{
   "type":"verify_withdraw_transaction",
   "merchant_id":"1",
   "data":{
      "merchant_id":"1",
      "operation_type":1,
      "batch_id":"95",
      "chain_type":2,
      "chain_id":97,
      "total_operation":1,
      "client_data":"rano_test001",
      "request_time":"1664353075",
      "operations":[
         {
            "merchant_order_id":"W1664353074780",
            "merchant_id":"1",
            "operation_seq":1,
            "operation_type":1,
            "batch_id":"95",
            "wallet_version":1,
            "wallet_path":"",
            "asset_name":"BNB",
            "amount":"100000000000000000",
            "decimals":18,
            "from_address":"0xE41abb573ADa45a22CE12736966D8839118bbe24",
            "to_address":"0x5f1d06d369092da06D897971Fce3BF150F8735B3",
            "request_time":"0"
         }
      ]
   }
}

Last updated