# Refund methods in AvaTax

Source: https://developer.avalara.com/marketplace-integration-guide/transactions/refunds/refund-methods/

AvaTax provides a couple of methods for refunding transactions. The method that you choose depends on your particular refund scenario.

-   Use the [RefundTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/RefundTransaction/) API to create a `ReturnInvoice` representing a refund for a previously created `SalesInvoice` transaction. Specifically, you can:

    -   Create a full refund of a previous sale that included sales tax only. Don't use the RefundTransaction API for transactions that result in tax other than sales tax.

    -   Refund the sales tax that was charged on a previous sale, such as when the customer provides an exemption certificate after the purchase.

    -   Refund one or more items (lines) from a previous sale.

    -   Grant a customer a percentage refund of a previous sale.

-   Use the [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) with a document type of `ReturnInvoice` to create a custom refund transaction for more complex scenarios such as the following:  

    -   Creating a partial dollar-amount refund

    -   Refunding a partial quantity of items on a line instead of all quantities of a specific item

    -   Creating full or partial dollar-amount refunds for multitax transactions (for example, transactions that resulted in both sales tax and landed cost tax)

The next sections discuss these scenarios in greater detail. You can also find more information in the [RefundTransaction vs ReturnInvoice in the AvaTax API](https://developer.avalara.com/blogs/details/?id=d3e1d5b0-ba14-4024-b808-41901a32bce7) blog.

Refund processing is largely a business practice that the developer and the business manager need to map out before coding or moving forward to a production environment. A thorough understanding of the RefundTransaction and CreateTransaction APIs and document types is key to developing an architecture suitable for processing returns in your development.