> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/refund-an-order.md).

# Refund an order

Refund a sale made in 2Checkout via the **issueRefund** API method. You can issue a refund for only a sale line item, issue a partial refund on the total amount, or refund the entire order amount.

## Requirements <a href="#requirements" id="requirements"></a>

The payment for the refundable order needs to be collected.

You cannot issue a refund for an amount higher than the total order amount.

## Request parameters <a href="#parameters" id="parameters"></a>

<table><thead><tr><th width="179.86669921875">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>RefNo</code></td><td><p><strong>Required (string)</strong></p><p>The order reference number of the sale for which the refund is issued. Example: '721924012'.</p></td></tr><tr><td><code>Amount</code></td><td><p><strong>Required (double)</strong> </p><p>Refundable amount. Required as a supplementary check for partial refunds. Example: '26.00'.</p></td></tr><tr><td><code>Comment</code></td><td><p><strong>Optional (string)</strong></p><p>Comments are displayed only to customers in the refund confirmation they receive. Example: 'Let us know if you are satisfied with the refund process'. </p></td></tr><tr><td><code>Reason</code></td><td><p><strong>Required (string)</strong></p><p>In case you have custom refund reasons defined on your account, send one of the reasons. If not, send one of the platform defined reasons. <a href="https://docs.2checkout.com/payments/payments/refunds-and-chargebacks/refunds">Read more about 2Checkout refund reasons. </a> </p><p>Comments displayed on the order are also retrieved via this parameter.</p><p>Example: 'Unwanted auto-renewal'.</p></td></tr><tr><td><code>Items</code></td><td><p><strong>Required only for partial refunds (array)</strong></p><p>In case you issue a partial refund, send the array with the information below.</p></td></tr><tr><td><code>Items.ProductCode</code></td><td><p><strong>Required (string)</strong></p><p>Send the product code belonging to the products to be refunded. The product code is available at product level, in the <strong>Information</strong> tab.</p></td></tr><tr><td><code>Items.Quantity</code></td><td><p><strong>Required (integer)</strong></p><p>Quantity to be refunded. Send only positive values.</p></td></tr><tr><td><code>Items.Amount</code></td><td><p><strong>Required (double)</strong></p><p>Total amount of the refunded line item, not the unit amount.</p></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/refund-an-order.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
