# Send a negative line item amount with a positive quantity

Source: https://developer.avalara.com/marketplace-integration-guide/transactions/certification-requirements/send-negative-amount-with-positive-quantity/

**Endpoints/models used:** [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/)

Your integration should allow users to back out line items on committed transactions. Users can do this by creating a new transaction with a negative line amount and a positive quantity. Keep in mind the following when using CreateTransaction for refunds:

-   Use a document type of `ReturnInvoice`.

-   The transaction code in the return invoice must match the transaction code of the original sale.

-   Set the transaction date to the date when you process the return. Don't use the date of the original order.

-   Pass only line items being returned. Don't include the line items that aren't being returned.

-   Set the `amount` to a negative dollar amount and the `quantity` to a positive value.

The example below shows how to use the CreateTransaction API to submit a refund request. After successful completion, the refunded items will be reversed on your tax reporting and will appear essentially as a “credit” on the current month’s tax liability.

[![Closed](https://avalara-devdocs-prod.mcoutput.com/avatax-for-marketplaces/Content/Skins/Default/Stylesheets/Images/transparent.gif)Example](javascript:void\(0\);)

```
{  "lines": [    {      "number":"1",      "quantity":1,      "amount":-100,      "taxCode":"P0000000",      "itemCode":"Test SKU",      "description":"Test Item Description"    }  ],  "taxOverride":{    "type": "TaxDate",    "taxDate":"2024-10-29",    "reason": "Return"  },  "addresses": {    "singleLocation":{      "line1":"100 Ravine Ln NE",      "city":"Bainbridge Island",      "region":"WA",      "country":"US",      "postalCode":"98110-2687"    }  },   "type":"ReturnInvoice",  "code":"TestTransaction1",  "companyCode":"DEFAULT",  "date":"2024-11-12",  "customerCode":"Test Customer ID",  "commit":true,  "currencyCode":"USD"}
```