Jurisdictions are set on the invoice and the line item for a CalcTaxes
request.
Key | Location Name | Description |
---|---|---|
bill | BillTo | Location used to specify where the transaction is to be billed Required on the invoice, but can also be set on the line item (overrides BillTo set on the invoice) |
from | From (Origination) | Specifies the point of origin for the line item. Defaults to the BillTo location if not set |
to | From (Destination) | Specifies the point of termination for the line item. Defaults to the BillTo location if not set |
See Location for more information.
A jurisdiction is set with one of these jurisdiction types:
pcd
): Persisted numeric identifer for a taxing jurisdictionctry
), State (st
), County (cnty
), City (city
), and/or Postal Code (zip
). Set the Street Address (addr
) if you want to geocode the address (geo
= true
)ctry
), State (st
), and Postal Code (zip
) are required for USA and Canada (at a minimum)fips
): Standardized set of numeric or alphabetic codes issued by the National Institute of Standards and Technology (NIST) to ensure uniform identification of geographic entities through all federal government agenciesnpa
): 6-digit numbers consisting of the area code and second 3 digits of a North American dialing plan phone numberWhen specifying jurisdictions outside of the United States via country/state/county/city lookup, be sure to pass the Country ISO (ctry
). For example, use CAN
for Canada or IND
for India. If the Country ISO is not set on a foreign country, errors are generated.
See Location for more information.
An address can be passed in a CalcTaxes
request and geocoded during the tax calculation by setting geo
= true
.
Keep these points in mind if using the Geocoding functionality (geo
= true
):
For more information, see Best Practices.
If the city or county name does not match and a postal code is provided, jurisdiction determination falls back to the Zip Code for transactions in the United States of America or Canada.
Full state and country names are also supported, along with the 2 character state abbreviation or 3 character ISO country code.
The fallback process ignores spacing and punctuation in the city and county names. For example, “CURRY’S CORNER”, AK is treated the same as “CURRYS CORNER” and “CURRYSCORNER”.
Specify a PCode (pcd
) for fallback when using the embedded Geocoding functionality (geo
= true
in a location). If geocoding fails to find the location, the PCode (pcd
) is used for the jurisdiction.
Geocoding functionality is being used in this example by setting geo
to true
and specifying an address (addr
), city (city
), state (st
), postal code (zip
), and country (ctry
).
Federal, State, and County taxes are returned based upon the geocoding request.
This example sets the BillTo location (bill
) to Montreal, QC.
Taxes returned are for Quebec (tax level lvl
1) and Canada (tax level lvl
0).
If you have a PCode (pcd
), NPANXX (npa
), or FIPS (fips
) instead of an address, set these fields in BillTo (bill
), From (from
), or To (to
) (these examples demonstrate BillTo, but the same applies to From and To):