Chapter 2 - Calculate Taxes
Your First CalcTaxes Request
Let’s dive in. We’re going to send a simple
CalcTaxes call using Postman and then inspect the results.
Add these mandatory headers to your request:
For the body of the
POST request, copy and paste the following example:
What are we sending?
- DocumentCode (
doc) is included so we can commit this transaction later
- The Commit flag (
cmmt) is set to
false. If you want to commit immediately, set the Commit flag to
truein the transaction.
- BillTo (
bill) is a Location object and is specified in different ways. We pass a combination of Country (
city), State (
st), and Postal Code (
zip), but we can also pass a single PCode (
pcd), FIPS (
fips), or NPANXX (
datekey is important because it affects which rules are used by our tax engine to calculate taxes. Tax rules change frequently, and our Content Team continuously updates our tax engine to reflect these changes.
itms) is contained within the
Invoice. This is where you enter information such as Charge (
chg), Transaction/Service Pair (
serv), and number of Lines (
The response contains a list of detailed tax amounts (
Each tax amount returned contains additional information including:
bill: Is the tax billable? Or, can this tax be passed on to the end-customer?
cmpl: Will this tax be included in compliance reporting?
tm: Taxable Measure
cat: Tax Category
rate: Tax Rate
lvl: Tax Level (Federal, State, County, Local)
tax: Tax Amount
For more information, see CalcTaxes Response.