e-Buy 电子券4.0 英文
- Introduction
- Glossory
- API Introduction
- Transaction API
- Bank Acquiring
- Card Redemption
- Qrcode Sale
- Trans Inquiry
- Trans Void(card)
- Trans Void(qrcode)
- Trans Refund(card)
- Trans Refund(qrcode)
- Ecoupon Inquiry
- Point Accumulating
- Management API
Introduction
Purpose
This is a integration system protocol between Cashier Terminal and Backend system.
To enable the Cashier Terminal and e-Buy backend payment and redemption business real-time transaction process and synchronization, reduce reconciliation errors, facilitate business transaction in real-time integration to e-Buy backend system, in order to support multiple business transaction demand, such as multiple payment method and redemption method.
Physical Architecture

Network illustration:
- 1.Cashier POS and MIS-POS integration is thru USB port or serial port, each Cashier Terminalis thru network connection.
- 2.Each store (include 1 or more cashier POS) is connected thru Public VPN back to e-Buy Backend.
- 3.e-Buy Backend is connected to each Credit card banking system thru leased line.
Logic Architecture

Flow illustration:
- 1.Cashier POS initiates the payment transaction, including the related transaction information to push to the e-Buy Backend.
- 2.e-Buy Backend will process as per type of transaction provided. If required, corresponding data will send to the Card Issued Organization to process accordingly. At final, will return back the result to the Cashier POS.
Glossory
Socket
Communication is based on TCP/IP
MIS-POS
Installed in merchants in-store POS machine, providing the operation activity to support and exchange function
e-Buy POSP
A group / set of network equipment and server to process e-Buy POS all transaction activity
BCD
Binary numeric representation format, such as 0x99, it represents the value of 99
TLV
Communication protocol commonly used data formats, Comprise 3 parts: "Tag", "Length" & "Value"
PINPAD
PIN entry device
e-Buy POS
Same as MIS-POS, the device is installed in merchant on-site, providing the operation activity to support and exchange function
e-Buy Backend
A group /set of equipment / server to process all the transaction from e-Buy POS
Middleware
Individual operation in cashier terminal, monitoring the local port, it will also download the key and auto sign in, auto update and prompt transaction options
API Introduction
Invoke Method
| Content | Description |
|---|---|
| Protocal | HTTP/HTTPS |
| HTTP Method | POST (application/json) |
| Message Type | JSON |
| Charset | UTF-8 |
| Signature Algorithm | MD5 |
Message Structure
Request and response message are both use following structure
| No. | Parameter | Format | Reference | Description | Memo |
|---|---|---|---|---|---|
| 1 | action | String | inquiry | Transaction Type | The specific interfaces with detail description |
| 2 | deviceNo | String | POS01 | Cashier Terminal No. | To identify the Cashier Terminal used in this transaction |
| 3 | shopNo | String | CN123456 | Shop No. | To identify the merchant / shop in this transaction |
| 4 | brand | String | 663 | Brand No. | To identify the Brand used in this transaction, allocated by e-Buy |
| 5 | body | String | BASE64 | Message Detail | The specific interfaces with detail description |
example
0x00 0xE7{"action":"inquiry","deviceNo":"POS01","shopNo":"CN123456","brand":"663","body":"ewogICAgICAgICAidHJhY2VObyI6ICI5OTAwMDAwOTEwMDAxMDEwMTczMjEyMyIsCiAgICAgICAgICJvcmlnaW5hbFRyYWNlTm8iOiAiOTkwMDAwMDkxMDAwMTAxMDE3MzIxMjQiCiAgICAgfQ=="}
- 00E7:The length of the message is 231 bytes
Parameter Object
Goods Detail
- JSON Key为
goodsDetail, mandatory
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| goodsCategory | String | Yes | Goods Category | |
| goodsId | String | Yes | Goods ID | |
| goodsName | String | Yes | Goods Name | Used for report , receipt, slip printing |
| price | Price | Yes | Price | Unit : dollar |
| quantity | Integer | Yes | Quantity | |
| rebateCode | String | No | Rebate Code | Cashier Terminal has pre-set the discount, mandated |
| activityNo | String | No | Activity No | Once e-Buy backend system confirm transaction success, a transaction activity number will return back |
| memo | String | No | Memo | Once e-Buy backend system confirm transaction success, some information will return such as electronic voucher number |
Fund Channel
- JSON Key is
fundChannel, only in Response message, not mandatory
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| channelNo | String | Yes | Channel No | Channel No |
| channelName | String | Yes | Channel Name | Channel Name |
| channelAmount | Price | Yes | Channel Amount | Channel Amount |
- supported fund channel:
| channelNo | channelName | Description |
|---|---|---|
| user_real_money | User paid real money | Example:Alipay balance、Alipay Yuebao、Wechat balance、Debit Card or Credit card etc. |
| user_balance | paid by user balance | Example:Alipay balance、Alipay Yuebao、Wechat balance etc. |
| user_bank_card | paid by user bank card | Example:Debit Card or Credit card |
| user_credit | paid by user e-Wallet credit | Example:Alipay huabei,Jingdong credit |
| user_points | paid by user points | Example:Credit card points,Tmall Points etc. |
| merchant_benefit | the benifit provided by merchant | Example:Merchant discount,Merchant voucher etc. |
| platform_benefit | the benifit provided by enterprise | Example:Payment platform discount, Payment platform voucher etc. |
| ebuy_benefit | the benifit provided by e-Buy | Example:e-Buy discount, e-Buy voucher etc |
Print Detail
- JSON Key is
printDetail, only in Response message, not mandatory
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| cardNo64 | String | No | The card number (first 6 digits and last 4 digits | The card number (first 6 digits and last 4 digits) is required to print as part of return message |
| bank | String | No | Credit Card issued organization | The Credit Card issued organization is required to print as part of return message |
| paymentOrderNo | String | No | Payment Order no. | Payment order no. is required to print as part of return message |
| paymentUser | String | No | User account | User account need be printed. |
| pointSale | String | No | Point deducted | Point deducted is required to print as part of return message |
| qrCode1 | String | No | Print QR code 1 | QR code 1 is required to print as part of return message |
| qrCode2 | String | No | Print QR code 2 | QR code 2 is required to print as part of return message |
| qrCode3 | String | No | Print QR code 3 | QR code 3 is required to print as part of return message |
| barCode1 | String | No | Print Bar Code 1 | Bar Code code 1 is required to print as part of return message |
| barCode2 | String | No | Print Bar Code 2 | Bar Code code 2 is required to print as part of return message |
| barCode3 | String | No | Print Bar Code 3 | Bar Code code 3 is required to print as part of return message |
| content | String | No | Print Content | TLV Format,1F=Receipt title,2F=Receipt transtype |
| printMode | String | No | Print Mode | 1=1 Receipt,2=2 Receipts,3=3 Receipts |
Member Detail
- JSON Key is
memberDetail, not mandatory
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| memberId | String | Yes | Member ID | |
| memberName | String | Yes | Member Name | |
| memberPhone | String | No | Member Mobile | |
| grade | String | No | Member Grade | |
| status | String | No | Member Status | |
| balance | String | No | Balance | |
| pointBalance | String | No | Point Balance |
Settle Record
- JSON Key is
settleRecord, not mandatory
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| activityNo | String | Yes | Activity No | |
| activityName | String | Yes | Activity Name | |
| productName | String | Yes | Product Name | |
| customer | String | Yes | Settle Customer | |
| isRefund | Boolean | Yes | Is Refund | |
| volume | Integer | Yes | Transaction Volume | |
| totalReceiptAmount | Price | Yes | Merchant Receipt Amount | |
| totalAmount | Price | Yes | Total Amount |
Trans Record
- JSON Key is
transRecord, mandatory
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | |
| paidAmount | String | Yes | Paid Amount | |
| status | String | Yes | Match status | See detail |
status
- 0 Initial
- 1 paidAmount e-Buy Backend = request
- 2 paidAmount e-Buy Backend > request
- 3 paidAmount e-Buy Backend < request
- 4 Does not exist in e-Buy Backend
- 5 Failed in e-Buy Backend
- 6 Reversed in e-Buy Backend
- 7 Rollbacked in e-Buy Backend
- 8 Refunded in e-Buy Backend
- 9 e-Buy Backend process failed
- 10 e-Buy Backend has, but Does not exist in Cashier POS
Transaction API
Bank Acquiring
Transaction Flow
- The requested transaction will firstly invoke MIS-POS for Card swape and password input. Once MIS-POS confirmed on both inputs, it will send back to e-Buy backend server to process.
action
cardPayment
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| totalAmount | Price | Yes | Total transaction amount | Unit : Dollar |
| undiscountAmount | Price | Yes | undiscountable Amount | Unit : Dollar |
| acquirer | String | Yes | Acquirer Bank | Example:citicCashpay |
| goodsDetail | List<goodsDetail> | Yes | Goods detail | Mandated on goods detail verification |
| memberDetail | Object<memberDetail> | No | Member information | Mandated on member payment |
Request body example
{
"traceNo": "99000009100010101732123",
"totalAmount": 40.8,
"undiscountAmount": 0,
"acquirer": "citicCashpay",
"goodsDetail": [
{
"goodsCategory": "001",
"goodsId": "P00001",
"goodsName": "牙膏",
"price": 8,
"quantity": 2,
"rebateCode": "000"
},
{
"goodsCategory": "101",
"goodsId": "P00002",
"goodsName": "洗发水",
"price": 24.8,
"quantity": 1,
"rebateCode": "000"
}
],
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| orderNo | String | Yes | Order No. from e-Buy | 易百生成 |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| paidAmount | Price | Yes | Total amount paid | Face Value. Unit : Dollar |
| receiptAmount | Price | No | Merchant actual received amount | Net Value. Unit : Dollar |
| invoiceAmount | Price | No | Merchant invoice amount | Unit : Dollar |
| exchangeRate | Number(8,6) | No | Exchange Rate | The rate of conversion the currency given in the request to CNY. |
| currency | String | No | Currency | For example: CNY |
| discountCode | String | No | Discount Code | assigned by Cashier POS,用于入账计折扣类型,如:2016120101|20.00表示支付20元 |
| discountNum | Number | No | numbers of discountCode | 用于入账计折扣类型的数量 |
| tenderCode | String | No | Tender Code | assigned by Cashier POS,用于入账计支付方式,如:2016120101|20.00表示支付20元 |
| activityProductNo | String | No | Activity Product no. | |
| activityProductName | String | No | Activity Product name | |
| needSameCard | Boolean | No | Required same card payment | Such as discount upon amount reached, same credit card must be used for the payment |
| goodsDetail | List<goodsDetail> | No | Paid product detail | Backend response paid product detail |
| fundChannel | List<fundChannel> | No | Channel of fund | |
| printDetail | Object<printDetail> | No | Printing message | Provided if required to print on the receipt |
| memberDetail | Object<memberDetail> | No | Member information | Member info return message on this transaction |
Response body example
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"paidAmount": 40.8,
"receiptAmount": 40.8,
"invoiceAmount": 40.8,
"exchangeRate": 6.0939,
"currency": "CNY",
"discountCode": "0001",
"discountNum": 20,
"tenderCode": "8001",
"activityProductNo": "2016123101",
"activityProductName": "中信365权益",
"needSameCard": true,
"goodsDetail": [
{
"goodsCategory": "001",
"goodsId": "P00001",
"goodsName": "牙膏",
"price": 8,
"quantity": 2,
"rebateCode": "000",
"activityNo": "2016123101",
"memo": "100123456789"
},
{
"goodsCategory": "101",
"goodsId": "P00002",
"goodsName": "洗发水",
"price": 24.8,
"quantity": 1,
"rebateCode": "000",
"activityNo": "2016123101",
"memo": "100123456789"
}
],
"fundChannel": [
{
"channelNo": "001",
"channelName": "用户实付现金",
"channelAmount": "20.8"
},
{
"channelNo": "002",
"channelName": "用户积分支付",
"channelAmount": "20"
}
],
"printDetail": {
"cardNo64": "622562****8888",
"bank": "中信银行",
"paymentOrderNo": "201612315689412157458787",
"pointSale": "20000",
"qrCode1": "htt://www.xxx.com/url",
"qrCode2": "",
"qrCode3": "",
"barCode1": "12345679",
"barCode2": "",
"barCode3": ""
},
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Card Redemption
Usage
- Bank loyalty point redemption
- Bank Loyalty point redemption + Cash payment
- Bank privilege verification
- Bank privilege verification + Cash Payment
- Prepay Card payment
- Member Card payment
Transaction Flow
- The requested transaction will will firstly invoke MIS-POS for Card swape and password input. Once MIS-POS confirmed on both inputs, it will send back to e-Buy backend server to process.
action
cardRedemption
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat,建议yyyyMMddHHmmss+10位流水号 |
| totalAmount | Price | Yes | Total transaction amount | Unit : Dollar |
| undiscountAmount | Price | Yes | undiscountable Amount | Unit : Dollar |
| goodsDetail | List<goodsDetail> | Yes | Goods detail | Mandated on goods detail verification |
| memberDetail | Object<memberDetail> | No | Member information | Mandated on member payment |
Request body example
{
"traceNo": "99000009100010101732123",
"totalAmount": 40.8,
"undiscountAmount": 0,
"goodsDetail": [
{
"goodsCategory": "001",
"goodsId": "P00001",
"goodsName": "牙膏",
"price": 8,
"quantity": 2,
"rebateCode": "000"
},
{
"goodsCategory": "101",
"goodsId": "P00002",
"goodsName": "洗发水",
"price": 24.8,
"quantity": 1,
"rebateCode": "000"
}
],
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| orderNo | String | Yes | Order No. from e-Buy | 易百生成 |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| paidAmount | Price | Yes | Total amount paid | Face Value. Unit : Dollar |
| receiptAmount | Price | No | Merchant actual received amount | Net Value. Unit : Dollar |
| invoiceAmount | Price | No | Merchant invoice amount | Unit : Dollar |
| exchangeRate | Number(8,6) | No | Exchange Rate | The rate of conversion the currency given in the request to CNY. |
| currency | String | No | Currency | For example: CNY |
| discountCode | String | No | Discount Code | assigned by Cashier POS |
| discountNum | Number | No | numbers of discountCode | 用于入账计折扣类型的数量 |
| tenderCode | String | No | Tender Code | assigned by Cashier POS,用于入账计支付方式,如:2016120101|20.00表示支付20元 |
| activityProductNo | String | No | Activity Product no. | |
| activityProductName | String | No | Activity Product name | |
| needSameCard | Boolean | No | Required same card payment | Such as discount upon amount reached, same credit card must be used for the payment |
| goodsDetail | List<goodsDetail> | No | Paid product detail | Backend response paid product detail |
| fundChannel | List<fundChannel> | No | Channel of fund | |
| printDetail | Object<printDetail> | No | Printing message | Provided if required to print on the receipt |
| memberDetail | Object<memberDetail> | No | Member information | Member info return message on this transaction |
Response body example
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"paidAmount": 40.8,
"receiptAmount": 40.8,
"invoiceAmount": 40.8,
"exchangeRate": 6.0939,
"currency": "CNY",
"discountCode": "0001",
"discountNum": 20,
"tenderCode": "8001",
"activityProductNo": "2016123101",
"activityProductName": "中信365权益",
"needSameCard": true,
"goodsDetail": [
{
"goodsCategory": "001",
"goodsId": "P00001",
"goodsName": "牙膏",
"price": 8,
"quantity": 2,
"rebateCode": "000",
"activityNo": "2016123101",
"memo": "100123456789"
},
{
"goodsCategory": "101",
"goodsId": "P00002",
"goodsName": "洗发水",
"price": 24.8,
"quantity": 1,
"rebateCode": "000",
"activityNo": "2016123101",
"memo": "100123456789"
}
],
"fundChannel": [
{
"channelNo": "001",
"channelName": "用户实付现金",
"channelAmount": "20.8"
},
{
"channelNo": "002",
"channelName": "用户积分支付",
"channelAmount": "20"
}
],
"printDetail": {
"cardNo64": "622562****8888",
"bank": "中信银行",
"paymentOrderNo": "201612315689412157458787",
"pointSale": "20000",
"qrCode1": "htt://www.xxx.com/url",
"qrCode2": "",
"qrCode3": "",
"barCode1": "12345679",
"barCode2": "",
"barCode3": ""
},
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Qrcode Sale
Usage
- Alipay
- Wechat Payment
- QR-Code Payment from Bank
- QR-Code point redeem from Bank
- QR-Code Payment from China UnionPay
- Baidu Payment
- Bestpay
- Other QR-Code Payment
- Product coupon/cash coupon/discount coupon/Buy M Get N Free coupon /Deduct coupon
- Take out or Self booking order
Transaction Flow
- The transaction process will collect QR code message thru scanning or direct input through keypad, and it will send to e-Buy backend server after collection to further process.
action
qrcodeSale
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| totalAmount | Price | Yes | Total transaction amount | Unit : Dollar |
| undiscountAmount | Price | Yes | Undiscountable Amount | Unit : Dollar |
| qrcode | String | Yes | QR-Code | 串号、一维码或二维码内容 |
| goodsDetail | List<goodsDetail> | Yes | Goods detail | Mandated on goods detail verification |
| memberDetail | Object<memberDetail> | No | Member information | Mandated for member payment |
Request body example
{
"traceNo": "99000009100010101732123",
"totalAmount": 40.8,
"undiscountAmount": 0,
"qrcode": "280123121234567890",
"goodsDetail": [
{
"goodsCategory": "001",
"goodsId": "P00001",
"goodsName": "牙膏",
"price": 8,
"quantity": 2,
"rebateCode": "000"
},
{
"goodsCategory": "101",
"goodsId": "P00002",
"goodsName": "洗发水",
"price": 24.8,
"quantity": 1,
"rebateCode": "000"
}
],
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| orderNo | String | Yes | Order No. from e-Buy | made by Ebuy |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| paidAmount | Price | Yes | Total amount paid | Face Value. Unit : Dollar |
| receiptAmount | Price | No | Merchant actual received amount | Net Value. Unit : Dollar |
| invoiceAmount | Price | No | Merchant invoice amount | Unit : Dollar |
| exchangeRate | Number(8,6) | No | Exchange Rate | The rate of conversion the currency given in the request to CNY. |
| currency | String | No | Currency | For example: CNY |
| discountCode | String | No | Discount Code | assigned by Cashier POS |
| discountNum | Number | No | numbers of discountCode | 用于入账计折扣类型的数量 |
| tenderCode | String | No | Tender Code | assigned by Cashier POS,record payment method,like:2016120101|20.00 is payment 20yuan |
| activityProductNo | String | No | Activity Product no. | |
| activityProductName | String | No | Activity Product name | |
| goodsDetail | List<goodsDetail> | No | Paid product detail | Backend response paid product detail |
| fundChannel | List<fundChannel> | No | Channel of fund | |
| printDetail | Object<printDetail> | No | Printing message | Provided if required to print on the receipt |
| memberDetail | Object<memberDetail> | No | Member information | Member info return message on this transaction |
Response body example
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"paidAmount": 40.8,
"receiptAmount": 40.8,
"invoiceAmount": 40.8,
"exchangeRate": 6.0939,
"currency": "CNY",
"discountCode": "0001",
"discountNum": 20,
"tenderCode": "8001",
"activityProductNo": "2016123102",
"activityProductName": "支付宝支付",
"goodsDetail": [
{
"goodsCategory": "001",
"goodsId": "P00001",
"goodsName": "牙膏",
"price": 8,
"quantity": 2,
"rebateCode": "000",
"activityNo": "2016123101",
"memo": "100123456789"
},
{
"goodsCategory": "101",
"goodsId": "P00002",
"goodsName": "洗发水",
"price": 24.8,
"quantity": 1,
"rebateCode": "000",
"activityNo": "2016123101",
"memo": "100123456789"
}
],
"fundChannel": [
{
"channelNo": "001",
"channelName": "用户实付现金",
"channelAmount": "20.8"
},
{
"channelNo": "002",
"channelName": "用户积分支付",
"channelAmount": "20"
}
],
"printDetail": {
"cardNo64": "622562****8888",
"bank": "中国银行",
"paymentOrderNo": "201612315689412157458787",
"paymentUser": "139****@163.com",
"pointSale": "20000",
"qrCode1": "htt://www.xxx.com/url",
"qrCode2": "",
"qrCode3": "",
"barCode1": "12345679",
"barCode2": "",
"barCode3": ""
},
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Trans Inquiry
Usage
- Invoke this API to inquiry last transaction result when it is timed out.
action
inquiry
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier trace no. | No repeat |
| originalTraceNo | String | Yes | Original Cashier trace no. | 传入需要查询的原交易收银机流水号 |
Request body example
{
"traceNo": "99000009100010101732123",
"originalTraceNo": "99000009100010101732124"
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| orderNo | String | Yes | Order No. from e-Buy | Unit:Dollar |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| paidAmount | Price | Yes | Total amount paid | Face Value. Unit : Dollar |
| receiptAmount | Price | No | Merchant actual received amount | Net Value. Unit : Dollar |
| invoiceAmount | Price | No | Merchant invoice amount | Unit : Dollar |
| exchangeRate | Number(8,6) | No | Exchange Rate | The rate of conversion the currency given in the request to CNY. |
| currency | String | No | Currency | For example: CNY |
| discountCode | String | No | Discount Code | assigned by Cashier POS,用于入账计折扣类型,如:2016120102|10.00表示折扣10元 |
| discountNum | Number | No | numbers of discountCode | 用于入账计折扣类型的数量 |
| tenderCode | String | No | Tender Code | assigned by Cashier POS,用于入账计支付方式,如:2016120101|20.00表示支付20元 |
| activityProductNo | String | No | Activity Product no. | |
| activityProductName | String | No | Activity Product name | |
| needSameCard | Boolean | No | Required same card payment | Such as discount upon amount reached, same credit card must be used for the payment |
| goodsDetail | List<goodsDetail> | No | Paid product detail | Backend response paid product detail |
| fundChannel | List<fundChannel> | No | Channel of fund | |
| printDetail | Object<printDetail> | No | Printing message | Provided if required to print on the receipt |
| memberDetail | Object<memberDetail> | No | Member information | Member info return message on this transaction |
Response body example
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"paidAmount": 40.8,
"receiptAmount": 40.8,
"invoiceAmount": 40.8,
"exchangeRate": 6.0939,
"currency": "CNY",
"discountCode": "0001",
"discountNum": 20,
"tenderCode": "8001",
"activityProductNo": "2016123102",
"activityProductName": "支付宝支付",
"needSameCard": true,
"goodsDetail": [
{
"goodsCategory": "001",
"goodsId": "P00001",
"goodsName": "牙膏",
"price": 8,
"quantity": 2,
"rebateCode": "000",
"activityNo": "2016123101",
"memo": "100123456789"
},
{
"goodsCategory": "101",
"goodsId": "P00002",
"goodsName": "洗发水",
"price": 24.8,
"quantity": 1,
"rebateCode": "000",
"activityNo": "2016123101",
"memo": "100123456789"
}
],
"fundChannel": [
{
"channelNo": "001",
"channelName": "用户实付现金",
"channelAmount": "20.8"
},
{
"channelNo": "002",
"channelName": "用户积分支付",
"channelAmount": "20"
}
],
"printDetail": {
"cardNo64": "622562****8888",
"bank": "中国银行",
"paymentOrderNo": "201612315689412157458787",
"pointSale": "20000",
"qrCode1": "htt://www.api-location-url.com/url",
"qrCode2": "",
"qrCode3": "",
"barCode1": "12345679",
"barCode2": "",
"barCode3": ""
},
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Transaction support inquiry
- cardSale
- qrcodeSale
Trans Void(card)
Usage
- Invoke this API to reverse a transaction that dedicated by originalTraceNo.
Transaction Flow
- The requested transaction will send to e-Buy backend server, it will firstly invoke MIS-POS for Card swape and password input. Once MIS-POS confirmed on both inputs, it will send back to e-Buy backend server to process.
action
voidCardSale
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| originalTraceNo | String | Yes | last Cashier terminal trace no. | Cashier terminal trace no. in last transaction |
| acquirer | String | No | Acquirer Bank | Example:citicCashpay表示中信收单,如果收单撤销是必填的 |
Request body example
{
"traceNo": "99000009100010101732123",
"originalTraceNo": "99000009100010101732124",
"acquirer": "citicCashpay"
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| orderNo | String | Yes | Order No. from e-Buy | |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| discountCode | String | No | Discount Code | assigned by Cashier POS |
| tenderCode | String | No | Tender Code | assigned by Cashier POS,record payment method,like:2016120101|20.00 is payment 20yuan |
| fundChannel | List<fundChannel> | No | Channel of fund | |
| printDetail | Object<printDetail> | No | Printing message | Provided if required to print on the receipt |
| memberDetail | Object<memberDetail> | No | Member information | Member info return message on this transaction |
Response body example
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"discountCode": "0001",
"tenderCode": "8001",
"fundChannel": [
{
"channelNo": "001",
"channelName": "用户实付现金",
"channelAmount": "20.8"
},
{
"channelNo": "002",
"channelName": "用户积分支付",
"channelAmount": "20"
}
],
"printDetail": {
"cardNo64": "622562****8888",
"bank": "中信银行",
"paymentOrderNo": "201612315689412157458787",
"pointSale": "20000",
"qrCode1": "htt://www.api-location-url.com/url",
"qrCode2": "",
"qrCode3": "",
"barCode1": "12345679",
"barCode2": "",
"barCode3": ""
},
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Transaction support void
- cardPayment
- cardRedemption
Trans Void(qrcode)
Usage
- Invoke this API to reverse a transaction that dedicated by originalTraceNo.
action
voidQrcodeSale
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| originalTraceNo | String | Yes | last Cashier terminal trace no. | Cashier terminal trace no. in last transaction |
Request body example
{
"traceNo": "99000009100010101732123",
"originalTraceNo": "99000009100010101732124"
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| orderNo | String | Yes | Order No. from e-Buy | |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| discountCode | String | No | Discount Code | assigned by Cashier POS |
| tenderCode | String | No | Tender Code | assigned by Cashier POS,record payment method,like:2016120101|20.00 is payment 20yuan |
| fundChannel | List<fundChannel> | No | Channel of fund | |
| printDetail | Object<printDetail> | No | Printing message | Provided if required to print on the receipt |
| memberDetail | Object<memberDetail> | No | Member information | Member info return message on this transaction |
Response body example
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"discountCode": "0001",
"tenderCode": "8001",
"fundChannel": [
{
"channelNo": "001",
"channelName": "用户实付现金",
"channelAmount": "20.8"
},
{
"channelNo": "002",
"channelName": "用户积分支付",
"channelAmount": "20"
}
],
"printDetail": {
"cardNo64": "622562****8888",
"bank": "中信银行",
"paymentOrderNo": "201612315689412157458787",
"pointSale": "20000",
"qrCode1": "htt://www.api-location-url.com/url",
"qrCode2": "",
"qrCode3": "",
"barCode1": "12345679",
"barCode2": "",
"barCode3": ""
},
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Transaction support void
- qrcodeSale
Trans Refund(card)
Usage
- Invoke this API to refund a transaction that dedicated by originalTraceNo.
Transaction Flow
- The requested transaction will firstly invoke MIS-POS for Card swape and password input. Once MIS-POS confirmed on both inputs, it will send back to e-Buy backend server to process.
action
refundCardSale
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| originalTraceNo | String | Yes | last Cashier terminal trace no. | Cashier terminal trace no. in last transaction |
| refundAmount | Price | Yes | Refund Amount | Unit:Dollar |
| acquirer | String | No | Acquirer Bank | Example:citicCashpay |
Request body example
{
"traceNo": "99000009100010101732123",
"originalTraceNo": "99000009100010101732124",
"refundAmount": 40.8,
"acquirer": "citicCashpay"
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| orderNo | String | Yes | Order No. from e-Buy | |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| refundAmount | Price | Yes | Refunded Amount | Unit:Dollar |
| discountCode | String | No | Discount Code | assigned by Cashier POS |
| tenderCode | String | No | Tender Code | assigned by Cashier POS,record payment method,like:2016120101|20.00 is payment 20yuan |
| fundChannel | List<fundChannel> | No | Channel of fund | |
| printDetail | Object<printDetail> | No | Printing message | Provided if required to print on the receipt |
| memberDetail | Object<memberDetail> | No | Member information | Member info return message on this transaction |
Response body example
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"discountCode": "0001",
"tenderCode": "8001",
"refundAmount": 40.8,
"fundChannel": [
{
"channelNo": "001",
"channelName": "用户实付现金",
"channelAmount": "20.8"
},
{
"channelNo": "002",
"channelName": "用户积分支付",
"channelAmount": "20"
}
],
"printDetail": {
"cardNo64": "622562****8888",
"bank": "中信银行",
"paymentOrderNo": "201612315689412157458787",
"pointSale": "20000",
"qrCode1": "htt://www.api-location-url.com/url",
"qrCode2": "",
"qrCode3": "",
"barCode1": "12345679",
"barCode2": "",
"barCode3": ""
},
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Transaction support refund
- cardPayment
- CardRedemption
Trans Refund(qrcode)
Usage
- Invoke this API to refund a transaction that dedicated by originalTraceNo.
action
refundQrcodeSale
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| originalTraceNo | String | Yes | last Cashier terminal trace no. | Cashier terminal trace no. in last transaction |
| refundAmount | Price | Yes | Refund Amount | Unit:Dollar |
Request body example
{
"traceNo": "99000009100010101732123",
"originalTraceNo": "99000009100010101732124",
"refundAmount": 40.8
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| orderNo | String | Yes | Order No. from e-Buy | |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| refundAmount | Price | Yes | Refunded Amount | Unit:Dollar |
| discountCode | String | No | Discount Code | assigned by Cashier POS |
| tenderCode | String | No | Tender Code | assigned by Cashier POS,record payment method,like:2016120101|20.00 is payment 20yuan |
| fundChannel | List<fundChannel> | No | Channel of fund | |
| printDetail | Object<printDetail> | No | Printing message | Provided if required to print on the receipt |
| memberDetail | Object<memberDetail> | No | Member information | Member info return message on this transaction |
Response body example
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"refundAmount": 40.8,
"discountCode": "0001",
"tenderCode": "8001",
"fundChannel": [
{
"channelNo": "001",
"channelName": "用户实付现金",
"channelAmount": "20.8"
},
{
"channelNo": "002",
"channelName": "用户积分支付",
"channelAmount": "20"
}
],
"printDetail": {
"cardNo64": "622562****8888",
"bank": "中信银行",
"paymentOrderNo": "201612315689412157458787",
"pointSale": "20000",
"qrCode1": "htt://www.api-location-url.com/url",
"qrCode2": "",
"qrCode3": "",
"barCode1": "12345679",
"barCode2": "",
"barCode3": ""
},
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Transaction support refund
- qrcodeSale
Ecoupon Inquiry
Usage
- Inquiry product detail \ balance \ activity of this coupon, support e-Buy Ecoupon and thirdparty ecoupon.
Transaction Flow
- The transaction process will collect QR code message thru scanning or direct input through keypad, and it will send to e-Buy backend server after collection to further process.
action
ecouponInquiry
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| qrcode | String | Yes | ecoupon code | ecoupon code for inquiry |
Request body example
{
"traceNo": "99000009100010101732123",
"qrcode": "HDCP00000000001235"
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| orderNo | String | Yes | Order No. from e-Buy | Unit : dollar |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| canPayAmount | Price | Yes | Balance of this coupon | Unit : dollar |
| activityProductNo | String | No | Activity Product no. | The activity Product no. this coupon belongs to |
| activityProductName | String | No | Activity Product name | The activity Product name this coupon belongs to |
Response body example
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"canPayAmount": 40.8,
"activityProductNo": "2016123101",
"activityProductName": "中信365权益"
}
Point Accumulating
Usage
- Points accumulating
action
accumulating
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| totalAmount | Price | Yes | Total transaction amount | Unit : Dollar |
| undiscountAmount | Price | No | Undiscountable Amount | Unit : Dollar |
| activityNo | String | No | Activity NO | 收银机集点时填写,后台集点不填 |
| points | Integer | No | Points | 收银机集点时填写,后台集点不填 |
| goodsDetail | List<goodsDetail> | No | Goods detail | Mandated on goods detail verification |
| memberDetail | Object<memberDetail> | No | Member information | Mandated for member payment |
Request body example
{
"traceNo": "99000009100010101732123",
"totalAmount": 40.8,
"undiscountAmount": 0,
"activityNo": "2016121901",
"points": 100,
"goodsDetail": [
{
"goodsCategory": "001",
"goodsId": "P00001",
"goodsName": "牙膏",
"price": 8,
"quantity": 2,
"rebateCode": "000"
},
{
"goodsCategory": "101",
"goodsId": "P00002",
"goodsName": "洗发水",
"price": 24.8,
"quantity": 1,
"rebateCode": "000"
}
],
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| orderNo | String | Yes | Order No. from e-Buy | 易百生成 |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| activityProductNo | String | No | Activity Product no. | |
| activityProductName | String | No | Activity Product name | |
| printDetail | Object<printDetail> | No | Printing message | Provided if required to print on the receipt |
| memberDetail | Object<memberDetail> | No | Member information | Member info return message on this transaction |
Response body example
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"activityProductNo": "2016123102",
"activityProductName": "圣诞集点活动",
"printDetail": {
"cardNo64": "622562****8888",
"bank": "中国银行",
"paymentOrderNo": "201612315689412157458787",
"pointSale": "20000",
"qrCode1": "htt://www.xxx.com/url",
"qrCode2": "",
"qrCode3": "",
"barCode1": "12345679",
"barCode2": "",
"barCode3": ""
},
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
Management API
Daily Summary
Usage
- Invoke this API to summarize success transactions between current and last summary.
action
summary
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
Request body example
{
"traceNo": "99000009100010101732123"
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace no. | No repeat |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| settleRecord | List<settleRecord> | Yes | Settle Record | |
| beginDate | String | Yes | Settle start | Format:yyyyMMddHHmmss |
| endDate | String | Yes | Settle end | Format:yyyyMMddHHmmss |
| volume | Integer | Yes | Transaction Volume | Sum of volume in settleRecord |
| totalReceiptAmount | Price | Yes | Merchant Receipt Amount | Sum of totalReceiptAmount in settleRecord |
| totalAmount | Price | Yes | Total Amount | Sum of totalAmount in settleRecord |
Response body example
{
"traceNo": "99000009100010101732123",
"transDate": "20161231102201",
"returnCode": "00",
"returnDesc": "SUCCESS",
"settleRecord": [
{
"activityNo": "2016101201",
"activityName": "浦发银行积分兑换",
"productName": "大杯",
"customer": "浦发银行",
"isRefund": false,
"volume": 130,
"totalReceiptAmount": "2082.10",
"totalAmount": "2082.10"
},
{
"activityNo": "2016120301",
"activityName": "支付宝",
"productName": "全场产品",
"customer": "易百支付",
"isRefund": false,
"volume": 100,
"totalReceiptAmount": "234.10",
"totalAmount": "234.10"
}
],
"beginDate": "20161029113602",
"endDate": "20161030113602",
"volume": 230,
"totalReceiptAmount": 1900,
"totalAmount": 2000,
}
Batch Upload
Usage
- Batch upload transaction records to e-Buy Backend, and will be matched and return.Only support the transactions within 7 Days.
action
batchUpload
Request body,Cashier POS===>e-Buy Backend
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace No. | No repeat allowed |
| transCount | Integer | Yes | Upload size | Should equals to size of transRecord list |
| beginTime | String | Yes | Begin Time | Format:yyyyMMddHHmmss |
| endTime | String | Yes | End Time | Format:yyyyMMddHHmmss |
| transRecord | List<transRecord> | Yes | Transaction records | Maximum:5000 |
Request body example
{
"traceNo": "99000009100010101732123",
"transCount": 3,
"beginTime": "20161231102201",
"endTime": "20161231102230",
"transRecord": [
{
"traceNo": "99000009100010101732123",
"paidAmount": 100.00,
"status": 0
},
{
"traceNo": "99000009100010101732123",
"paidAmount": 200.00,
"status": 0
},
{
"traceNo": "99000009100010101732123",
"paidAmount": 300.00,
"status": 0
}
]
}
Response body,e-Buy Backend===>Cashier POS
| Field | Type | Mandatory | Description | Memo |
|---|---|---|---|---|
| traceNo | String | Yes | Cashier terminal trace No. | No repeat allowed |
| transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
| returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
| returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
| transRecord | List<transRecord> | Yes | Transaction records after match | Maximum:5000 |
Response body example
{
"traceNo": "99000009100010101732123",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"transRecord": [
{
"traceNo": "99000009100010101732123",
"paidAmount": 100.00,
"status": 1
},
{
"traceNo": "99000009100010101732123",
"paidAmount": 200.00,
"status": 2
},
{
"traceNo": "99000009100010101732123",
"paidAmount": 300.00,
"status": 3
}
]
}