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