# AvaTax transaction FAQs

Source: https://developer.avalara.com/avatax-dm-combined-erp/sales-tax-badge/avatax-faqs/

# AvaTax transaction FAQs

This section provides answers to common questions that users face when creating transactions.

Can I exempt transactions in Canada?

It is possible to exempt transactions in Canada using exemption reasons specific to Canadian Provinces. Refer to the [Exempt reason matrix for the US and Canada](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Exempt_reason_matrix_for_the_U.S._and_Canada_entity_use_code_list.html) Knowledge Center article for more information. After you understand these use codes, you have a couple of options:

-   Create a Product Taxability Tax Rule making the tax codes of the products non-taxable in Canada and in the province.
-   Create an Exempt Entity Tax Rule making the entity use code of your choice tax exempt in Canada and in the province.

Can I include lines with a 0 amount in my transactions?

Yes, AvaTax allows lines with 0 amounts in transactions.

Can I provide custom exempt reason codes?

Yes. Custom entity use codes can be created as part of a custom tax rule. Refer to the [TaxRuleModel API](https://developer.avalara.com/api-reference/avatax/rest/v2/models/TaxRuleModel/) for more information. Your integration must be able to support custom tax rules entered by a user.

Can item mapping be completed at the category level?

Item mapping can be completed at the category level if your platform supports grouping of like items.  

Can my integration provide invoice history via a data import process?

AvaTax provides a [batch endpoint](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Batches/CreateTransactionBatch/) to pass a file that includes batches of transactions. When using this endpoint, be sure to review the [Guidelines for importing tax data into the AvaTax](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Guidelines_for_importing_tax_data_into_AvaTax.html) and [Import transaction template guidelines](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Import_transactions_template_guidelines_1.html) Knowledge Center articles. In addition, keep in mind that the maximum content length of the request body is limited to 28.6 MB.

Do I have to add a line to represent freight on the doc/transactions?

Yes. In AvaTax, shipping and handling charges are line items that are mapped to product codes just like any item that you ship. More information is available in the [Non-standard item transactions](/avatax-dm-combined-erp/sales-tax-badge/transactions/non-standard-item-transactions) section and in the [Understanding freight taxability](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Understanding_freight_taxability.html) Knowledge Center topic.

It is also possible to to have multiple freight lines on a transaction that include different addresses. For example, one item may be shipping to CA and another to NY. AvaTax will look for a freight line, and based on the address of that line will group those items together. So if a freight line item is shipping to CA, AvaTax will bundle line items with that same CA address and use that information for determination.

More information about how AvaTax handles freight lines shipping to specific addresses is available in the [Change freight and handling taxability](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Change_freight_and_handling_taxability.html) Knowledge Center topic.

For Canadian transactions, can GST and PST be displayed on invoices?

By default, AvaTax always returns PST and GST as separate amounts in the response. However, AvaTax does not maintain content for provinces that use HST. If you require HST information on invoices, you should create a [custom tax rule](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/TaxRules/CreateTaxRules/) to consolidate those amounts in the response.

How does AvaTax handle multiple freight lines on a single transaction?

See the [Understanding non-standard item transactions](/avatax-dm-combined-erp/sales-tax-badge/transactions/non-standard-item-transactions "Understanding non-standard transactions") section for more information.[](/avatax-dm-combined-erp/sales-tax-badge/transactions/non-standard-item-transactions "Understanding non-standard item transactions")

How can I get a list of AvaTax tax codes?

Avalara provides a [search tool](https://taxcode.avatax.avalara.com/) to help you find the codes that determine the taxability of the goods and services you sell. You can also run the [ListTaxCodes API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListTaxCodes/) to retrieve the full list of Avalara-supported tax codes.

How can I get offline tax rates?

If you need to calculate tax offline, there are a couple of ways to retrieve offline tax rates using the [TaxContent APIs](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/TaxContent/). The method to use varies depending on whether you are creating single location transactions or you are creating transactions with `shipFrom`/`shipTo` addresses.

**Single location transactions**

For single location transactions, use the [BuildTaxContentFileForLocation API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/TaxContent/BuildTaxContentFileForLocation/) to build a tax content file that includes a matrix of taxes that are charged for the items you sell at a specific location. This is built by looking up the tax profile for your location and your items and then calculating taxes for each in turn. To include a custom tax code in this tax content file, first create the custom tax code using [CreateTaxCodes](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/TaxCodes/CreateTaxCodes/) to create the custom tax code, then use [CreateItems](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Items/CreateItems/) to create an item that uses the custom tax code.

Because tax rates may change based on decisions made by a variety of tax authorities, we recommend that users of this tax content API download new data every day. Many tax authorities may finalize decisions on tax changes at unexpected times and may make changes in response to legal issues or governmental priorities. Any tax content downloaded for future time periods is subject to change if tax rates or tax laws change.

**Advice:**

-   This API does not work for Tennessee tax holiday scenarios.
-   If you want to create a single TaxContent file for all of your locations, use the [BuildTaxContentFile API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/TaxContent/BuildTaxContentFile/).

**Multi-address transactions**

If you need to calculate tax for transactions that require shipment of goods, use the [DownloadTaxRatesByZipCode](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/TaxContent/DownloadTaxRatesByZipCode/) API. This downloads a CSV file containing all five-digit postal codes in the United States and their sales and use tax rates for tangible personal property. This rates file is intended to be used as a default for tax calculation when your software cannot call the [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) call. When using this file, your software will be unable to handle complex tax rules. If you use this file to provide default tax rates, please make sure to reconcile the actual transaction and determine the difference between the estimated general tax rate and the final transaction tax.

More information about these APIs is available in the [Calculate tax offline](/avatax-dm-combined-erp/sales-tax-badge/calculate-tax-offline) section.

How can I issue a credit or adjustment when sales tax has already been paid?

Review the [Add or import tax-only credits](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Add_or_import_tax-only_credits.html) Knowledge Center article for information on how to handle tax-only credits.

How can I utilize a single-use exemption in AvaTax?

The key to matching a certificate created in AvaTax with your integration is passing the `customerCode` (which is required) and matching the customer id you're passing in your `createTransaction` request to the way the exemption was setup in AvaTax.If the exemption is set up as a "Single Use Exemption", AvaTax expects that you will also pass a matching Purchase Order number value that can be set on an Order or Invoice and passed in the `purchaseOrderNo` attribute of the `createTransaction` request.  

How can I utilize drop shipping?

Contact [Partner Central](https://avalara.zinfi.net/concierge/ucm/#/cms/Home) if your platform supports drop shipping. You can also view a video we have created for an [overview of the sales tax implications of drop shipping](https://youtu.be/4-12AMEzkAM "overview of the sales tax implications of drop shipping").

How do I discount a transaction?

There are several options for discounting transactions that are descibed in the [Discounting a transaction](/avatax-dm-combined-erp/sales-tax-badge/transactions/discounts-and-overrides/discounting-a-transaction) topic. In general, keep the following guidelines in mind.

-   Merchants discounting a retail price, either specific to a particular item or in general for a particular order/invoice, simply reduce the pretax amount to be passed to AvaTax.
    -   Line level/item-specific discounts should be handled by reducing the retail price of the item by the discount and passing that value in the transaction's `amount` attribute
    -   Document level/order-invoice discounts should be handled using the document discount functionality available via the AvaTax service `createTransaction` call.
-   Merchants providing a "buy one/get one free" type scenario do not typically have a sales tax calculation impact. The discount merely reduces the pretax amount to be passed to AvaTax
    -   NOTE:  Certain "buy one/get one free" scenarios may require the merchant to self-assess, accrue, and remit (consumer) use tax on the item given away at no cost, as the merchant is considered to be the consumer of the article. This does not change the `createTransaction` call to calculate sales tax on the order/invoice.
-   Manufacturer’s/3rd Party Coupons – coupons that are provided by the manufacturer or other third party (not the merchant itself) will often have special tax treatment. When the merchant accepts the coupon, the call to the AvaTax service should identify the coupon discount as a unique line item with a negative value and the appropriate AvaTax Tax Code indicating a 3rd Party Coupon.
    -   These type coupons often reimburse the merchant for the discount, and certain states interpret this as a form of cash payment, requiring the buyer to pay sales tax on the full amount of the coupon-related item.
    -   If there is an actual third-party/manufacturer’s coupon associated with the reduction in price, it should be passed as a line item, as a negative value, and associated with Tax Code `OC030000`.

How do I handle bundled items?

Bundled items include a single item that is made up of several individual items (for example, a gift basket). In order to tax bundled items correctly, you have to upload a spreadsheet of the individual items included in that bundle. AvaTax will pre process the transaction, and when a bundled item is included on a transaction line, AvaTax replace it with the individual items that are included in the bundle and calculate tax based on each of those individual items.

How do I handle product exemptions?

Products/items are exempt based on their tax code. You can create custom tax codes and apply an entity use code to that tax code. That custom tax code can then be applied to an item in AvaTax. Refer to the [TaxCodeModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/TaxCodeModel/) API for more information.

How do I populate client attributes and store IDs in the reportingLocationCode attribute?

The `reportingLocationCode` attribute is sourced with the unique id assigned in your system identifying a physical store location. The Seller also adds these unique id’s with appropriate address information in AvaTax. This way, when you send AvaTax a transaction from, for example, Store A, we can attribute all the sales sent from Store A for reporting. For more information, refer to [About Location Based Reporting](https://developer.avalara.com/avatax/dev-guide/locations/location-based-reporting/) in the Developer Guide.

My transaction includes a negative quantity. Why is the calculated tax positive?

When creating transactions, the `quantity` value must be positive. If you attempt to pass a negative value, it will still be treated as positive.

If you're attempting to refund an item, pass a negative value for the `amount`. AvaTax will treat that `amount` as negative when calculating tax.

What are the usage terms, and how is usage billed?

Please review the [AvaTax supplemental terms](https://www.avalara.com/us/en/legal/avatax-terms.html) for this information.[](https://www.avalara.com/us/en/legal/avatax-terms.html)

What is the address hierarchy between the document and line level?

In AvaTax, addresses can be entered at the line level or the document level. If an address is passed at the line level, that address will apply to that line. If an address is passed at the document level, it will apply to all lines in the document.

If a document consists of address at the line level and also at the document level, the line-level addresses will take precedence over the document-level addresses.

What is the difference between a customer code and a vendor code?

The use of vendor vs customer is contextual based on the transaction type. Vendor IDs are for Purchase transaction types; customer IDs are for Sales and Return transaction types.

In addition, some integrations have an internal GUID as a customer identifier along with a merchant or vendor facing customer identifier. So in the UI, you might see customer ID "123", but on the backend, there might be another string that identifies that particular merchant. So the customer identifer should be a unique value that is shown to the merchant so that the merchant can easily identify their exempt customer IDs.

What is the difference between totalTax and totalTaxCalculated in a transaction response?

`totalTax` is the sum of all tax amounts for all lines. `totalTaxCalculated` indicates the total tax calculated by AvaTax. This is usually the same as the `totalTax`, except when a tax override amount is specified. This is for informational purposes; `totalTax` will still be used for reporting.

What is the exemption hierarchy?

-   [Exemption numbers](/avatax-dm-combined-erp/sales-tax-badge/transactions/exemptions/exemption-numbers) take precedence over [entity use codes](/avatax-dm-combined-erp/sales-tax-badge/transactions/exemptions/entity-use-codes).
-   If you have a transaction that exempts a customer, for example, as a reseller, but that customer is already configured as an exempt manufacturing customer in the customer record, AvaTax will use the document level exemption reason over the reason in the customer record.

What is the hierarchy between street level and longitude/latitude level information in addresses?

If latitude and longitude information is provided for an addresses along with line, city, region, country and postal code information, AvaTax only use the latitude and longitude values and will discard the line, city, region, country, and postal code information for the transaction. If you provide either latitude or longitude information but not both, AvaTax will then use the line, city, region, country and postal code information for the addresses.

Please ensure that you have the correct latitude/longitude information for an address when including this in your API calls.  

Why am I seeing an \\"EntityNotFoundError\\",\\"message\\":\\"Company not found.\\" error message?

This message is raised if the `companyCode` getting passed in your request does not exist in the Account you're making your `createTransaction` request against.

Why does the tax in my ERP not match the tax in my ecommerce integration?

This is likely caused by a mismatch of tax codes. Make sure the tax codes being used in your ERP are the same as your tax codes in your ecommerce integration. For example if you're using a shipping tax code of "fob destination" in your ecommerce integration, but "fob origin" is your setup in your ERP, then your tax calculation will differ on shipping.

Why is AvaTax collecting tax for a customer that is set up as exempt in CertCapture?

This is likely due to an error in the `customerCode`. When creating a transaction for an exempt customer, the `customerCode` must exactly match the customer ID of the certificate that was created in CertCapture. If these do not exactly match, then the transaction will be taxable.

[Previous](/avatax-dm-combined-erp/sales-tax-badge/calculate-tax-offline/reconcile-transactions-after-outage)

[Next](/avatax-dm-combined-erp/sales-tax-badge/refunds-faqs)