# Override tax on a transaction

Source: https://developer.avalara.com/avatax-dm-combined-erp/sales-tax-badge/transactions/discounts-and-overrides/tax-overrides/

# Override tax on a transaction

AvaTax allows you to override calculated tax by specifying a [taxOverride](https://developer.avalara.com/api-reference/avatax/rest/v2/models/TaxOverrideModel/) at either the document level or line level of a transaction. The following types of overrides are supported:`taxAmount`,`taxDate`, and`taxAmountByTaxTypes`.

-   The`taxAmount` override will do just that, override the tax amount on the transaction. This is particularly helpful if you need to record transactions to AvaTax that had the tax calculated in another system.
-   The`taxDate` override allows you to specify what tax date to use in the calculation. By default, the AvaTax engine will use the document`date` as the`taxDate`. The common use-case for this override is processing refunds, as you want to calculate the refund tax credit using the same information that the original sale used.
-   The`taxAmountByTaxTypes` is used with customs duty and import tax. This override allows you to specify a total override of the calculated tax on the line with TaxType. AvaTax will distribute the override across all the line details for that TaxType.

Let’s take a closer look at each method.

## Overriding the tax amount

A`taxAmount` override will override the tax amount of a transaction rather than having AvaTax calculate it. This feature is available so that you can import transactions where you’ve already calculated the tax amount prior to using AvaTax. An example would be when you are importing data from an older system so that you can keep all your data in AvaTax. Other customers may choose to use this feature to import data from partner sales - for example, if you were selling via a merchant platform and you want to import your data into AvaTax.

Click on **Example request** to see a sample API call.

Example request

```
{ "type": "SalesInvoice", "code": "TaxAmountOverride", "companyCode": "DEFAULT", "date": "2020-12-15", "customerCode": "TESTCUSTOMER", "addresses": { "singleLocation": { "line1": "100 Ravine Lane NE", "city": "Bainbridge Island", "region": "WA", "country": "US", "postalCode": "98110"    }  }, "lines": [    { "number": "1", "amount": 100, "taxCode": "P0000000"    }  ], "taxOverride": { "type": "taxAmount", "taxAmount": 5.67, "reason": "Importing tax calculated by previous tax software"  }}
```

## Overriding the tax date

A`taxDate` override is used when you want to calculate tax on a date different than the date of a document. For example, if you are returning a product, the tax date of the transaction would be the date of the original transaction, rather than the date of the refund.

Let’s say Alice purchases a new chair from a store on May 1st. She discovers that the chair doesn’t fit in her home office, and she decides to return the chair on June 1st. If you calculate tax on the June 1st date, you might refund a different amount of tax to Alice than she paid on May 1st. So you use a`taxDate` override to ensure that the tax rates are calculated as of May 1st.

Click on **Example request** to see a sample API call.

Example request

```
{ "type": "ReturnInvoice", "code": "TaxDateOverride", "companyCode": "DEFAULT", "date": "2020-12-15", "customerCode": "TESTCUSTOMER", "addresses": { "singleLocation": { "line1": "100 Ravine Lane NE", "city": "Bainbridge Island", "region": "WA", "country": "US", "postalCode": "98110"    }  }, "lines": [    { "number": "1", "amount": -100, "taxCode": "P0000000", "taxOverride": { "type": "taxDate", "taxDate": "2020-11-01", "reason": "Refund for purchase of chair"      }    }  ]}
```

[Previous](/avatax-dm-combined-erp/sales-tax-badge/transactions/discounts-and-overrides/discounting-a-transaction)

[Next](/avatax-dm-combined-erp/sales-tax-badge/transactions/exemptions)