Refund a Payment {#concept}
===========================

This section describes how to refund a payment. You can refund a settled payment for the full amount or a partial amount by sending a refund request. Multiple partial refund requests are also supported, and the total amount of all of the refund requests must be less than the settled amount.  
Requesting a refund requires the sale request ID from the sale response. The sale request ID is in the requestID response field.

Endpoints {#concept_section_t2w_424_jyb}
----------------------------------------

Set the apRefundService_run field to `true`, and send the request to one of these endpoints:  
**Production:** `https://ics2ws.ic3.com/commerce/1.x/transactionProcessor`  
**Test:** `https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor`

Required Fields for Refunding a Payment {#x-req-fields}
=======================================================

[apPaymentType](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/ap-payment-type.md "")
:
Set to `ACV`.

[apRefundService_refundRequestID](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/ap-refund-service-refund-request-id.md "")
:
Set to the request ID included in the sale response.

[apRefundService_run](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/ap-refund-service-run.md "")
:
Set to `true`.

[merchantID](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/merchant-id.md "")
:

[merchantReferenceCode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/merchant-reference-code.md "")
:

[purchaseTotals_currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/purchase-totals-currency.md "")
:
Set to `COP`.
{#x-req-fields_crncy}
{#x-req-fields_crncy}

[purchaseTotals_grandTotalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/purchase-totals-grand-total-amount.md "")
:

Example: Refunding a Payment {#x-ex-rest}
=========================================

Request

```
&lt;requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.186"&gt;
    &lt;merchantID&gt;thunes_cert&lt;/merchantID&gt;
    &lt;merchantReferenceCode&gt;refnum1234&lt;/merchantReferenceCode&gt;
    &lt;purchaseTotals&gt;
        &lt;currency&gt;EUR&lt;/currency&gt;
        &lt;grandTotalAmount&gt;20.00&lt;/grandTotalAmount&gt;
    &lt;/purchaseTotals&gt;
    &lt;apPaymentType&gt;ANC&lt;/apPaymentType&gt;
    &lt;apRefundService run="true"&gt;
        &lt;refundRequestID&gt;7478635704886789703607&lt;/refundRequestID&gt;
    &lt;/apRefundService&gt;
&lt;/requestMessage&gt;
```

Response to a Successful Request

```
&lt;replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.211"&gt;
	&lt;merchantReferenceCode&gt;Masterpass-Refund&lt;/merchantReferenceCode&gt;
	&lt;requestID&gt;7478637798796676103609&lt;/requestID&gt;
	&lt;decision&gt;ACCEPT&lt;/decision&gt;
	&lt;reasonCode&gt;100&lt;/reasonCode&gt;
	&lt;requestToken&gt;AxjnrwSTlWryznv9JP25ANgZYiy6kGDXhyoLKQnkH8hOI/pCvoUFYZNJMvRjDLC/Scq1da8KzRZD24AAxzUC&lt;/requestToken&gt;
	&lt;purchaseTotals&gt;
		&lt;currency&gt;EUR&lt;/currency&gt;
	&lt;/purchaseTotals&gt;
	&lt;apRefundReply&gt;
		&lt;reasonCode&gt;100&lt;/reasonCode&gt;
		&lt;transactionID&gt;973340962485&lt;/transactionID&gt;
		&lt;status&gt;REFUNDED&lt;/status&gt;
		&lt;processorResponse&gt;00006&lt;/processorResponse&gt;
		&lt;amount&gt;10.00&lt;/amount&gt;
		&lt;dateTime&gt;2025-05-21T21:43:01Z&lt;/dateTime&gt;
		&lt;reconciliationID&gt;XEKTAAWCJA2H&lt;/reconciliationID&gt;
		&lt;returnRef&gt;KL9RNANN5WZ7&lt;/returnRef&gt;
		&lt;paymentStatus&gt;refunded&lt;/paymentStatus&gt;
		&lt;responseCode&gt;00006&lt;/responseCode&gt;
	&lt;/apRefundReply&gt;
&lt;/replyMessage&gt;
```

Response Statuses for Refunding a Payment {#x-req-fields}
=========================================================

`Cybersource` responds to your refund request with one of these statuses in the field:

* `FAILED`: The refund cannot be completed.
* `PENDING`: The refund request is accepted but is not completed. Send a check status request as often as necessary to obtain the information that you need. For more information, see [Check a Status](/docs/cybs/en-us/thunes/developer/all/so/thunes/thunes-ancv-intro/thunes-ancv-status-intro.md "").
  {#x-req-fields_ul_pdp_lkr_3yb}

