# 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===>[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")**
Field | Type | Mandatory | Description | Memo |
---|
traceNo | String | Yes | Cashier terminal trace no. | No repeat |
originalTraceNo | String | Yes | last Cashier terminal trace no. | Cashier terminal trace no. in last transaction |
refundAmount | Price | Yes | Refund Amount | Unit:Dollar |
acquirer | String | No | Acquirer Bank | Example:citicCashpay |
#### **Request body example**
```
{
"traceNo": "99000009100010101732123",
"originalTraceNo": "99000009100010101732124",
"refundAmount": 40.8,
"acquirer": "citicCashpay"
}
```
**Response body,[e-Buy Backend](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")===>Cashier POS**
Field | Type | Mandatory | Description | Memo |
---|
traceNo | String | Yes | Cashier terminal trace no. | No repeat |
orderNo | String | Yes | Order No. from e-Buy | |
transDate | String | Yes | Transaction time | Format:yyyyMMddHHmmss |
returnCode | String | Yes | Return code | 00 represent successful transaction, else represent fail |
returnDesc | String | Yes | Return message | Detail explanation / error message per transaction result |
refundAmount | Price | Yes | Refunded Amount | Unit:Dollar |
discountCode | String | No | Discount Code | assigned by Cashier POS |
tenderCode | String | No | Tender Code | assigned by Cashier POS,record payment method,like:2016120101|20.00 is payment 20yuan |
fundChannel | List<[fundChannel](https://book.e-buy.com/link/333#bkmrk-fund-channel "fundChannel")> | No | Channel of fund | |
printDetail | Object<[printDetail](https://book.e-buy.com/link/333#bkmrk-print-detail "printDetail")> | No | Printing message | Provided if required to print on the receipt |
memberDetail | Object<[memberDetail](https://book.e-buy.com/link/333#bkmrk-member-detail "memberDetail")> | No | Member information | Member info return message on this transaction |
#### **Response body example**
```
{
"traceNo": "99000009100010101732123",
"orderNo": "171698602301",
"transDate": "20161231120533",
"returnCode": "00",
"returnDesc": "SUCCESS",
"discountCode": "0001",
"tenderCode": "8001",
"refundAmount": 40.8,
"fundChannel": [
{
"channelNo": "001",
"channelName": "用户实付现金",
"channelAmount": "20.8"
},
{
"channelNo": "002",
"channelName": "用户积分支付",
"channelAmount": "20"
}
],
"printDetail": {
"cardNo64": "622562****8888",
"bank": "中信银行",
"paymentOrderNo": "201612315689412157458787",
"pointSale": "20000",
"qrCode1": "htt://www.api-location-url.com/url",
"qrCode2": "",
"qrCode3": "",
"barCode1": "12345679",
"barCode2": "",
"barCode3": ""
},
"memberDetail": {
"memberId": "M000001545",
"memberName": "TONY",
"grade": "1",
"status": "1",
"balance": 1000.00,
"pointBalance": 30000
}
}
```
#### **Transaction support refund**
- cardPayment
- CardRedemption