Skip to navigation

Example transactions

View as Markdown

This scenario is used to determine that the Tax amount in AvaTax is the same as the tax amount in your platform on the invoice. This scenario assumes the following:

  • TheshipFrom address is anywhere in the US.
  • TheshipTo address is in Washington DC, so be sure that your company is configured to collect tax in Washington DC.
  • Line 1amount is $100, and thetaxCode isP0000000.
  • Line 2amount is $100, and thetaxCode isNT.
  • Line 3amount is $50, and thetaxCode isFR020100.

Expected result

Taxes\Fees column should total $7.50. Remember that freight is only 50% taxable in this scenario. In the cURL response below, look for thetotalTax field in the response.

Example

Click on the request and response below to view a working example using cURL.

Request

curl -X POST -H 'Accept: application/json' -H 'Authorization: Basic aHR0cHdhdQNoOmY=' -H 'Content-Type: application/json' --data '{ "lines": [ { "number":"1", "quantity":1, "amount":100, "taxCode":"P0000000", "itemCode":"Test SKU", "description":"Test Item Description", "discounted": false }, { "number":"2", "quantity":1, "amount":100, "taxCode":"NT", "itemCode":"Test SKU", "description":"Test Item Description", "discounted": false }, { "number":"3", "quantity":1, "amount":50, "taxCode":"FR020100", "itemCode":"Freight SKU", "description":"Common Carrier", "discounted": false } ], "addresses": { "shipFrom":{ "line1":"100 Ravine Ln NE", "city":"Bainbridge Island", "region":"WA", "country":"US", "postalCode":"98110-2687" }, "shipTo":{ "line1":"915 F St Nw", "city":"Washington, DC", "region":"Washington, DC", "country":"US", "postalCode":"20004-1493" } }, "code":"Tax amount scenario", "type":"SalesInvoice", "companyCode":"DICEYREILLYS", "date":"2021-03-08", "customerCode":"Test Customer ID", "commit":true, "currencyCode":"USD" }' 'https://sandbox-rest.avatax.com/api/v2/transactions/create'

Response

{ ... "totalAmount": 250, "totalExempt": 125, "totalDiscount": 0, "totalTax": 7.5, "totalTaxable": 125, "totalTaxCalculated": 7.5, ...}

Previous

Next

Part of the AvaTax and ECM integration guide. Open the full “Example transactions” milestone on Avalara to see every page in this section.