Refund {#um-processing-refund-intro}
====================================

Use this information to process a refund. A refund is linked to a previous capture or sale. You must request a refund within 180 days of the authorization.  
For `China UnionPay`, use the refund service to reverse pre-authorization completions and sales.

Endpoint {#um-processing-refund-intro_d7e199}
---------------------------------------------

**Production:** `POST ``https://api.cybersource.com``/pts/v2/payments/`*{id}*`/refunds`{#um-processing-refund-intro_d7e207}  
**Test:** `POST ``https://apitest.cybersource.com``/pts/v2/payments/`*{id}*`/refunds`{#um-processing-refund-intro_d7e220}  
The *{id}* is the transaction ID returned in the capture or sale response.

Required Fields for a Refund {#um-processing-refund-reqd-fields}
================================================================

[clientReferenceInformation.code](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/client-ref-info-aa/client-ref-info-code.md "")
:

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.md "")
:

REST Example: Refund {#um-processing-refund-ex-rest}
====================================================

Request

```
{
  "clientReferenceInformation": {
    "code": "FE56907"
  },
  "orderInformation": { 
    "amountDetails": { 
      "totalAmount": "200", 
      "currency": "THB" 
      } 
   }
}
```

Response to a Successful Request

```
{
  "_links": {
  "void": {
    "method": "POST",
    "href": "/pts/v2/refunds/7025605918856084604951/voids"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/refunds/7025605918856084604951"
    }
  },
  "clientReferenceInformation": {
    "code": "FE56907"
  },
  "id": "7025605918856084604951",
  "orderInformation": {
    "amountDetails": {
      "currency": "THB"
    }
  },
  "processorInformation": {
    "approvalCode": "831000"
    "retrievalReferenceNumber": "334813163319",
    "responseCode": "00"
  },
  "reconciliationId": "7025605722066080204951",
  "refundAmountDetails": {
    "currency": "THB",
    "refundAmount": "200"
  },
  "status": "PENDING",
  "submitTimeUtc": "2022-04-18T12:28:23Z",
}
```

