# e-Buy 电子券4.0 英文

# Introduction

### Purpose

This is a integration system protocol between Cashier Terminal and Backend system.

To enable the Cashier Terminal and [e-Buy backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") payment and redemption business real-time transaction process and synchronization, reduce reconciliation errors, facilitate business transaction in real-time integration to [e-Buy backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") system, in order to support multiple business transaction demand, such as multiple payment method and redemption method.

### Physical Architecture

![Network](http://portal.e-buychina.com.cn/doc/Public/Uploads/2017-04-08/58e8f27eb9497.png "Network")

**Network illustration：**

- 1.Cashier POS and [MIS-POS](https://book.e-buy.com/link/124#bkmrk-mis-pos "Installed in merchants in-store POS machine, providing the operation activity to support and exchange function") 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](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS").
- 3.[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") is connected to each Credit card banking system thru leased line.

### Logic Architecture

![Middleware](http://portal.e-buychina.com.cn/doc/Public/Uploads/2017-04-08/58e8f6628b1df.png "Middleware")

**Flow illustration:**

- 1.Cashier POS initiates the payment transaction, including the related transaction information to push to the [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS").
- 2.[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") 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](https://book.e-buy.com/link/124#bkmrk-e-buy-pos "Same as MIS-POS, the device is installed in merchant on-site, providing the operation activity to support and exchange function") 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" &amp; "Value"

### PINPAD

PIN entry device

### e-Buy POS

Same as [MIS-POS](https://book.e-buy.com/link/124#bkmrk-mis-pos "Installed in merchants in-store POS machine, providing the operation activity to support and exchange function"), 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](https://book.e-buy.com/link/124#bkmrk-e-buy-pos "Same as MIS-POS, the device is installed in merchant on-site, providing the operation activity to support and exchange function")

### 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

<table id="bkmrk-content-description-" style="width: 519px;"><thead><tr><th style="width: 189px;">Content</th><th style="width: 330px;">Description</th></tr></thead><tbody><tr><td style="width: 189px;">Protocal</td><td style="width: 330px;">HTTP/HTTPS</td></tr><tr><td style="width: 189px;">HTTP Method</td><td style="width: 330px;">POST (application/json)</td></tr><tr><td style="width: 189px;">Message Type</td><td style="width: 330px;">JSON</td></tr><tr><td style="width: 189px;">Charset</td><td style="width: 330px;">UTF-8</td></tr><tr><td style="width: 189px;">Signature Algorithm</td><td style="width: 330px;">MD5</td></tr></tbody></table>

# Message Structure

#### **Request and response message are both use following structure**

<table id="bkmrk-no.-parameter-format"><thead><tr><th>No.</th><th>Parameter</th><th>Format</th><th>Reference</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>1</td><td>action</td><td>String</td><td>inquiry</td><td>Transaction Type</td><td>The specific interfaces with detail description</td></tr><tr><td>2</td><td>deviceNo</td><td>String</td><td>POS01</td><td>Cashier Terminal No.</td><td>To identify the Cashier Terminal used in this transaction</td></tr><tr><td>3</td><td>shopNo</td><td>String</td><td>CN123456</td><td>Shop No.</td><td>To identify the merchant / shop in this transaction</td></tr><tr><td>4</td><td>brand</td><td>String</td><td>663</td><td>Brand No.</td><td>To identify the Brand used in this transaction, allocated by e-Buy</td></tr><tr><td>5</td><td>body</td><td>String</td><td>BASE64</td><td>Message Detail</td><td>The specific interfaces with detail description</td></tr></tbody></table>

#### **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

<table id="bkmrk-field-type-mandatory"><thead><tr><th style="width: 115px;">Field</th><th style="width: 70px;">Type</th><th style="width: 90px;">Mandatory</th><th style="width: 120px;">Description</th><th style="width: 413px;">Memo</th></tr></thead><tbody><tr><td style="width: 115px;">goodsCategory</td><td style="width: 70px;">String</td><td style="width: 90px;">Yes</td><td style="width: 120px;">Goods Category</td><td style="width: 413px;"> </td></tr><tr><td style="width: 115px;">goodsId</td><td style="width: 70px;">String</td><td style="width: 90px;">Yes</td><td style="width: 120px;">Goods ID</td><td style="width: 413px;"> </td></tr><tr><td style="width: 115px;">goodsName</td><td style="width: 70px;">String</td><td style="width: 90px;">Yes</td><td style="width: 120px;">Goods Name</td><td style="width: 413px;">Used for report , receipt, slip printing</td></tr><tr><td style="width: 115px;">price</td><td style="width: 70px;">Price</td><td style="width: 90px;">Yes</td><td style="width: 120px;">Price</td><td style="width: 413px;">Unit : dollar</td></tr><tr><td style="width: 115px;">quantity</td><td style="width: 70px;">Integer</td><td style="width: 90px;">Yes</td><td style="width: 120px;">Quantity</td><td style="width: 413px;"> </td></tr><tr><td style="width: 115px;">rebateCode</td><td style="width: 70px;">String</td><td style="width: 90px;">No</td><td style="width: 120px;">Rebate Code</td><td style="width: 413px;">Cashier Terminal has pre-set the discount, mandated</td></tr><tr><td style="width: 115px;">activityNo</td><td style="width: 70px;">String</td><td style="width: 90px;">No</td><td style="width: 120px;">Activity No</td><td style="width: 413px;">Once [e-Buy backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") system confirm transaction success, a transaction activity number will return back</td></tr><tr><td style="width: 115px;">memo</td><td style="width: 70px;">String</td><td style="width: 90px;">No</td><td style="width: 120px;">Memo</td><td style="width: 413px;">Once [e-Buy backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") system confirm transaction success, some information will return such as electronic voucher number</td></tr></tbody></table>

### Fund Channel

- JSON Key is `fundChannel`, only in Response message, not mandatory

<table id="bkmrk-field-type-mandatory-0" style="width: 542px;"><thead><tr><th style="width: 122px;">Field</th><th style="width: 60px;">Type</th><th style="width: 96px;">Mandatory</th><th style="width: 129px;">Description</th><th style="width: 135px;">Memo</th></tr></thead><tbody><tr><td style="width: 122px;">channelNo</td><td style="width: 60px;">String</td><td style="width: 96px;">Yes</td><td style="width: 129px;">Channel No</td><td style="width: 135px;">Channel No</td></tr><tr><td style="width: 122px;">channelName</td><td style="width: 60px;">String</td><td style="width: 96px;">Yes</td><td style="width: 129px;">Channel Name</td><td style="width: 135px;">Channel Name</td></tr><tr><td style="width: 122px;">channelAmount</td><td style="width: 60px;">Price</td><td style="width: 96px;">Yes</td><td style="width: 129px;">Channel Amount</td><td style="width: 135px;">Channel Amount</td></tr></tbody></table>

- supported fund channel：

<table id="bkmrk-channelno-channelnam"><thead><tr><th style="width: 125px;">channelNo</th><th style="width: 233px;">channelName</th><th style="width: 451px;">Description</th></tr></thead><tbody><tr><td style="width: 125px;">user\_real\_money</td><td style="width: 233px;">User paid real money</td><td style="width: 451px;">Example：Alipay balance、Alipay Yuebao、Wechat balance、Debit Card or Credit card etc.</td></tr><tr><td style="width: 125px;">user\_balance</td><td style="width: 233px;">paid by user balance</td><td style="width: 451px;">Example：Alipay balance、Alipay Yuebao、Wechat balance etc.</td></tr><tr><td style="width: 125px;">user\_bank\_card</td><td style="width: 233px;">paid by user bank card</td><td style="width: 451px;">Example：Debit Card or Credit card</td></tr><tr><td style="width: 125px;">user\_credit</td><td style="width: 233px;">paid by user e-Wallet credit</td><td style="width: 451px;">Example：Alipay huabei，Jingdong credit</td></tr><tr><td style="width: 125px;">user\_points</td><td style="width: 233px;">paid by user points</td><td style="width: 451px;">Example：Credit card points，Tmall Points etc.</td></tr><tr><td style="width: 125px;">merchant\_benefit</td><td style="width: 233px;">the benifit provided by merchant</td><td style="width: 451px;">Example：Merchant discount，Merchant voucher etc.</td></tr><tr><td style="width: 125px;">platform\_benefit</td><td style="width: 233px;">the benifit provided by enterprise</td><td style="width: 451px;">Example：Payment platform discount, Payment platform voucher etc.</td></tr><tr><td style="width: 125px;">ebuy\_benefit</td><td style="width: 233px;">the benifit provided by e-Buy</td><td style="width: 451px;">Example：e-Buy discount, e-Buy voucher etc</td></tr></tbody></table>

### Print Detail

- JSON Key is `printDetail`, only in Response message, not mandatory

<table id="bkmrk-field-type-mandatory-1" style="height: 450px;"><thead><tr style="height: 45px;"><th style="height: 45px; width: 129px;">Field</th><th style="height: 45px; width: 59px;">Type</th><th style="height: 45px; width: 58px;">Mandatory</th><th style="height: 45px; width: 170px;">Description</th><th style="height: 45px; width: 382px;">Memo</th></tr></thead><tbody><tr style="height: 45px;"><td style="height: 45px; width: 129px;">cardNo64</td><td style="height: 45px; width: 59px;">String</td><td style="height: 45px; width: 58px;">No</td><td style="height: 45px; width: 170px;">The card number (first 6 digits and last 4 digits</td><td style="height: 45px; width: 382px;">The card number (first 6 digits and last 4 digits) is required to print as part of return message</td></tr><tr style="height: 45px;"><td style="height: 45px; width: 129px;">bank</td><td style="height: 45px; width: 59px;">String</td><td style="height: 45px; width: 58px;">No</td><td style="height: 45px; width: 170px;">Credit Card issued organization</td><td style="height: 45px; width: 382px;">The Credit Card issued organization is required to print as part of return message</td></tr><tr style="height: 45px;"><td style="height: 45px; width: 129px;">paymentOrderNo</td><td style="height: 45px; width: 59px;">String</td><td style="height: 45px; width: 58px;">No</td><td style="height: 45px; width: 170px;">Payment Order no.</td><td style="height: 45px; width: 382px;">Payment order no. is required to print as part of return message</td></tr><tr style="height: 17px;"><td style="height: 17px; width: 129px;">paymentUser</td><td style="height: 17px; width: 59px;">String</td><td style="height: 17px; width: 58px;">No</td><td style="height: 17px; width: 170px;">User account</td><td style="height: 17px; width: 382px;">User account need be printed.</td></tr><tr style="height: 27px;"><td style="height: 27px; width: 129px;">pointSale</td><td style="height: 27px; width: 59px;">String</td><td style="height: 27px; width: 58px;">No</td><td style="height: 27px; width: 170px;">Point deducted</td><td style="height: 27px; width: 382px;">Point deducted is required to print as part of return message</td></tr><tr style="height: 16px;"><td style="height: 16px; width: 129px;">qrCode1</td><td style="height: 16px; width: 59px;">String</td><td style="height: 16px; width: 58px;">No</td><td style="height: 16px; width: 170px;">Print QR code 1</td><td style="height: 16px; width: 382px;">QR code 1 is required to print as part of return message</td></tr><tr style="height: 16px;"><td style="height: 16px; width: 129px;">qrCode2</td><td style="height: 16px; width: 59px;">String</td><td style="height: 16px; width: 58px;">No</td><td style="height: 16px; width: 170px;">Print QR code 2</td><td style="height: 16px; width: 382px;">QR code 2 is required to print as part of return message</td></tr><tr style="height: 18px;"><td style="height: 18px; width: 129px;">qrCode3</td><td style="height: 18px; width: 59px;">String</td><td style="height: 18px; width: 58px;">No</td><td style="height: 18px; width: 170px;">Print QR code 3</td><td style="height: 18px; width: 382px;">QR code 3 is required to print as part of return message</td></tr><tr style="height: 45px;"><td style="height: 45px; width: 129px;">barCode1</td><td style="height: 45px; width: 59px;">String</td><td style="height: 45px; width: 58px;">No</td><td style="height: 45px; width: 170px;">Print Bar Code 1</td><td style="height: 45px; width: 382px;">Bar Code code 1 is required to print as part of return message</td></tr><tr style="height: 45px;"><td style="height: 45px; width: 129px;">barCode2</td><td style="height: 45px; width: 59px;">String</td><td style="height: 45px; width: 58px;">No</td><td style="height: 45px; width: 170px;">Print Bar Code 2</td><td style="height: 45px; width: 382px;">Bar Code code 2 is required to print as part of return message</td></tr><tr style="height: 45px;"><td style="height: 45px; width: 129px;">barCode3</td><td style="height: 45px; width: 59px;">String</td><td style="height: 45px; width: 58px;">No</td><td style="height: 45px; width: 170px;">Print Bar Code 3</td><td style="height: 45px; width: 382px;">Bar Code code 3 is required to print as part of return message</td></tr><tr style="height: 16px;"><td style="height: 16px; width: 129px;">content</td><td style="height: 16px; width: 59px;">String</td><td style="height: 16px; width: 58px;">No</td><td style="height: 16px; width: 170px;">Print Content</td><td style="height: 16px; width: 382px;">[TLV](https://book.e-buy.com/link/124#bkmrk-tlv "Communication protocol commonly used data formats, Comprise 3 parts: "Tag", "Length" & "Value"") Format，1F=Receipt title，2F=Receipt transtype</td></tr><tr style="height: 25px;"><td style="height: 25px; width: 129px;">printMode</td><td style="height: 25px; width: 59px;">String</td><td style="height: 25px; width: 58px;">No</td><td style="height: 25px; width: 170px;">Print Mode</td><td style="height: 25px; width: 382px;">1=1 Receipt，2=2 Receipts，3=3 Receipts</td></tr></tbody></table>

### Member Detail

- JSON Key is `memberDetail`, not mandatory

<table id="bkmrk-field-type-mandatory-2"><thead><tr><th>Field</th><th>Type</th><th>Mandatory</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>memberId</td><td>String</td><td>Yes</td><td>Member ID</td><td> </td></tr><tr><td>memberName</td><td>String</td><td>Yes</td><td>Member Name</td><td> </td></tr><tr><td>memberPhone</td><td>String</td><td>No</td><td>Member Mobile</td><td> </td></tr><tr><td>grade</td><td>String</td><td>No</td><td>Member Grade</td><td> </td></tr><tr><td>status</td><td>String</td><td>No</td><td>Member Status</td><td> </td></tr><tr><td>balance</td><td>String</td><td>No</td><td>Balance</td><td> </td></tr><tr><td>pointBalance</td><td>String</td><td>No</td><td>Point Balance</td></tr></tbody></table>

### Settle Record

- JSON Key is `settleRecord`, not mandatory

<table id="bkmrk-field-type-mandatory-3"><thead><tr><th>Field</th><th>Type</th><th>Mandatory</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>activityNo</td><td>String</td><td>Yes</td><td>Activity No</td><td> </td></tr><tr><td>activityName</td><td>String</td><td>Yes</td><td>Activity Name</td><td> </td></tr><tr><td>productName</td><td>String</td><td>Yes</td><td>Product Name</td><td> </td></tr><tr><td>customer</td><td>String</td><td>Yes</td><td>Settle Customer</td><td> </td></tr><tr><td>isRefund</td><td>Boolean</td><td>Yes</td><td>Is Refund</td><td> </td></tr><tr><td>volume</td><td>Integer</td><td>Yes</td><td>Transaction Volume</td><td> </td></tr><tr><td>totalReceiptAmount</td><td>Price</td><td>Yes</td><td>Merchant Receipt Amount</td><td> </td></tr><tr><td>totalAmount</td><td>Price</td><td>Yes</td><td>Total Amount</td></tr></tbody></table>

### Trans Record

- JSON Key is `transRecord`, mandatory

<table id="bkmrk-field-type-mandatory-4"><thead><tr><th>Field</th><th>Type</th><th>Mandatory</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>traceNo</td><td>String</td><td>Yes</td><td>Cashier terminal trace no.</td><td> </td></tr><tr><td>paidAmount</td><td>String</td><td>Yes</td><td>Paid Amount</td><td> </td></tr><tr><td>status</td><td>String</td><td>Yes</td><td>Match status</td><td>See detail</td></tr></tbody></table>

**status**

- 0 Initial
- 1 paidAmount [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") = request
- 2 paidAmount [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") &gt; request
- 3 paidAmount [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") &lt; request
- 4 Does not exist in [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")
- 5 Failed in [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")
- 6 Reversed in [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")
- 7 Rollbacked in [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")
- 8 Refunded in [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")
- 9 [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") process failed
- 10 [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") has, but Does not exist in Cashier POS

# Transaction API



# Bank Acquiring

#### **Transaction Flow**

- The requested transaction will firstly invoke [MIS-POS](https://book.e-buy.com/link/124#bkmrk-mis-pos "Installed in merchants in-store POS machine, providing the operation activity to support and exchange function") for Card swape and password input. Once [MIS-POS](https://book.e-buy.com/link/124#bkmrk-mis-pos "Installed in merchants in-store POS machine, providing the operation activity to support and exchange function") confirmed on both inputs, it will send back to [e-Buy backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") server to process.

#### **action**

- `cardPayment`

**Request body，Cashier POS===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory"><thead><tr><th style="width: 139px;">Field</th><th style="width: 168px;">Type</th><th style="width: 93px;">Mandatory</th><th style="width: 192px;">Description</th><th style="width: 217px;">Memo</th></tr></thead><tbody><tr><td style="width: 139px;">traceNo</td><td style="width: 168px;">String</td><td style="width: 93px;">Yes</td><td style="width: 192px;">Cashier terminal trace no.</td><td style="width: 217px;">No repeat</td></tr><tr><td style="width: 139px;">totalAmount</td><td style="width: 168px;">Price</td><td style="width: 93px;">Yes</td><td style="width: 192px;">Total transaction amount</td><td style="width: 217px;">Unit : Dollar</td></tr><tr><td style="width: 139px;">undiscountAmount</td><td style="width: 168px;">Price</td><td style="width: 93px;">Yes</td><td style="width: 192px;">undiscountable Amount</td><td style="width: 217px;">Unit : Dollar</td></tr><tr><td style="width: 139px;">acquirer</td><td style="width: 168px;">String</td><td style="width: 93px;">Yes</td><td style="width: 192px;">Acquirer Bank</td><td style="width: 217px;">Example：citicCashpay</td></tr><tr><td style="width: 139px;">goodsDetail</td><td style="width: 168px;">List&lt;[goodsDetail](https://book.e-buy.com/link/333#bkmrk-goods-detail "goodsDetail")&gt;</td><td style="width: 93px;">Yes</td><td style="width: 192px;">Goods detail</td><td style="width: 217px;">Mandated on goods detail verification</td></tr><tr><td style="width: 139px;">memberDetail</td><td style="width: 168px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 93px;">No</td><td style="width: 192px;">Member information</td><td style="width: 217px;">Mandated on member payment</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0"><thead><tr><th style="width: 149px;">Field</th><th style="width: 165px;">Type</th><th style="width: 62px;">Mandatory</th><th style="width: 126px;">Description</th><th style="width: 304px;">Memo</th></tr></thead><tbody><tr><td style="width: 149px;">traceNo</td><td style="width: 165px;">String</td><td style="width: 62px;">Yes</td><td style="width: 126px;">Cashier terminal trace no.</td><td style="width: 304px;">No repeat</td></tr><tr><td style="width: 149px;">orderNo</td><td style="width: 165px;">String</td><td style="width: 62px;">Yes</td><td style="width: 126px;">Order No. from e-Buy</td><td style="width: 304px;">易百生成</td></tr><tr><td style="width: 149px;">transDate</td><td style="width: 165px;">String</td><td style="width: 62px;">Yes</td><td style="width: 126px;">Transaction time</td><td style="width: 304px;">Format：yyyyMMddHHmmss</td></tr><tr><td style="width: 149px;">returnCode</td><td style="width: 165px;">String</td><td style="width: 62px;">Yes</td><td style="width: 126px;">Return code</td><td style="width: 304px;">00 represent successful transaction, else represent fail</td></tr><tr><td style="width: 149px;">returnDesc</td><td style="width: 165px;">String</td><td style="width: 62px;">Yes</td><td style="width: 126px;">Return message</td><td style="width: 304px;">Detail explanation / error message per transaction result</td></tr><tr><td style="width: 149px;">paidAmount</td><td style="width: 165px;">Price</td><td style="width: 62px;">Yes</td><td style="width: 126px;">Total amount paid</td><td style="width: 304px;">Face Value. Unit : Dollar</td></tr><tr><td style="width: 149px;">receiptAmount</td><td style="width: 165px;">Price</td><td style="width: 62px;">No</td><td style="width: 126px;">Merchant actual received amount</td><td style="width: 304px;">Net Value. Unit : Dollar</td></tr><tr><td style="width: 149px;">invoiceAmount</td><td style="width: 165px;">Price</td><td style="width: 62px;">No</td><td style="width: 126px;">Merchant invoice amount</td><td style="width: 304px;">Unit : Dollar</td></tr><tr><td style="width: 149px;">exchangeRate</td><td style="width: 165px;">Number(8,6)</td><td style="width: 62px;">No</td><td style="width: 126px;">Exchange Rate</td><td style="width: 304px;">The rate of conversion the currency given in the request to CNY.</td></tr><tr><td style="width: 149px;">currency</td><td style="width: 165px;">String</td><td style="width: 62px;">No</td><td style="width: 126px;">Currency</td><td style="width: 304px;">For example: CNY</td></tr><tr><td style="width: 149px;">discountCode</td><td style="width: 165px;">String</td><td style="width: 62px;">No</td><td style="width: 126px;">Discount Code</td><td style="width: 304px;">assigned by Cashier POS,用于入账计折扣类型，如：2016120101|20.00表示支付20元</td></tr><tr><td style="width: 149px;">discountNum</td><td style="width: 165px;">Number</td><td style="width: 62px;">No</td><td style="width: 126px;">numbers of discountCode</td><td style="width: 304px;">用于入账计折扣类型的数量</td></tr><tr><td style="width: 149px;">tenderCode</td><td style="width: 165px;">String</td><td style="width: 62px;">No</td><td style="width: 126px;">Tender Code</td><td style="width: 304px;">assigned by Cashier POS,用于入账计支付方式，如：2016120101|20.00表示支付20元</td></tr><tr><td style="width: 149px;">activityProductNo</td><td style="width: 165px;">String</td><td style="width: 62px;">No</td><td style="width: 126px;">Activity Product no.</td><td style="width: 304px;"> </td></tr><tr><td style="width: 149px;">activityProductName</td><td style="width: 165px;">String</td><td style="width: 62px;">No</td><td style="width: 126px;">Activity Product name</td><td style="width: 304px;"> </td></tr><tr><td style="width: 149px;">needSameCard</td><td style="width: 165px;">Boolean</td><td style="width: 62px;">No</td><td style="width: 126px;">Required same card payment</td><td style="width: 304px;">Such as discount upon amount reached, same credit card must be used for the payment</td></tr><tr><td style="width: 149px;">goodsDetail</td><td style="width: 165px;">List&lt;[goodsDetail](https://book.e-buy.com/link/333#bkmrk-goods-detail "goodsDetail")&gt;</td><td style="width: 62px;">No</td><td style="width: 126px;">Paid product detail</td><td style="width: 304px;">Backend response paid product detail</td></tr><tr><td style="width: 149px;">fundChannel</td><td style="width: 165px;">List&lt;[fundChannel](https://book.e-buy.com/link/333#bkmrk-fund-channel "fundChannel")&gt;</td><td style="width: 62px;">No</td><td style="width: 126px;">Channel of fund</td><td style="width: 304px;"> </td></tr><tr><td style="width: 149px;">printDetail</td><td style="width: 165px;">Object&lt;[printDetail](https://book.e-buy.com/link/333#bkmrk-print-detail "printDetail")&gt;</td><td style="width: 62px;">No</td><td style="width: 126px;">Printing message</td><td style="width: 304px;">Provided if required to print on the receipt</td></tr><tr><td style="width: 149px;">memberDetail</td><td style="width: 165px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 62px;">No</td><td style="width: 126px;">Member information</td><td style="width: 304px;">Member info return message on this transaction</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-mis-pos "Installed in merchants in-store POS machine, providing the operation activity to support and exchange function") for Card swape and password input. Once [MIS-POS](https://book.e-buy.com/link/124#bkmrk-mis-pos "Installed in merchants in-store POS machine, providing the operation activity to support and exchange function") confirmed on both inputs, it will send back to [e-Buy backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") server to process.

#### **action**

- `cardRedemption`

**Request body，Cashier POS===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory"><thead><tr><th style="width: 138px;">Field</th><th style="width: 169px;">Type</th><th style="width: 90px;">Mandatory</th><th style="width: 157px;">Description</th><th style="width: 255px;">Memo</th></tr></thead><tbody><tr><td style="width: 138px;">traceNo</td><td style="width: 169px;">String</td><td style="width: 90px;">Yes</td><td style="width: 157px;">Cashier terminal trace no.</td><td style="width: 255px;">No repeat，建议yyyyMMddHHmmss+10位流水号</td></tr><tr><td style="width: 138px;">totalAmount</td><td style="width: 169px;">Price</td><td style="width: 90px;">Yes</td><td style="width: 157px;">Total transaction amount</td><td style="width: 255px;">Unit : Dollar</td></tr><tr><td style="width: 138px;">undiscountAmount</td><td style="width: 169px;">Price</td><td style="width: 90px;">Yes</td><td style="width: 157px;">undiscountable Amount</td><td style="width: 255px;">Unit : Dollar</td></tr><tr><td style="width: 138px;">goodsDetail</td><td style="width: 169px;">List&lt;[goodsDetail](https://book.e-buy.com/link/333#bkmrk-goods-detail "goodsDetail")&gt;</td><td style="width: 90px;">Yes</td><td style="width: 157px;">Goods detail</td><td style="width: 255px;">Mandated on goods detail verification</td></tr><tr><td style="width: 138px;">memberDetail</td><td style="width: 169px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 90px;">No</td><td style="width: 157px;">Member information</td><td style="width: 255px;">Mandated on member payment</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0"><thead><tr><th style="width: 150px;">Field</th><th style="width: 142px;">Type</th><th style="width: 57px;">Mandatory</th><th style="width: 154px;">Description</th><th style="width: 306px;">Memo</th></tr></thead><tbody><tr><td style="width: 150px;">traceNo</td><td style="width: 142px;">String</td><td style="width: 57px;">Yes</td><td style="width: 154px;">Cashier terminal trace no.</td><td style="width: 306px;">No repeat</td></tr><tr><td style="width: 150px;">orderNo</td><td style="width: 142px;">String</td><td style="width: 57px;">Yes</td><td style="width: 154px;">Order No. from e-Buy</td><td style="width: 306px;">易百生成</td></tr><tr><td style="width: 150px;">transDate</td><td style="width: 142px;">String</td><td style="width: 57px;">Yes</td><td style="width: 154px;">Transaction time</td><td style="width: 306px;">Format：yyyyMMddHHmmss</td></tr><tr><td style="width: 150px;">returnCode</td><td style="width: 142px;">String</td><td style="width: 57px;">Yes</td><td style="width: 154px;">Return code</td><td style="width: 306px;">00 represent successful transaction, else represent fail</td></tr><tr><td style="width: 150px;">returnDesc</td><td style="width: 142px;">String</td><td style="width: 57px;">Yes</td><td style="width: 154px;">Return message</td><td style="width: 306px;">Detail explanation / error message per transaction result</td></tr><tr><td style="width: 150px;">paidAmount</td><td style="width: 142px;">Price</td><td style="width: 57px;">Yes</td><td style="width: 154px;">Total amount paid</td><td style="width: 306px;">Face Value. Unit : Dollar</td></tr><tr><td style="width: 150px;">receiptAmount</td><td style="width: 142px;">Price</td><td style="width: 57px;">No</td><td style="width: 154px;">Merchant actual received amount</td><td style="width: 306px;">Net Value. Unit : Dollar</td></tr><tr><td style="width: 150px;">invoiceAmount</td><td style="width: 142px;">Price</td><td style="width: 57px;">No</td><td style="width: 154px;">Merchant invoice amount</td><td style="width: 306px;">Unit : Dollar</td></tr><tr><td style="width: 150px;">exchangeRate</td><td style="width: 142px;">Number(8,6)</td><td style="width: 57px;">No</td><td style="width: 154px;">Exchange Rate</td><td style="width: 306px;">The rate of conversion the currency given in the request to CNY.</td></tr><tr><td style="width: 150px;">currency</td><td style="width: 142px;">String</td><td style="width: 57px;">No</td><td style="width: 154px;">Currency</td><td style="width: 306px;">For example: CNY</td></tr><tr><td style="width: 150px;">discountCode</td><td style="width: 142px;">String</td><td style="width: 57px;">No</td><td style="width: 154px;">Discount Code</td><td style="width: 306px;">assigned by Cashier POS</td></tr><tr><td style="width: 150px;">discountNum</td><td style="width: 142px;">Number</td><td style="width: 57px;">No</td><td style="width: 154px;">numbers of discountCode</td><td style="width: 306px;">用于入账计折扣类型的数量</td></tr><tr><td style="width: 150px;">tenderCode</td><td style="width: 142px;">String</td><td style="width: 57px;">No</td><td style="width: 154px;">Tender Code</td><td style="width: 306px;">assigned by Cashier POS,用于入账计支付方式，如：2016120101|20.00表示支付20元</td></tr><tr><td style="width: 150px;">activityProductNo</td><td style="width: 142px;">String</td><td style="width: 57px;">No</td><td style="width: 154px;">Activity Product no.</td><td style="width: 306px;"> </td></tr><tr><td style="width: 150px;">activityProductName</td><td style="width: 142px;">String</td><td style="width: 57px;">No</td><td style="width: 154px;">Activity Product name</td><td style="width: 306px;"> </td></tr><tr><td style="width: 150px;">needSameCard</td><td style="width: 142px;">Boolean</td><td style="width: 57px;">No</td><td style="width: 154px;">Required same card payment</td><td style="width: 306px;">Such as discount upon amount reached, same credit card must be used for the payment</td></tr><tr><td style="width: 150px;">goodsDetail</td><td style="width: 142px;">List&lt;[goodsDetail](https://book.e-buy.com/link/333#bkmrk-goods-detail "goodsDetail")&gt;</td><td style="width: 57px;">No</td><td style="width: 154px;">Paid product detail</td><td style="width: 306px;">Backend response paid product detail</td></tr><tr><td style="width: 150px;">fundChannel</td><td style="width: 142px;">List&lt;[fundChannel](https://book.e-buy.com/link/333#bkmrk-fund-channel "fundChannel")&gt;</td><td style="width: 57px;">No</td><td style="width: 154px;">Channel of fund</td><td style="width: 306px;"> </td></tr><tr><td style="width: 150px;">printDetail</td><td style="width: 142px;">Object&lt;[printDetail](https://book.e-buy.com/link/333#bkmrk-print-detail "printDetail")&gt;</td><td style="width: 57px;">No</td><td style="width: 154px;">Printing message</td><td style="width: 306px;">Provided if required to print on the receipt</td></tr><tr><td style="width: 150px;">memberDetail</td><td style="width: 142px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 57px;">No</td><td style="width: 154px;">Member information</td><td style="width: 306px;">Member info return message on this transaction</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") server after collection to further process.

#### **action**

- `qrcodeSale`

**Request body，Cashier POS===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory" style="height: 241px;"><thead><tr style="height: 29px;"><th style="width: 142px; height: 29px;">Field</th><th style="width: 168px; height: 29px;">Type</th><th style="width: 90px; height: 29px;">Mandatory</th><th style="width: 175px; height: 29px;">Description</th><th style="width: 234px; height: 29px;">Memo</th></tr></thead><tbody><tr style="height: 29px;"><td style="width: 142px; height: 29px;">traceNo</td><td style="width: 168px; height: 29px;">String</td><td style="width: 90px; height: 29px;">Yes</td><td style="width: 175px; height: 29px;">Cashier terminal trace no.</td><td style="width: 234px; height: 29px;">No repeat</td></tr><tr style="height: 29px;"><td style="width: 142px; height: 29px;">totalAmount</td><td style="width: 168px; height: 29px;">Price</td><td style="width: 90px; height: 29px;">Yes</td><td style="width: 175px; height: 29px;">Total transaction amount</td><td style="width: 234px; height: 29px;">Unit : Dollar</td></tr><tr style="height: 29px;"><td style="width: 142px; height: 29px;">undiscountAmount</td><td style="width: 168px; height: 29px;">Price</td><td style="width: 90px; height: 29px;">Yes</td><td style="width: 175px; height: 29px;">Undiscountable Amount</td><td style="width: 234px; height: 29px;">Unit : Dollar</td></tr><tr style="height: 29px;"><td style="width: 142px; height: 29px;">qrcode</td><td style="width: 168px; height: 29px;">String</td><td style="width: 90px; height: 29px;">Yes</td><td style="width: 175px; height: 29px;">QR-Code</td><td style="width: 234px; height: 29px;">串号、一维码或二维码内容</td></tr><tr style="height: 48px;"><td style="width: 142px; height: 48px;">goodsDetail</td><td style="width: 168px; height: 48px;">List&lt;[goodsDetail](https://book.e-buy.com/link/333#bkmrk-goods-detail "goodsDetail")&gt;</td><td style="width: 90px; height: 48px;">Yes</td><td style="width: 175px; height: 48px;">Goods detail</td><td style="width: 234px; height: 48px;">Mandated on goods detail verification</td></tr><tr style="height: 48px;"><td style="width: 142px; height: 48px;">memberDetail</td><td style="width: 168px; height: 48px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 90px; height: 48px;">No</td><td style="width: 175px; height: 48px;">Member information</td><td style="width: 234px; height: 48px;">Mandated for member payment</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0"><thead><tr><th style="width: 148px;">Field</th><th style="width: 145px;">Type</th><th style="width: 54px;">Mandatory</th><th style="width: 184px;">Description</th><th style="width: 274px;">Memo</th></tr></thead><tbody><tr><td style="width: 148px;">traceNo</td><td style="width: 145px;">String</td><td style="width: 54px;">Yes</td><td style="width: 184px;">Cashier terminal trace no.</td><td style="width: 274px;">No repeat</td></tr><tr><td style="width: 148px;">orderNo</td><td style="width: 145px;">String</td><td style="width: 54px;">Yes</td><td style="width: 184px;">Order No. from e-Buy</td><td style="width: 274px;">made by Ebuy</td></tr><tr><td style="width: 148px;">transDate</td><td style="width: 145px;">String</td><td style="width: 54px;">Yes</td><td style="width: 184px;">Transaction time</td><td style="width: 274px;">Format：yyyyMMddHHmmss</td></tr><tr><td style="width: 148px;">returnCode</td><td style="width: 145px;">String</td><td style="width: 54px;">Yes</td><td style="width: 184px;">Return code</td><td style="width: 274px;">00 represent successful transaction, else represent fail</td></tr><tr><td style="width: 148px;">returnDesc</td><td style="width: 145px;">String</td><td style="width: 54px;">Yes</td><td style="width: 184px;">Return message</td><td style="width: 274px;">Detail explanation / error message per transaction result</td></tr><tr><td style="width: 148px;">paidAmount</td><td style="width: 145px;">Price</td><td style="width: 54px;">Yes</td><td style="width: 184px;">Total amount paid</td><td style="width: 274px;">Face Value. Unit : Dollar</td></tr><tr><td style="width: 148px;">receiptAmount</td><td style="width: 145px;">Price</td><td style="width: 54px;">No</td><td style="width: 184px;">Merchant actual received amount</td><td style="width: 274px;">Net Value. Unit : Dollar</td></tr><tr><td style="width: 148px;">invoiceAmount</td><td style="width: 145px;">Price</td><td style="width: 54px;">No</td><td style="width: 184px;">Merchant invoice amount</td><td style="width: 274px;">Unit : Dollar</td></tr><tr><td style="width: 148px;">exchangeRate</td><td style="width: 145px;">Number(8,6)</td><td style="width: 54px;">No</td><td style="width: 184px;">Exchange Rate</td><td style="width: 274px;">The rate of conversion the currency given in the request to CNY.</td></tr><tr><td style="width: 148px;">currency</td><td style="width: 145px;">String</td><td style="width: 54px;">No</td><td style="width: 184px;">Currency</td><td style="width: 274px;">For example: CNY</td></tr><tr><td style="width: 148px;">discountCode</td><td style="width: 145px;">String</td><td style="width: 54px;">No</td><td style="width: 184px;">Discount Code</td><td style="width: 274px;">assigned by Cashier POS</td></tr><tr><td style="width: 148px;">discountNum</td><td style="width: 145px;">Number</td><td style="width: 54px;">No</td><td style="width: 184px;">numbers of discountCode</td><td style="width: 274px;">用于入账计折扣类型的数量</td></tr><tr><td style="width: 148px;">tenderCode</td><td style="width: 145px;">String</td><td style="width: 54px;">No</td><td style="width: 184px;">Tender Code</td><td style="width: 274px;">assigned by Cashier POS,record payment method，like：2016120101|20.00 is payment 20yuan</td></tr><tr><td style="width: 148px;">activityProductNo</td><td style="width: 145px;">String</td><td style="width: 54px;">No</td><td style="width: 184px;">Activity Product no.</td><td style="width: 274px;"> </td></tr><tr><td style="width: 148px;">activityProductName</td><td style="width: 145px;">String</td><td style="width: 54px;">No</td><td style="width: 184px;">Activity Product name</td><td style="width: 274px;"> </td></tr><tr><td style="width: 148px;">goodsDetail</td><td style="width: 145px;">List&lt;[goodsDetail](https://book.e-buy.com/link/333#bkmrk-goods-detail "goodsDetail")&gt;</td><td style="width: 54px;">No</td><td style="width: 184px;">Paid product detail</td><td style="width: 274px;">Backend response paid product detail</td></tr><tr><td style="width: 148px;">fundChannel</td><td style="width: 145px;">List&lt;[fundChannel](https://book.e-buy.com/link/333#bkmrk-fund-channel "fundChannel")&gt;</td><td style="width: 54px;">No</td><td style="width: 184px;">Channel of fund</td><td style="width: 274px;"> </td></tr><tr><td style="width: 148px;">printDetail</td><td style="width: 145px;">Object&lt;[printDetail](https://book.e-buy.com/link/333#bkmrk-print-detail "printDetail")&gt;</td><td style="width: 54px;">No</td><td style="width: 184px;">Printing message</td><td style="width: 274px;">Provided if required to print on the receipt</td></tr><tr><td style="width: 148px;">memberDetail</td><td style="width: 145px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 54px;">No</td><td style="width: 184px;">Member information</td><td style="width: 274px;">Member info return message on this transaction</td></tr></tbody></table>

#### **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===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory"><thead><tr><th>Field</th><th>Type</th><th>Mandatory</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>traceNo</td><td>String</td><td>Yes</td><td>Cashier trace no.</td><td>No repeat</td></tr><tr><td>originalTraceNo</td><td>String</td><td>Yes</td><td>Original Cashier trace no.</td><td>传入需要查询的原交易收银机流水号</td></tr></tbody></table>

#### **Request body example**

```
{
    "traceNo": "99000009100010101732123",
    "originalTraceNo": "99000009100010101732124"
}

```

**Response body，[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0" style="height: 844px;"><thead><tr style="height: 45px;"><th style="width: 150px; height: 45px;">Field</th><th style="width: 142px; height: 45px;">Type</th><th style="width: 57px; height: 45px;">Mandatory</th><th style="width: 182px; height: 45px;">Description</th><th style="width: 276px; height: 45px;">Memo</th></tr></thead><tbody><tr style="height: 29px;"><td style="width: 150px; height: 29px;">traceNo</td><td style="width: 142px; height: 29px;">String</td><td style="width: 57px; height: 29px;">Yes</td><td style="width: 182px; height: 29px;">Cashier terminal trace no.</td><td style="width: 276px; height: 29px;">No repeat</td></tr><tr style="height: 29px;"><td style="width: 150px; height: 29px;">orderNo</td><td style="width: 142px; height: 29px;">String</td><td style="width: 57px; height: 29px;">Yes</td><td style="width: 182px; height: 29px;">Order No. from e-Buy</td><td style="width: 276px; height: 29px;">Unit：Dollar</td></tr><tr style="height: 29px;"><td style="width: 150px; height: 29px;">transDate</td><td style="width: 142px; height: 29px;">String</td><td style="width: 57px; height: 29px;">Yes</td><td style="width: 182px; height: 29px;">Transaction time</td><td style="width: 276px; height: 29px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 45px;"><td style="width: 150px; height: 45px;">returnCode</td><td style="width: 142px; height: 45px;">String</td><td style="width: 57px; height: 45px;">Yes</td><td style="width: 182px; height: 45px;">Return code</td><td style="width: 276px; height: 45px;">00 represent successful transaction, else represent fail</td></tr><tr style="height: 45px;"><td style="width: 150px; height: 45px;">returnDesc</td><td style="width: 142px; height: 45px;">String</td><td style="width: 57px; height: 45px;">Yes</td><td style="width: 182px; height: 45px;">Return message</td><td style="width: 276px; height: 45px;">Detail explanation / error message per transaction result</td></tr><tr style="height: 29px;"><td style="width: 150px; height: 29px;">paidAmount</td><td style="width: 142px; height: 29px;">Price</td><td style="width: 57px; height: 29px;">Yes</td><td style="width: 182px; height: 29px;">Total amount paid</td><td style="width: 276px; height: 29px;">Face Value. Unit : Dollar</td></tr><tr style="height: 45px;"><td style="width: 150px; height: 45px;">receiptAmount</td><td style="width: 142px; height: 45px;">Price</td><td style="width: 57px; height: 45px;">No</td><td style="width: 182px; height: 45px;">Merchant actual received amount</td><td style="width: 276px; height: 45px;">Net Value. Unit : Dollar</td></tr><tr style="height: 29px;"><td style="width: 150px; height: 29px;">invoiceAmount</td><td style="width: 142px; height: 29px;">Price</td><td style="width: 57px; height: 29px;">No</td><td style="width: 182px; height: 29px;">Merchant invoice amount</td><td style="width: 276px; height: 29px;">Unit : Dollar</td></tr><tr style="height: 45px;"><td style="width: 150px; height: 45px;">exchangeRate</td><td style="width: 142px; height: 45px;">Number(8,6)</td><td style="width: 57px; height: 45px;">No</td><td style="width: 182px; height: 45px;">Exchange Rate</td><td style="width: 276px; height: 45px;">The rate of conversion the currency given in the request to CNY.</td></tr><tr style="height: 29px;"><td style="width: 150px; height: 29px;">currency</td><td style="width: 142px; height: 29px;">String</td><td style="width: 57px; height: 29px;">No</td><td style="width: 182px; height: 29px;">Currency</td><td style="width: 276px; height: 29px;">For example: CNY</td></tr><tr style="height: 61px;"><td style="width: 150px; height: 61px;">discountCode</td><td style="width: 142px; height: 61px;">String</td><td style="width: 57px; height: 61px;">No</td><td style="width: 182px; height: 61px;">Discount Code</td><td style="width: 276px; height: 61px;">assigned by Cashier POS，用于入账计折扣类型，如：2016120102|10.00表示折扣10元</td></tr><tr style="height: 29px;"><td style="width: 150px; height: 29px;">discountNum</td><td style="width: 142px; height: 29px;">Number</td><td style="width: 57px; height: 29px;">No</td><td style="width: 182px; height: 29px;">numbers of discountCode</td><td style="width: 276px; height: 29px;">用于入账计折扣类型的数量</td></tr><tr style="height: 61px;"><td style="width: 150px; height: 61px;">tenderCode</td><td style="width: 142px; height: 61px;">String</td><td style="width: 57px; height: 61px;">No</td><td style="width: 182px; height: 61px;">Tender Code</td><td style="width: 276px; height: 61px;">assigned by Cashier POS，用于入账计支付方式，如：2016120101|20.00表示支付20元</td></tr><tr style="height: 29px;"><td style="width: 150px; height: 29px;">activityProductNo</td><td style="width: 142px; height: 29px;">String</td><td style="width: 57px; height: 29px;">No</td><td style="width: 182px; height: 29px;">Activity Product no.</td><td style="width: 276px; height: 29px;"> </td></tr><tr style="height: 29px;"><td style="width: 150px; height: 29px;">activityProductName</td><td style="width: 142px; height: 29px;">String</td><td style="width: 57px; height: 29px;">No</td><td style="width: 182px; height: 29px;">Activity Product name</td><td style="width: 276px; height: 29px;"> </td></tr><tr style="height: 61px;"><td style="width: 150px; height: 61px;">needSameCard</td><td style="width: 142px; height: 61px;">Boolean</td><td style="width: 57px; height: 61px;">No</td><td style="width: 182px; height: 61px;">Required same card payment</td><td style="width: 276px; height: 61px;">Such as discount upon amount reached, same credit card must be used for the payment</td></tr><tr style="height: 35px;"><td style="width: 150px; height: 35px;">goodsDetail</td><td style="width: 142px; height: 35px;">List&lt;[goodsDetail](https://book.e-buy.com/link/333#bkmrk-goods-detail "goodsDetail")&gt;</td><td style="width: 57px; height: 35px;">No</td><td style="width: 182px; height: 35px;">Paid product detail</td><td style="width: 276px; height: 35px;">Backend response paid product detail</td></tr><tr style="height: 35px;"><td style="width: 150px; height: 35px;">fundChannel</td><td style="width: 142px; height: 35px;">List&lt;[fundChannel](https://book.e-buy.com/link/333#bkmrk-fund-channel "fundChannel")&gt;</td><td style="width: 57px; height: 35px;">No</td><td style="width: 182px; height: 35px;">Channel of fund</td><td style="width: 276px; height: 35px;"> </td></tr><tr style="height: 48px;"><td style="width: 150px; height: 48px;">printDetail</td><td style="width: 142px; height: 48px;">Object&lt;[printDetail](https://book.e-buy.com/link/333#bkmrk-print-detail "printDetail")&gt;</td><td style="width: 57px; height: 48px;">No</td><td style="width: 182px; height: 48px;">Printing message</td><td style="width: 276px; height: 48px;">Provided if required to print on the receipt</td></tr><tr style="height: 57px;"><td style="width: 150px; height: 57px;">memberDetail</td><td style="width: 142px; height: 57px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 57px; height: 57px;">No</td><td style="width: 182px; height: 57px;">Member information</td><td style="width: 276px; height: 57px;">Member info return message on this transaction</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") server, it will firstly invoke [MIS-POS](https://book.e-buy.com/link/124#bkmrk-mis-pos "Installed in merchants in-store POS machine, providing the operation activity to support and exchange function") for Card swape and password input. Once [MIS-POS](https://book.e-buy.com/link/124#bkmrk-mis-pos "Installed in merchants in-store POS machine, providing the operation activity to support and exchange function") confirmed on both inputs, it will send back to [e-Buy backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") server to process.

#### **action**

- `voidCardSale`

**Request body，Cashier POS===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory"><thead><tr><th style="width: 117px;">Field</th><th style="width: 85px;">Type</th><th style="width: 100px;">Mandatory</th><th style="width: 205px;">Description</th><th style="width: 300px;">Memo</th></tr></thead><tbody><tr><td style="width: 117px;">traceNo</td><td style="width: 85px;">String</td><td style="width: 100px;">Yes</td><td style="width: 205px;">Cashier terminal trace no.</td><td style="width: 300px;">No repeat</td></tr><tr><td style="width: 117px;">originalTraceNo</td><td style="width: 85px;">String</td><td style="width: 100px;">Yes</td><td style="width: 205px;">last Cashier terminal trace no.</td><td style="width: 300px;">Cashier terminal trace no. in last transaction</td></tr><tr><td style="width: 117px;">acquirer</td><td style="width: 85px;">String</td><td style="width: 100px;">No</td><td style="width: 205px;">Acquirer Bank</td><td style="width: 300px;">Example：citicCashpay表示中信收单，如果收单撤销是必填的</td></tr></tbody></table>

#### **Request body example**

```
{
    "traceNo": "99000009100010101732123",
    "originalTraceNo": "99000009100010101732124",
    "acquirer": "citicCashpay"
}

```

**Response body，[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0"><thead><tr><th style="width: 105px;">Field</th><th style="width: 147px;">Type</th><th style="width: 57px;">Mandatory</th><th style="width: 137px;">Description</th><th style="width: 361px;">Memo</th></tr></thead><tbody><tr><td style="width: 105px;">traceNo</td><td style="width: 147px;">String</td><td style="width: 57px;">Yes</td><td style="width: 137px;">Cashier terminal trace no.</td><td style="width: 361px;">No repeat</td></tr><tr><td style="width: 105px;">orderNo</td><td style="width: 147px;">String</td><td style="width: 57px;">Yes</td><td style="width: 137px;">Order No. from e-Buy</td><td style="width: 361px;"> </td></tr><tr><td style="width: 105px;">transDate</td><td style="width: 147px;">String</td><td style="width: 57px;">Yes</td><td style="width: 137px;">Transaction time</td><td style="width: 361px;">Format：yyyyMMddHHmmss</td></tr><tr><td style="width: 105px;">returnCode</td><td style="width: 147px;">String</td><td style="width: 57px;">Yes</td><td style="width: 137px;">Return code</td><td style="width: 361px;">00 represent successful transaction, else represent fail</td></tr><tr><td style="width: 105px;">returnDesc</td><td style="width: 147px;">String</td><td style="width: 57px;">Yes</td><td style="width: 137px;">Return message</td><td style="width: 361px;">Detail explanation / error message per transaction result</td></tr><tr><td style="width: 105px;">discountCode</td><td style="width: 147px;">String</td><td style="width: 57px;">No</td><td style="width: 137px;">Discount Code</td><td style="width: 361px;">assigned by Cashier POS</td></tr><tr><td style="width: 105px;">tenderCode</td><td style="width: 147px;">String</td><td style="width: 57px;">No</td><td style="width: 137px;">Tender Code</td><td style="width: 361px;">assigned by Cashier POS,record payment method，like：2016120101|20.00 is payment 20yuan</td></tr><tr><td style="width: 105px;">fundChannel</td><td style="width: 147px;">List&lt;[fundChannel](https://book.e-buy.com/link/333#bkmrk-fund-channel "fundChannel")&gt;</td><td style="width: 57px;">No</td><td style="width: 137px;">Channel of fund</td><td style="width: 361px;"> </td></tr><tr><td style="width: 105px;">printDetail</td><td style="width: 147px;">Object&lt;[printDetail](https://book.e-buy.com/link/333#bkmrk-print-detail "printDetail")&gt;</td><td style="width: 57px;">No</td><td style="width: 137px;">Printing message</td><td style="width: 361px;">Provided if required to print on the receipt</td></tr><tr><td style="width: 105px;">memberDetail</td><td style="width: 147px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 57px;">No</td><td style="width: 137px;">Member information</td><td style="width: 361px;">Member info return message on this transaction</td></tr></tbody></table>

#### **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===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory"><thead><tr><th>Field</th><th>Type</th><th>Mandatory</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>traceNo</td><td>String</td><td>Yes</td><td>Cashier terminal trace no.</td><td>No repeat</td></tr><tr><td>originalTraceNo</td><td>String</td><td>Yes</td><td>last Cashier terminal trace no.</td><td>Cashier terminal trace no. in last transaction</td></tr></tbody></table>

#### **Request body example**

```
{
    "traceNo": "99000009100010101732123",
    "originalTraceNo": "99000009100010101732124"
}

```

**Response body，[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0"><thead><tr><th style="width: 105px;">Field</th><th style="width: 147px;">Type</th><th style="width: 57px;">Mandatory</th><th style="width: 132px;">Description</th><th style="width: 366px;">Memo</th></tr></thead><tbody><tr><td style="width: 105px;">traceNo</td><td style="width: 147px;">String</td><td style="width: 57px;">Yes</td><td style="width: 132px;">Cashier terminal trace no.</td><td style="width: 366px;">No repeat</td></tr><tr><td style="width: 105px;">orderNo</td><td style="width: 147px;">String</td><td style="width: 57px;">Yes</td><td style="width: 132px;">Order No. from e-Buy</td><td style="width: 366px;"> </td></tr><tr><td style="width: 105px;">transDate</td><td style="width: 147px;">String</td><td style="width: 57px;">Yes</td><td style="width: 132px;">Transaction time</td><td style="width: 366px;">Format：yyyyMMddHHmmss</td></tr><tr><td style="width: 105px;">returnCode</td><td style="width: 147px;">String</td><td style="width: 57px;">Yes</td><td style="width: 132px;">Return code</td><td style="width: 366px;">00 represent successful transaction, else represent fail</td></tr><tr><td style="width: 105px;">returnDesc</td><td style="width: 147px;">String</td><td style="width: 57px;">Yes</td><td style="width: 132px;">Return message</td><td style="width: 366px;">Detail explanation / error message per transaction result</td></tr><tr><td style="width: 105px;">discountCode</td><td style="width: 147px;">String</td><td style="width: 57px;">No</td><td style="width: 132px;">Discount Code</td><td style="width: 366px;">assigned by Cashier POS</td></tr><tr><td style="width: 105px;">tenderCode</td><td style="width: 147px;">String</td><td style="width: 57px;">No</td><td style="width: 132px;">Tender Code</td><td style="width: 366px;">assigned by Cashier POS,record payment method，like：2016120101|20.00 is payment 20yuan</td></tr><tr><td style="width: 105px;">fundChannel</td><td style="width: 147px;">List&lt;[fundChannel](https://book.e-buy.com/link/333#bkmrk-fund-channel "fundChannel")&gt;</td><td style="width: 57px;">No</td><td style="width: 132px;">Channel of fund</td><td style="width: 366px;"> </td></tr><tr><td style="width: 105px;">printDetail</td><td style="width: 147px;">Object&lt;[printDetail](https://book.e-buy.com/link/333#bkmrk-print-detail "printDetail")&gt;</td><td style="width: 57px;">No</td><td style="width: 132px;">Printing message</td><td style="width: 366px;">Provided if required to print on the receipt</td></tr><tr><td style="width: 105px;">memberDetail</td><td style="width: 147px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 57px;">No</td><td style="width: 132px;">Member information</td><td style="width: 366px;">Member info return message on this transaction</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-mis-pos "Installed in merchants in-store POS machine, providing the operation activity to support and exchange function") for Card swape and password input. Once [MIS-POS](https://book.e-buy.com/link/124#bkmrk-mis-pos "Installed in merchants in-store POS machine, providing the operation activity to support and exchange function") confirmed on both inputs, it will send back to [e-Buy backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") server to process.

#### **action**

- `refundCardSale`

**Request body，Cashier POS===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory"><thead><tr><th>Field</th><th>Type</th><th>Mandatory</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>traceNo</td><td>String</td><td>Yes</td><td>Cashier terminal trace no.</td><td>No repeat</td></tr><tr><td>originalTraceNo</td><td>String</td><td>Yes</td><td>last Cashier terminal trace no.</td><td>Cashier terminal trace no. in last transaction</td></tr><tr><td>refundAmount</td><td>Price</td><td>Yes</td><td>Refund Amount</td><td>Unit：Dollar</td></tr><tr><td>acquirer</td><td>String</td><td>No</td><td>Acquirer Bank</td><td>Example：citicCashpay</td></tr></tbody></table>

#### **Request body example**

```
{
    "traceNo": "99000009100010101732123",
    "originalTraceNo": "99000009100010101732124",
    "refundAmount": 40.8,
    "acquirer": "citicCashpay"
}

```

**Response body，[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0" style="height: 484px;"><thead><tr style="height: 45px;"><th style="width: 108px; height: 45px;">Field</th><th style="width: 145px; height: 45px;">Type</th><th style="width: 60px; height: 45px;">Mandatory</th><th style="width: 174px; height: 45px;">Description</th><th style="width: 318px; height: 45px;">Memo</th></tr></thead><tbody><tr style="height: 45px;"><td style="width: 108px; height: 45px;">traceNo</td><td style="width: 145px; height: 45px;">String</td><td style="width: 60px; height: 45px;">Yes</td><td style="width: 174px; height: 45px;">Cashier terminal trace no.</td><td style="width: 318px; height: 45px;">No repeat</td></tr><tr style="height: 45px;"><td style="width: 108px; height: 45px;">orderNo</td><td style="width: 145px; height: 45px;">String</td><td style="width: 60px; height: 45px;">Yes</td><td style="width: 174px; height: 45px;">Order No. from e-Buy</td><td style="width: 318px; height: 45px;"> </td></tr><tr style="height: 29px;"><td style="width: 108px; height: 29px;">transDate</td><td style="width: 145px; height: 29px;">String</td><td style="width: 60px; height: 29px;">Yes</td><td style="width: 174px; height: 29px;">Transaction time</td><td style="width: 318px; height: 29px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 45px;"><td style="width: 108px; height: 45px;">returnCode</td><td style="width: 145px; height: 45px;">String</td><td style="width: 60px; height: 45px;">Yes</td><td style="width: 174px; height: 45px;">Return code</td><td style="width: 318px; height: 45px;">00 represent successful transaction, else represent fail</td></tr><tr style="height: 45px;"><td style="width: 108px; height: 45px;">returnDesc</td><td style="width: 145px; height: 45px;">String</td><td style="width: 60px; height: 45px;">Yes</td><td style="width: 174px; height: 45px;">Return message</td><td style="width: 318px; height: 45px;">Detail explanation / error message per transaction result</td></tr><tr style="height: 29px;"><td style="width: 108px; height: 29px;">refundAmount</td><td style="width: 145px; height: 29px;">Price</td><td style="width: 60px; height: 29px;">Yes</td><td style="width: 174px; height: 29px;">Refunded Amount</td><td style="width: 318px; height: 29px;">Unit：Dollar</td></tr><tr style="height: 29px;"><td style="width: 108px; height: 29px;">discountCode</td><td style="width: 145px; height: 29px;">String</td><td style="width: 60px; height: 29px;">No</td><td style="width: 174px; height: 29px;">Discount Code</td><td style="width: 318px; height: 29px;">assigned by Cashier POS</td></tr><tr style="height: 45px;"><td style="width: 108px; height: 45px;">tenderCode</td><td style="width: 145px; height: 45px;">String</td><td style="width: 60px; height: 45px;">No</td><td style="width: 174px; height: 45px;">Tender Code</td><td style="width: 318px; height: 45px;">assigned by Cashier POS,record payment method，like：2016120101|20.00 is payment 20yuan</td></tr><tr style="height: 35px;"><td style="width: 108px; height: 35px;">fundChannel</td><td style="width: 145px; height: 35px;">List&lt;[fundChannel](https://book.e-buy.com/link/333#bkmrk-fund-channel "fundChannel")&gt;</td><td style="width: 60px; height: 35px;">No</td><td style="width: 174px; height: 35px;">Channel of fund</td><td style="width: 318px; height: 35px;"> </td></tr><tr style="height: 35px;"><td style="width: 108px; height: 35px;">printDetail</td><td style="width: 145px; height: 35px;">Object&lt;[printDetail](https://book.e-buy.com/link/333#bkmrk-print-detail "printDetail")&gt;</td><td style="width: 60px; height: 35px;">No</td><td style="width: 174px; height: 35px;">Printing message</td><td style="width: 318px; height: 35px;">Provided if required to print on the receipt</td></tr><tr style="height: 57px;"><td style="width: 108px; height: 57px;">memberDetail</td><td style="width: 145px; height: 57px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 60px; height: 57px;">No</td><td style="width: 174px; height: 57px;">Member information</td><td style="width: 318px; height: 57px;">Member info return message on this transaction</td></tr></tbody></table>

#### **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===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory"><thead><tr><th>Field</th><th>Type</th><th>Mandatory</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>traceNo</td><td>String</td><td>Yes</td><td>Cashier terminal trace no.</td><td>No repeat</td></tr><tr><td>originalTraceNo</td><td>String</td><td>Yes</td><td>last Cashier terminal trace no.</td><td>Cashier terminal trace no. in last transaction</td></tr><tr><td>refundAmount</td><td>Price</td><td>Yes</td><td>Refund Amount</td><td>Unit：Dollar</td></tr></tbody></table>

#### **Request body example**

```
{
    "traceNo": "99000009100010101732123",
    "originalTraceNo": "99000009100010101732124",
    "refundAmount": 40.8
}

```

**Response body，[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0" style="height: 484px;"><thead><tr style="height: 45px;"><th style="width: 105px; height: 45px;">Field</th><th style="width: 148px; height: 45px;">Type</th><th style="width: 56px; height: 45px;">Mandatory</th><th style="width: 140px; height: 45px;">Description</th><th style="width: 355px; height: 45px;">Memo</th></tr></thead><tbody><tr style="height: 45px;"><td style="width: 105px; height: 45px;">traceNo</td><td style="width: 148px; height: 45px;">String</td><td style="width: 56px; height: 45px;">Yes</td><td style="width: 140px; height: 45px;">Cashier terminal trace no.</td><td style="width: 355px; height: 45px;">No repeat</td></tr><tr style="height: 45px;"><td style="width: 105px; height: 45px;">orderNo</td><td style="width: 148px; height: 45px;">String</td><td style="width: 56px; height: 45px;">Yes</td><td style="width: 140px; height: 45px;">Order No. from e-Buy</td><td style="width: 355px; height: 45px;"> </td></tr><tr style="height: 29px;"><td style="width: 105px; height: 29px;">transDate</td><td style="width: 148px; height: 29px;">String</td><td style="width: 56px; height: 29px;">Yes</td><td style="width: 140px; height: 29px;">Transaction time</td><td style="width: 355px; height: 29px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 29px;"><td style="width: 105px; height: 29px;">returnCode</td><td style="width: 148px; height: 29px;">String</td><td style="width: 56px; height: 29px;">Yes</td><td style="width: 140px; height: 29px;">Return code</td><td style="width: 355px; height: 29px;">00 represent successful transaction, else represent fail</td></tr><tr style="height: 45px;"><td style="width: 105px; height: 45px;">returnDesc</td><td style="width: 148px; height: 45px;">String</td><td style="width: 56px; height: 45px;">Yes</td><td style="width: 140px; height: 45px;">Return message</td><td style="width: 355px; height: 45px;">Detail explanation / error message per transaction result</td></tr><tr style="height: 45px;"><td style="width: 105px; height: 45px;">refundAmount</td><td style="width: 148px; height: 45px;">Price</td><td style="width: 56px; height: 45px;">Yes</td><td style="width: 140px; height: 45px;">Refunded Amount</td><td style="width: 355px; height: 45px;">Unit：Dollar</td></tr><tr style="height: 29px;"><td style="width: 105px; height: 29px;">discountCode</td><td style="width: 148px; height: 29px;">String</td><td style="width: 56px; height: 29px;">No</td><td style="width: 140px; height: 29px;">Discount Code</td><td style="width: 355px; height: 29px;">assigned by Cashier POS</td></tr><tr style="height: 45px;"><td style="width: 105px; height: 45px;">tenderCode</td><td style="width: 148px; height: 45px;">String</td><td style="width: 56px; height: 45px;">No</td><td style="width: 140px; height: 45px;">Tender Code</td><td style="width: 355px; height: 45px;">assigned by Cashier POS,record payment method，like：2016120101|20.00 is payment 20yuan</td></tr><tr style="height: 35px;"><td style="width: 105px; height: 35px;">fundChannel</td><td style="width: 148px; height: 35px;">List&lt;[fundChannel](https://book.e-buy.com/link/333#bkmrk-fund-channel "fundChannel")&gt;</td><td style="width: 56px; height: 35px;">No</td><td style="width: 140px; height: 35px;">Channel of fund</td><td style="width: 355px; height: 35px;"> </td></tr><tr style="height: 35px;"><td style="width: 105px; height: 35px;">printDetail</td><td style="width: 148px; height: 35px;">Object&lt;[printDetail](https://book.e-buy.com/link/333#bkmrk-print-detail "printDetail")&gt;</td><td style="width: 56px; height: 35px;">No</td><td style="width: 140px; height: 35px;">Printing message</td><td style="width: 355px; height: 35px;">Provided if required to print on the receipt</td></tr><tr style="height: 57px;"><td style="width: 105px; height: 57px;">memberDetail</td><td style="width: 148px; height: 57px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 56px; height: 57px;">No</td><td style="width: 140px; height: 57px;">Member information</td><td style="width: 355px; height: 57px;">Member info return message on this transaction</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS") server after collection to further process.

#### **action**

- `ecouponInquiry`

**Request body，Cashier POS===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory"><thead><tr><th>Field</th><th>Type</th><th>Mandatory</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>traceNo</td><td>String</td><td>Yes</td><td>Cashier terminal trace no.</td><td>No repeat</td></tr><tr><td>qrcode</td><td>String</td><td>Yes</td><td>ecoupon code</td><td>ecoupon code for inquiry</td></tr></tbody></table>

#### **Request body example**

```
{
    "traceNo": "99000009100010101732123",
    "qrcode": "HDCP00000000001235"
}

```

**Response body，[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0"><thead><tr><th>Field</th><th>Type</th><th>Mandatory</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>traceNo</td><td>String</td><td>Yes</td><td>Cashier terminal trace no.</td><td>No repeat</td></tr><tr><td>orderNo</td><td>String</td><td>Yes</td><td>Order No. from e-Buy</td><td>Unit : dollar</td></tr><tr><td>transDate</td><td>String</td><td>Yes</td><td>Transaction time</td><td>Format：yyyyMMddHHmmss</td></tr><tr><td>returnCode</td><td>String</td><td>Yes</td><td>Return code</td><td>00 represent successful transaction, else represent fail</td></tr><tr><td>returnDesc</td><td>String</td><td>Yes</td><td>Return message</td><td>Detail explanation / error message per transaction result</td></tr><tr><td>canPayAmount</td><td>Price</td><td>Yes</td><td>Balance of this coupon</td><td>Unit : dollar</td></tr><tr><td>activityProductNo</td><td>String</td><td>No</td><td>Activity Product no.</td><td>The activity Product no. this coupon belongs to</td></tr><tr><td>activityProductName</td><td>String</td><td>No</td><td>Activity Product name</td><td>The activity Product name this coupon belongs to</td></tr></tbody></table>

#### **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===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory"><thead><tr><th style="width: 145px;">Field</th><th style="width: 169px;">Type</th><th style="width: 91px;">Mandatory</th><th style="width: 184px;">Description</th><th style="width: 220px;">Memo</th></tr></thead><tbody><tr><td style="width: 145px;">traceNo</td><td style="width: 169px;">String</td><td style="width: 91px;">Yes</td><td style="width: 184px;">Cashier terminal trace no.</td><td style="width: 220px;">No repeat</td></tr><tr><td style="width: 145px;">totalAmount</td><td style="width: 169px;">Price</td><td style="width: 91px;">Yes</td><td style="width: 184px;">Total transaction amount</td><td style="width: 220px;">Unit : Dollar</td></tr><tr><td style="width: 145px;">undiscountAmount</td><td style="width: 169px;">Price</td><td style="width: 91px;">No</td><td style="width: 184px;">Undiscountable Amount</td><td style="width: 220px;">Unit : Dollar</td></tr><tr><td style="width: 145px;">activityNo</td><td style="width: 169px;">String</td><td style="width: 91px;">No</td><td style="width: 184px;">Activity NO</td><td style="width: 220px;">收银机集点时填写,后台集点不填</td></tr><tr><td style="width: 145px;">points</td><td style="width: 169px;">Integer</td><td style="width: 91px;">No</td><td style="width: 184px;">Points</td><td style="width: 220px;">收银机集点时填写,后台集点不填</td></tr><tr><td style="width: 145px;">goodsDetail</td><td style="width: 169px;">List&lt;[goodsDetail](https://book.e-buy.com/link/333#bkmrk-goods-detail "goodsDetail")&gt;</td><td style="width: 91px;">No</td><td style="width: 184px;">Goods detail</td><td style="width: 220px;">Mandated on goods detail verification</td></tr><tr><td style="width: 145px;">memberDetail</td><td style="width: 169px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 91px;">No</td><td style="width: 184px;">Member information</td><td style="width: 220px;">Mandated for member payment</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0"><thead><tr><th style="width: 151px;">Field</th><th style="width: 149px;">Type</th><th style="width: 57px;">Mandatory</th><th style="width: 158px;">Description</th><th style="width: 294px;">Memo</th></tr></thead><tbody><tr><td style="width: 151px;">traceNo</td><td style="width: 149px;">String</td><td style="width: 57px;">Yes</td><td style="width: 158px;">Cashier terminal trace no.</td><td style="width: 294px;">No repeat</td></tr><tr><td style="width: 151px;">orderNo</td><td style="width: 149px;">String</td><td style="width: 57px;">Yes</td><td style="width: 158px;">Order No. from e-Buy</td><td style="width: 294px;">易百生成</td></tr><tr><td style="width: 151px;">transDate</td><td style="width: 149px;">String</td><td style="width: 57px;">Yes</td><td style="width: 158px;">Transaction time</td><td style="width: 294px;">Format：yyyyMMddHHmmss</td></tr><tr><td style="width: 151px;">returnCode</td><td style="width: 149px;">String</td><td style="width: 57px;">Yes</td><td style="width: 158px;">Return code</td><td style="width: 294px;">00 represent successful transaction, else represent fail</td></tr><tr><td style="width: 151px;">returnDesc</td><td style="width: 149px;">String</td><td style="width: 57px;">Yes</td><td style="width: 158px;">Return message</td><td style="width: 294px;">Detail explanation / error message per transaction result</td></tr><tr><td style="width: 151px;">activityProductNo</td><td style="width: 149px;">String</td><td style="width: 57px;">No</td><td style="width: 158px;">Activity Product no.</td><td style="width: 294px;"> </td></tr><tr><td style="width: 151px;">activityProductName</td><td style="width: 149px;">String</td><td style="width: 57px;">No</td><td style="width: 158px;">Activity Product name</td><td style="width: 294px;"> </td></tr><tr><td style="width: 151px;">printDetail</td><td style="width: 149px;">Object&lt;[printDetail](https://book.e-buy.com/link/333#bkmrk-print-detail "printDetail")&gt;</td><td style="width: 57px;">No</td><td style="width: 158px;">Printing message</td><td style="width: 294px;">Provided if required to print on the receipt</td></tr><tr><td style="width: 151px;">memberDetail</td><td style="width: 149px;">Object&lt;[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")&gt;</td><td style="width: 57px;">No</td><td style="width: 158px;">Member information</td><td style="width: 294px;">Member info return message on this transaction</td></tr></tbody></table>

#### **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===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory"><thead><tr><th>Field</th><th>Type</th><th>Mandatory</th><th>Description</th><th>Memo</th></tr></thead><tbody><tr><td>traceNo</td><td>String</td><td>Yes</td><td>Cashier terminal trace no.</td><td>No repeat</td></tr></tbody></table>

#### **Request body example**

```
{
    "traceNo": "99000009100010101732123"
}

```

**Response body，[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0" style="height: 381px;"><thead><tr style="height: 45px;"><th style="width: 143.969px; height: 45px;">Field</th><th style="width: 145px; height: 45px;">Type</th><th style="width: 58px; height: 45px;">Mandatory</th><th style="width: 178px; height: 45px;">Description</th><th style="width: 284.016px; height: 45px;">Memo</th></tr></thead><tbody><tr style="height: 29px;"><td style="width: 143.969px; height: 29px;">traceNo</td><td style="width: 145px; height: 29px;">String</td><td style="width: 58px; height: 29px;">Yes</td><td style="width: 178px; height: 29px;">Cashier terminal trace no.</td><td style="width: 284.016px; height: 29px;">No repeat</td></tr><tr style="height: 29px;"><td style="width: 143.969px; height: 29px;">transDate</td><td style="width: 145px; height: 29px;">String</td><td style="width: 58px; height: 29px;">Yes</td><td style="width: 178px; height: 29px;">Transaction time</td><td style="width: 284.016px; height: 29px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 45px;"><td style="width: 143.969px; height: 45px;">returnCode</td><td style="width: 145px; height: 45px;">String</td><td style="width: 58px; height: 45px;">Yes</td><td style="width: 178px; height: 45px;">Return code</td><td style="width: 284.016px; height: 45px;">00 represent successful transaction, else represent fail</td></tr><tr style="height: 45px;"><td style="width: 143.969px; height: 45px;">returnDesc</td><td style="width: 145px; height: 45px;">String</td><td style="width: 58px; height: 45px;">Yes</td><td style="width: 178px; height: 45px;">Return message</td><td style="width: 284.016px; height: 45px;">Detail explanation / error message per transaction result</td></tr><tr style="height: 27px;"><td style="width: 143.969px; height: 27px;">settleRecord</td><td style="width: 145px; height: 27px;">List&lt;[settleRecord](https://book.e-buy.com/link/333#bkmrk-settle-record "settleRecord")&gt;</td><td style="width: 58px; height: 27px;">Yes</td><td style="width: 178px; height: 27px;">Settle Record</td><td style="width: 284.016px; height: 27px;"> </td></tr><tr style="height: 29px;"><td style="width: 143.969px; height: 29px;">beginDate</td><td style="width: 145px; height: 29px;">String</td><td style="width: 58px; height: 29px;">Yes</td><td style="width: 178px; height: 29px;">Settle start</td><td style="width: 284.016px; height: 29px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 29px;"><td style="width: 143.969px; height: 29px;">endDate</td><td style="width: 145px; height: 29px;">String</td><td style="width: 58px; height: 29px;">Yes</td><td style="width: 178px; height: 29px;">Settle end</td><td style="width: 284.016px; height: 29px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 29px;"><td style="width: 143.969px; height: 29px;">volume</td><td style="width: 145px; height: 29px;">Integer</td><td style="width: 58px; height: 29px;">Yes</td><td style="width: 178px; height: 29px;">Transaction Volume</td><td style="width: 284.016px; height: 29px;">Sum of volume in settleRecord</td></tr><tr style="height: 45px;"><td style="width: 143.969px; height: 45px;">totalReceiptAmount</td><td style="width: 145px; height: 45px;">Price</td><td style="width: 58px; height: 45px;">Yes</td><td style="width: 178px; height: 45px;">Merchant Receipt Amount</td><td style="width: 284.016px; height: 45px;">Sum of totalReceiptAmount in settleRecord</td></tr><tr style="height: 29px;"><td style="width: 143.969px; height: 29px;">totalAmount</td><td style="width: 145px; height: 29px;">Price</td><td style="width: 58px; height: 29px;">Yes</td><td style="width: 178px; height: 29px;">Total Amount</td><td style="width: 284.016px; height: 29px;">Sum of totalAmount in settleRecord</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS"), and will be matched and return.Only support the transactions within 7 Days.

#### **action**

- `batchUpload`

**Request body，Cashier POS===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory" style="width: 797px; height: 168px;"><thead><tr style="height: 29px;"><th style="width: 99px; height: 29px;">Field</th><th style="width: 147px; height: 29px;">Type</th><th style="width: 101px; height: 29px;">Mandatory</th><th style="width: 186px; height: 29px;">Description</th><th style="width: 264px; height: 29px;">Memo</th></tr></thead><tbody><tr style="height: 29px;"><td style="width: 99px; height: 29px;">traceNo</td><td style="width: 147px; height: 29px;">String</td><td style="width: 101px; height: 29px;">Yes</td><td style="width: 186px; height: 29px;">Cashier terminal trace No.</td><td style="width: 264px; height: 29px;">No repeat allowed</td></tr><tr style="height: 29px;"><td style="width: 99px; height: 29px;">transCount</td><td style="width: 147px; height: 29px;">Integer</td><td style="width: 101px; height: 29px;">Yes</td><td style="width: 186px; height: 29px;">Upload size</td><td style="width: 264px; height: 29px;">Should equals to size of transRecord list</td></tr><tr style="height: 29px;"><td style="width: 99px; height: 29px;">beginTime</td><td style="width: 147px; height: 29px;">String</td><td style="width: 101px; height: 29px;">Yes</td><td style="width: 186px; height: 29px;">Begin Time</td><td style="width: 264px; height: 29px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 29px;"><td style="width: 99px; height: 29px;">endTime</td><td style="width: 147px; height: 29px;">String</td><td style="width: 101px; height: 29px;">Yes</td><td style="width: 186px; height: 29px;">End Time</td><td style="width: 264px; height: 29px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 23px;"><td style="width: 99px; height: 23px;">transRecord</td><td style="width: 147px; height: 23px;">List&lt;[transRecord](https://book.e-buy.com/link/333#bkmrk-trans-record "transRecord")&gt;</td><td style="width: 101px; height: 23px;">Yes</td><td style="width: 186px; height: 23px;">Transaction records</td><td style="width: 264px; height: 23px;">Maximum：5000</td></tr></tbody></table>

#### **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](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0" style="height: 188px;"><thead><tr style="height: 45px;"><th style="height: 24px; width: 100px;">Field</th><th style="height: 24px; width: 86px;">Type</th><th style="height: 24px; width: 91px;">Mandatory</th><th style="height: 24px; width: 181px;">Description</th><th style="height: 24px; width: 349px;">Memo</th></tr></thead><tbody><tr style="height: 29px;"><td style="height: 29px; width: 100px;">traceNo</td><td style="height: 29px; width: 86px;">String</td><td style="height: 29px; width: 91px;">Yes</td><td style="height: 29px; width: 181px;">Cashier terminal trace No.</td><td style="height: 29px; width: 349px;">No repeat allowed</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 100px;">transDate</td><td style="height: 29px; width: 86px;">String</td><td style="height: 29px; width: 91px;">Yes</td><td style="height: 29px; width: 181px;">Transaction time</td><td style="height: 29px; width: 349px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 45px;"><td style="height: 12px; width: 100px;">returnCode</td><td style="height: 12px; width: 86px;">String</td><td style="height: 12px; width: 91px;">Yes</td><td style="height: 12px; width: 181px;">Return code</td><td style="height: 12px; width: 349px;">00 represent successful transaction, else represent fail</td></tr><tr style="height: 45px;"><td style="height: 37px; width: 100px;">returnDesc</td><td style="height: 37px; width: 86px;">String</td><td style="height: 37px; width: 91px;">Yes</td><td style="height: 37px; width: 181px;">Return message</td><td style="height: 37px; width: 349px;">Detail explanation / error message per transaction result</td></tr><tr style="height: 57px;"><td style="height: 57px; width: 100px;">transRecord</td><td style="height: 57px; width: 86px;">List&lt;[transRecord](https://book.e-buy.com/link/333#bkmrk-trans-record "transRecord")&gt;</td><td style="height: 57px; width: 91px;">Yes</td><td style="height: 57px; width: 181px;">Transaction records after match</td><td style="height: 57px; width: 349px;">Maximum：5000</td></tr></tbody></table>

#### **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
      }
    ]
}
```