Skip to main content

Debug resources

Sample message

1. Submit transaction

Request

{
"app_id": "your app id",
"biz_data": {
"confirm_on_terminal": true,
"expires": 0,
"merchant_order_no": "12320231220110257",
"order_amount": "10",
"trans_type": "1"
},
"request_id": "111111",
"topic": "ecrhub.pay.order",
"timestamp": "1698302992263"
}

Response

{
"app_id": "your app id",
"biz_data": {
"merchant_order_no": "12320231220110257",
"order_amount": "10",
"trans_status": "2",
"price_currency": "USD",
"trans_no": "5021000010210602000003",
"pay_scenario": "SWIPE_CARD",
"trans_type": "1"
},
"response_code": "000",
"response_msg": "",
"request_id": "111111",
"topic": "ecrhub.pay.order"
}

2. Query transaction

Request

{
"app_id": "your app id",
"biz_data": {
"merchant_order_no": "12320231220110257"
},
"request_id": "111111",
"topic": "ecrhub.pay.query",
"timestamp": "1698302992264"
}

Response

{
"app_id": "your app id",
"biz_data": {
"merchant_order_no": "12320231220110257",
"order_amount": "10",
"trans_status": "2",
"price_currency": "USD",
"trans_no": "5021000010210602000003",
"pay_scenario": "SWIPE_CARD",
"trans_type": "1"
},
"response_code": "000",
"response_msg": "",
"request_id": "111111",
"topic": "ecrhub.pay.query"
}

3. Close transaction

Request

{
"app_id": "your app id",
"biz_data": {
"merchant_order_no": "12320231220110257"
},
"request_id": "111111",
"topic": "ecrhub.pay.close",
"timestamp": "1698302992265"
}

Response

{
"app_id": "your app id",
"biz_data": {
"merchant_order_no": "12320231220110257"
},
"response_code": "000",
"response_msg": "",
"request_id": "111111",
"topic": "ecrhub.pay.close"
}

Debug tools

  1. You can install the plug-in PIE SOCKET WebSocket Tester in Chorme browser, using this plug-in, you can simulate sending data to the Codepay Register.
  2. Enter the ip address obtained from CodePay Register and click CONNECT.
    Cross terminal application integration, WLAN/LAN mode integration debug tools
  3. When the connection is successful, enter the transaction message and click SEND MESSAGE.