> For the complete documentation index, see [llms.txt](https://docs.galaxypay.vn/upc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.galaxypay.vn/upc/payment-gateway/api-specification/management/refund-transaction.md).

# Refund Transaction

## Conditions

* The transaction must have been successfully completed <mark style="color:red;">within 1 year</mark> and <mark style="color:red;">fully captured</mark> (applicable for international cards).
* Refund transactions can be split into multiple requests, provided <mark style="color:red;">the total refund amount does not exceed the original transaction amount.</mark>

## Supported providers for refunds

|                                                  |                                           |                                                 |                                                      |
| ------------------------------------------------ | ----------------------------------------- | ----------------------------------------------- | ---------------------------------------------------- |
| <p>MOMO</p><p>ZALOPAY</p><p>GALAXYPAY</p><p></p> | <p>NAPAS </p><p>MPGS </p><p>CYBS<br> </p> | <p>APPLE </p><p>SAMSUNG </p><p>GOOGLE<br>  </p> | <p>DOKU </p><p>AZUPAY </p><p>SMARTRO </p><p>PAYU</p> |

## API format

| Endpoint URL | Route                     |
| ------------ | ------------------------- |
| Base URL     | api/v1/transaction/refund |

Example:

[https://uat-secure.galaxypay.vn/api/v1/transaction/refund](https://uat-secure.galaxypay.vn/api/v1/transaction/pay)

### Request Message

#### Header

<table><thead><tr><th width="92">Level</th><th>Field Name</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>apiKey</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Request authenticate</td></tr><tr><td>1</td><td>signature</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Request signature</td></tr></tbody></table>

#### Body

<table><thead><tr><th width="92">Level</th><th width="178">Field Name</th><th width="189">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>requestID<br></td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><p>Unique ID for each transaction request</p><p></p><p><strong>Recommend</strong>: GUID</p></td></tr><tr><td>1</td><td>requestDateTime</td><td>Numeric(14)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><strong>yyyyMMddHHmmss</strong></td></tr><tr><td>1</td><td>requestData</td><td>JSON Object</td><td></td></tr><tr><td>2</td><td>transactionID</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>GALAXY PAY transaction ID</td></tr><tr><td>2</td><td>orderID</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Transaction ID at Merchant</td></tr><tr><td>2</td><td>orderAmount</td><td>Numeric(16)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Refund amount</td></tr><tr><td>2</td><td>orderCurrency</td><td>Alpha(3)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Send the code in <a href="/pages/9qc6oGrvkG54qieoVRAW">Currencies</a></td></tr><tr><td>2</td><td>orderDateTime</td><td>Numeric(14)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><strong>yyyyMMddHHmmss</strong></td></tr><tr><td>2</td><td>orderDescription</td><td>Alphanumeric(250)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Transaction Description</td></tr></tbody></table>

```
{
  "requestID": "a9fa54aeca7943b6a32aad47857bf7d7",
  "requestDateTime": "20231116151903",
  "requestData": {
    "transactionID": "2311165672361384300115770",
    "orderID": "17d17e5431a6473bb5ab91cf5a9080a4",
    "orderAmount": 10000,
    "orderCurrency": "VND",
    "orderDateTime": "20231116151903",
    "orderDescription": "DEMO REFUND TRANSACTION"
  }
}
```

### Response Message

#### Header

<table><thead><tr><th width="91">Level</th><th>Field name</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>signature</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Response signature</td></tr></tbody></table>

#### Body

<table><thead><tr><th width="92">Level</th><th width="206">Field name</th><th width="185">Data type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>requestID</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Original Request ID</td></tr><tr><td>1</td><td>responseDateTime</td><td>Numeric(14)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><strong>yyyyMMddHHmmss</strong></td></tr><tr><td>1</td><td>responseCode</td><td>Numeric(3)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>See <a href="/pages/sBk2eUqKYscTG2fiXwOK">Response Codes</a> for more detail</td></tr><tr><td>1</td><td>responseMessage</td><td>Alphanumeric(250)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Response message</td></tr></tbody></table>

```
{
  "requestID": "a9fa54aeca7943b6a32aad47857bf7d7",
  "responseDateTime": "20231116151903",
  "responseCode": "200",
  "responseMessage": "Success"
}
```
