# 5.3 Refund

## 1. Overview <a href="#id-1overview" id="id-1overview"></a>

Use this API to initiate a refund against a successful payment. The refund can be ***full or partial***. A transaction can have multiple refunds as long as the total refund amount is less than or equal to the original transaction amount. If the refund request is out of the refund window determined in the contract the refund request will be declined.

## 2. Request Info <a href="#id-2request-info" id="id-2request-info"></a>

* **Method:** post
* **Path:** <https://prod-openapi-v2.newpay.la/beta/pay/uniRefund>

### **2.1 Request Header** <a href="#id-21-request-header" id="id-21-request-header"></a>

| Key          | Value            |
| ------------ | ---------------- |
| Content-Type | application/json |

### **2.2 Request Data** <a href="#id-22-request-data" id="id-22-request-data"></a>

| Name          | Description                                                                                                | Type   | Required |
| ------------- | ---------------------------------------------------------------------------------------------------------- | ------ | -------- |
| appId         | Unique identifier assigned to a third-party application platform                                           | string | true     |
| mchId         | Unique identifier assigned to a third-party merchant                                                       | string | true     |
| newpayOrderNo | Payment order number generated in NewPay                                                                   | string | true     |
| mchRefundNo   | Refund order number in third party merchant                                                                | string | true     |
| refundAmt     | Refund amount, less or equal to the original transaction amount                                            | string | true     |
| callback      | Refund callback URL address                                                                                | string | false    |
| sign          | [Data signature](https://newpay-api-document.gitbook.io/newpay-api-document/8.-signature-and-verification) | string | true     |

### **2.3 Response Data** <a href="#id-23-response-data" id="id-23-response-data"></a>

<table><thead><tr><th>Name</th><th width="268">Description</th><th>Type</th></tr></thead><tbody><tr><td>success</td><td>Success flag: true/false</td><td>boolean</td></tr><tr><td>message</td><td>Response message</td><td>string</td></tr><tr><td>code</td><td><a href="../../9.-business-code#response-code">Reponse code</a></td><td>string</td></tr><tr><td>timestamp</td><td>Response timestamp</td><td>long</td></tr><tr><td>data</td><td>Result</td><td>object</td></tr><tr><td>> newpayRefundNo</td><td>Refund order number in NewPay</td><td>string</td></tr><tr><td>> mchRefundNo</td><td>Refund order number in third-party merchant</td><td>string</td></tr><tr><td>> status</td><td>transaction status: <br>SUCCESS/FAIL/PROCESSING.<br></td><td>string</td></tr><tr><td>> orderAmt</td><td>amount for the payment order</td><td>string</td></tr><tr><td>> refundAmt</td><td>amount for the refund order</td><td>string</td></tr><tr><td>> message</td><td>refund message</td><td>string</td></tr><tr><td>> sign</td><td>Data signature</td><td>string</td></tr></tbody></table>
