# Credit memo workflow without posting

Source: https://developer.avalara.com/vat-erp/design-the-document-workflow/credit-memo-workflow-without-posting/

**Note**:  
This workflow is provided for technology partners who intend to earn the Refunds advanced feature along with their Sales Tax badge or developers who want to include this functionality. You can skip this topic if you don't intend to add refunds to your integration.

![Credit memo workflow without posting](https://avalara-devdocs-prod.mcoutput.com/vat-erp/Resources/Images/DevDot/credit-memo-workflow-without-posting_792x282.png)  

Before crediting a sales invoice through your system, first determine which method you’ll use: [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) or [RefundTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/RefundTransaction/). The method will vary based on the type of credit memo you’re issuing (for example, partial credit amount, crediting a specific line item, and so on).

**Note**:  
When creating credit memos against a `SalesInvoice`, the document type changes to `ReturnInvoice`. After this document type changes, either through [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) or [RefundTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/RefundTransaction/), you won't be able to determine whether the original transaction was a purchase or sales document. If you need this information, then a workaround is to use a reference code when creating the credit memo.

## Credit memos with CreateTransaction

1.  Call the [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) endpoint with `type` set to `ReturnOrder`, and then use one of the following methods:

    -   A `taxOverride` set to `TaxDate`.

    -   A positive quantity and a negative amount for a line item.

2.  Issue the credit memo.

3.  Call [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) again. Set `type` to `ReturnInvoice` and set `commit` to `true`.

## Credit memos with RefundTransaction

1.  Call the [RefundTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/RefundTransaction/) endpoint using the original transaction ID.

2.  Issue the credit memo.