Introduction

API Endpoint

https://api.taxjar.com/v2/

Welcome to the TaxJar Sales Tax API! You can use our API to get information on sales tax rates, categories or upload transactions.

We currently provide API clients for the following languages:

Before getting started, you’ll need to sign up for TaxJar and get an API key. If you have any questions or would like to request support for a new client language, feel free to contact us.

Authentication

Example Request With Authentication Headers

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");
# Authorization headers must be passed for every request
$ curl "API_ENDPOINT" \
  -H "Authorization: Token token="9e0cd62a22f451701f29c3bde214""

or

$ curl "API_ENDPOINT" \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214"

Make sure to replace 9e0cd62a22f451701f29c3bde214 with your API key.

TaxJar uses API keys to allow access to the API. If you’re new to TaxJar, you’ll need to sign up for an account to get your API key. Otherwise, log in and go to Account > API Access to generate a new API token.

TaxJar expects the API key to be included in all API requests to the server using a header like the following:

Authorization: Token token="9e0cd62a22f451701f29c3bde214"

or

Authorization: Bearer 9e0cd62a22f451701f29c3bde214

Billing

Each sales tax calculation or rate lookup request made to our API results in a “transaction”. These transactions will be counted toward your monthly plan limit. Overage fees are charged separately if you exceed your plan limit during busier months. You’ll always remain on the same plan until you decide to upgrade. You can check your API usage under “Transaction History” from Plans & Billing in the TaxJar app. Hover over the transaction counts for a breakdown of imported orders and calculations.

View our pricing to find a plan that works best for you. We also recommend our guide on avoiding unnecessary API calls to reduce your API usage and save money.

Countries

We currently support the following countries around the world. If you would like to request the addition of a new country, please email us at [email protected].

North America

   United States
   Canada

Oceania

   Australia

European Union

   Austria
   Belgium
   Bulgaria
   Croatia
   Cyprus
   Czech Republic
   Denmark
   Estonia
   Finland
   France
   Germany
   Greece
   Hungary
   Ireland
   Italy
   Latvia
   Lithuania
   Luxembourg
   Malta
   Netherlands
   Poland
   Portugal
   Romania
   Slovakia
   Slovenia
   Spain
   Sweden
   United Kingdom

Sales Tax API

TaxJar API endpoints provide detailed sales tax rates and calculations. They also support extended US-based reporting and filing capabilities for TaxJar users.

Run in Postman

Categories

The TaxJar API provides product-level tax rules for a subset of product categories. These categories are to be used for products that are either exempt from sales tax in some jurisdictions or are taxed at reduced rates. You need not pass in a product tax code for sales tax calculations on product that is fully taxable. Simply leave that parameter out.

We will be expanding support for additional, less common categories over time. If you would like to request the addition of a new product category, please email us at [email protected].

get List tax categories

Definition

client.categories
client.categories
client.categories();
$client->categories();
client.Categories();
GET https://api.taxjar.com/v2/categories

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

categories = client.categories
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

categories = client.categories()
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.categories().then(function(res) {
  res.categories; // Array of categories
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$categories = $client->categories();
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var categories = client.Categories();
$ curl https://api.taxjar.com/v2/categories \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214"

Response Example

{
  "categories": [
    {
      "name": "Clothing",
      "product_tax_code": "20010",
      "description": " All human wearing apparel suitable for general use"
    },
    {
      "name": "Software as a Service",
      "product_tax_code": "30070",
      "description": "Pre-written software, delivered electronically, but access remotely."
    },
    {
      "name": "Digital Goods",
      "product_tax_code": "31000",
      "description": "Digital products transferred electronically, meaning obtained by the purchaser by means other than tangible storage media."
    },
    {
      "name": "Food & Groceries",
      "product_tax_code": "40030",
      "description": "Food for humans consumption, unprepared"
    },
    {
      "name": "Non-Prescription",
      "product_tax_code": "51010",
      "description": "Drugs for human use without a prescription"
    },
    {
      "name": "Prescription",
      "product_tax_code": "51020",
      "description": "Drugs for human use with a prescription"
    },
    {
      "name": "Books",
      "product_tax_code": "81100",
      "description": "Books, printed"
    },
    {
      "name": "Textbook",
      "product_tax_code": "81110",
      "description": "Textbooks, printed"
    },
    {
      "name": "Religious Books",
      "product_tax_code": "81120",
      "description": "Religious books and manuals, printed"
    },
    {
      "name": "Magazines & Subscriptions",
      "product_tax_code": "81300",
      "description": "Periodicals, printed, sold by subscription"
    },
    {
      "name": "Magazine",
      "product_tax_code": "81310",
      "description": "Periodicals, printed, sold individually"
    },
    {
      "name": "Other Exempt",
      "product_tax_code": "99999",
      "description": "Item is exempt"
    }
  ]
}
[
  #<Taxjar::Category:0x00000a @attrs={
    :name => "Digital Goods",
    :product_tax_code => "31000",
    :description => "Digital products transferred electronically."
  }>,
  #<Taxjar::Category:0x00000a @attrs={
    :name => "Clothing",
    :product_tax_code => "20010",
    :description => "All human wearing apparel suitable for general use"
  }>,
  #<Taxjar::Category:0x00000a @attrs={
    :name => "Non-Prescription",
    :product_tax_code => "51010",
    :description => "Drugs for human use without a prescription"
  }>
]
[
  <TaxJarCategory {
    'product_tax_code': '31000',
    'name': 'Digital Goods',
    'description': 'Digital products transferred electronically, meaning obtained by the purchaser by means other than tangible storage media.'
  }>,
  <TaxJarCategory {
    'product_tax_code': '20010',
    'name': 'Clothing',
    'description': 'All human wearing apparel suitable for general use'
  }>,
  <TaxJarCategory {
    'product_tax_code': '51010',
    'name': 'Non-Prescription',
    'description': 'Drugs for human use without a prescription'
  }>
]

Lists all tax categories.

Request

GET https://api.taxjar.com/v2/categories

Response

Returns a JSON object with an array of product categories and corresponding tax codes. The following categories are currently supported:

Category Code Countries Description
Clothing 20010 All human wearing apparel suitable for general use.
Software as a Service 30070 Pre-written software, delivered electronically, but access remotely.
Digital Goods 31000 Digital products transferred electronically, meaning obtained by the purchaser by means other than tangible storage media.
Food & Groceries 40030 Food for humans consumption, unprepared.
Non-Prescription 51010 Drugs for human use without a prescription.
Prescription 51020 Drugs for human use with a prescription.
Books 81100 Books, printed.
Textbooks 81110 Textbooks, printed.
Religious Books 81120 Religious books and manuals, printed.
Magazines & Subscriptions 81300 Periodicals, printed, sold by subscription.
Magazine 81310 Periodicals, printed, sold individually.
Other Exempt 99999 All Item is exempt.

Attributes

Parameter Type Description
product_tax_code string Tax code of the given product category.
name string Name of the given product category.
description string Description of the given product category.

Rates

get Show tax rates for a location

Definition

client.rates_for_location
client.rates_for_location
client.ratesForLocation();
$client->ratesForLocation();
client.RatesForLocation();
GET https://api.taxjar.com/v2/rates/:zip

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

# United States (ZIP+4)
rates = client.rates_for_location('90404-3370')

# United States (ZIP w/ Optional Params)
rates = client.rates_for_location('90404', {
  :city => 'Santa Monica',
  :country => 'US'
})

# United States (ZIP+4 w/ Street Address for Rooftop Accuracy)
rates = client.rates_for_location('05495-2086', {
  :street => '312 Hurricane Lane',
  :city => 'Williston',
  :country => 'US'
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

# United States (ZIP+4)
rates = client.rates_for_location('90404-3370')

# United States (ZIP w/ Optional Params)
rates = client.rates_for_location('90404', {
  'city': 'Santa Monica',
  'country': 'US'
})

# United States (ZIP+4 w/ Street Address for Rooftop Accuracy)
rates = client.rates_for_location('05495-2086', {
  'street': '312 Hurricane Lane',
  'city': 'Williston',
  'country': 'US'
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

// United States (ZIP+4)
client.ratesForLocation('90404-3370').then(function(res) {
  res.rate; // Rate object
});

// United States (ZIP w/ Optional Params)
client.ratesForLocation('90404', {
  city: 'Santa Monica',
  country: 'US'
}).then(function(res) {
  res.rate; // Rate object
});

// United States (ZIP+4 w/ Street Address for Rooftop Accuracy)
client.ratesForLocation('05495-2086', {
  street: '312 Hurricane Lane',
  city: 'Williston',
  country: 'US'
}).then(function(res) {
  res.rate; // Rate object
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

// United States (ZIP+4)
$rates = $client->ratesForLocation('90404-3370');

// United States (ZIP w/ Optional Params)
$rates = $client->ratesForLocation('90404', [
  'city' => 'Santa Monica',
  'country' => 'US'
]);

// United States (ZIP+4 w/ Street Address for Rooftop Accuracy)
$rates = $client->ratesForLocation('05495-2086', [
  'street' => '312 Hurricane Lane',
  'city' => 'Williston',
  'country' => 'US'
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

// United States (ZIP+4)
var rates = client.RatesForLocation("90404-3370");

// United States (ZIP w/ Optional Params)
var rates = client.RatesForLocation("90404", new {
  city = "Santa Monica",
  country = "US"
});

// United States (ZIP+4 w/ Street Address for Rooftop Accuracy)
var rates = client.RatesForLocation("05495-2086", new {
  street = "312 Hurricane Lane",
  city = "Williston",
  country = "US"
});
# United States (ZIP+4)
$ curl https://api.taxjar.com/v2/rates/90404-3370 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214"

# United States (ZIP w/ Optional Params)
$ curl -G https://api.taxjar.com/v2/rates/90404 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -d city="Santa%20Monica" \
  -d country="US"

# United States (ZIP+4 w/ Street Address for Rooftop Accuracy)
$ curl -G https://api.taxjar.com/v2/rates/05495-2086 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -d street="312 Hurricane Lane" \
  -d city="Williston" \
  -d country="US"

Request Scenario: Canada

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

rates = client.rates_for_location('V5K0A1', {
  :city => 'Vancouver',
  :country => 'CA'
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

rates = client.rates_for_location('V5K0A1', {
  'city': 'Vancouver',
  'country': 'CA'
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.ratesForLocation('V5K0A1', {
  city: 'Vancouver',
  country: 'CA'
}).then(function(res) {
  res.rate; // Rate object
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$rates = $client->ratesForLocation('V5K0A1', [
  'city' => 'Vancouver',
  'country' => 'CA'
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.RatesForLocation("V5K0A1", new {
  city = "Vancouver",
  country = "CA"
});
$ curl -G https://api.taxjar.com/v2/rates/V5K0A1 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -d city="Vancouver" \
  -d country="CA"

Request Scenario: Australia

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

rates = client.rates_for_location('2060', {
  :city => 'Sydney',
  :country => 'AU'
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

rates = client.rates_for_location('2060', {
  'city': 'Sydney',
  'country': 'AU'
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.ratesForLocation('2060', {
  city: 'Sydney',
  country: 'AU'
}).then(function(res) {
  res.rate; // Rate object
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$rates = $client->ratesForLocation('2060', [
  'city' => 'Sydney',
  'country' => 'AU'
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.RatesForLocation("2060", new {
  city = "Sydney",
  country = "AU"
});
$ curl -G https://api.taxjar.com/v2/rates/2060 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -d city="Sydney" \
  -d country="AU"

Request Scenario: European Union

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

rates = client.rates_for_location('00150', {
  :city => 'Helsinki',
  :country => 'FI'
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

rates = client.rates_for_location('00150', {
  'city': 'Helsinki',
  'country': 'FI'
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.ratesForLocation('00150', {
  city: 'Helsinki',
  country: 'FI'
}).then(function(res) {
  res.rate; // Rate object
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$rates = $client->ratesForLocation('00150', [
  'city' => 'Helsinki',
  'country' => 'FI'
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.RatesForLocation("00150", new {
  city = "Helsinki",
  country = "FI"
});
$ curl -G https://api.taxjar.com/v2/rates/00150 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -d city="Helsinki" \
  -d country="FI"

Response Example
International requests outside of US/Canada may return different parameters.

{
  "rate": {
    "zip": "90404",
    "state": "CA",
    "state_rate": "0.0625",
    "county": "LOS ANGELES",
    "county_rate": "0.01",
    "city": "SANTA MONICA",
    "city_rate": "0.0",
    "combined_district_rate": "0.025",
    "combined_rate": "0.0975",
    "freight_taxable": false
  }
}

{
  "rate": {
    "zip": "05495-2086",
    "country": "US",
    "country_rate": "0.0",
    "state": "VT",
    "state_rate": "0.06",
    "county": "CHITTENDEN",
    "county_rate": "0.0",
    "city": "WILLISTON",
    "city_rate": "0.0",
    "combined_district_rate": "0.01",
    "combined_rate": "0.07",
    "freight_taxable": true
  }
}
#<Taxjar::Rate:0x00000a @attrs={
  :zip => "90404",
  :state => "CA",
  :state_rate => 0.065,
  :county => "LOS ANGELES",
  :county_rate => 0.01,
  :city => "SANTA MONICA",
  :city_rate => 0.005,
  :combined_district_rate => 0.015,
  :combined_rate => 0.095,
  :freight_taxable => false
}>

#<Taxjar::Rate:0x00000a @attrs={
  :zip => "05495-2086",
  :country => "US",
  :country_rate => 0,
  :state => "VT",
  :state_rate => 0.06,
  :county => "CHITTENDEN",
  :county_rate => 0,
  :city => "WILLISTON",
  :city_rate => 0,
  :combined_district_rate => 0.01,
  :combined_rate => 0.07,
  :freight_taxable => true
}>
<TaxJarRate {
  'city': 'SANTA MONICA',
  'zip': '90404',
  'combined_district_rate': 0.025,
  'state_rate': 0.0625,
  'city_rate': 0,
  'county': 'LOS ANGELES',
  'state': 'CA',
  'combined_rate': 0.0975,
  'county_rate': 0.01,
  'freight_taxable': False
}>

<TaxJarRate {
  'city': 'WILLISTON',
  'zip': '05495-2086',
  'combined_district_rate': 0.01,
  'state_rate': 0.06,
  'city_rate': 0,
  'country_rate': 0,
  'county': 'CHITTENDEN',
  'state': 'VT',
  'country': 'US',
  'combined_rate': 0.07,
  'county_rate': 0,
  'freight_taxable': True
}>

Response Scenario: Canada

{
  "rate": {
    "zip": "V5K0A1",
    "city": "Vancouver",
    "state": "BC",
    "country": "CA",
    "combined_rate": "0.12",
    "freight_taxable": true
  }
}
#<Taxjar::Rate:0x00000a @attrs={
  :zip => "V5K0A1",
  :city => "Vancouver",
  :state => "BC",
  :country => "CA",
  :combined_rate => 0.12,
  :freight_taxable => true
}>
<TaxJarRate {
  'zip': 'V5K0A1',
  'city': 'Vancouver',
  'state': 'BC',
  'country': 'CA',
  'combined_rate': 0.12,
  'freight_taxable': True
}>

Response Scenario: Australia

{
  "rate": {
    "zip": "2060",
    "country": "AU",
    "country_rate": "0.1",
    "combined_rate": "0.1",
    "freight_taxable": true
  }
}
#<Taxjar::Rate:0x00000a @attrs={
  :zip => "2060",
  :country => "AU",
  :country_rate => 0.1,
  :combined_rate => 0.1,
  :freight_taxable => true
}>
<TaxJarRate {
  'zip': '2060',
  'country': 'AU',
  'country_rate': 0.1,
  'combined_rate': 0.1,
  'freight_taxable': True
}>

Response Scenario: European Union

{
  "rate": {
    "country": "FI",
    "name": "Finland",
    "standard_rate": "0.24",
    "reduced_rate": "0.0",
    "super_reduced_rate": "0.0",
    "parking_rate": "0.0",
    "distance_sale_threshold": "0.0",
    "freight_taxable": true
  }
}
#<Taxjar::Rate:0x00000a @attrs={
  :country => "FI",
  :name => "Finland",
  :standard_rate => 0.24,
  :reduced_rate => nil,
  :super_reduced_rate => nil,
  :parking_rate => nil,
  :distance_sale_threshold => nil,
  :freight_taxable => true
}>
<TaxJarRate {
  'country': 'FI',
  'name': 'Finland',
  'standard_rate': 0.24,
  'reduced_rate': None,
  'super_reduced_rate': None,
  'parking_rate': None,
  'distance_sale_threshold': None,
  'freight_taxable': True
}>

Shows the sales tax rates for a given location.

Request

GET https://api.taxjar.com/v2/rates/:zip

Parameters

Parameter Type Required Description
country string conditional Two-letter ISO country code of the country for given location.
zip string required Postal code for given location (5-Digit ZIP or ZIP+4).
city string conditional City for given location.
street string optional Street address for given location. View Note

Response

Returns a JSON object with rates for a given location broken down by state, county, city, and district. For international requests, returns standard and reduced rates.

  United States Attributes

Parameter Type Description
zip string Postal code for given location.
country string Country for given location if SST state. View Note
country_rate long Country sales tax rate for given location if SST state. View Note
state string Postal abbreviated state name for given location.
state_rate long State sales tax rate for given location.
county string County name for given location.
county_rate long County sales tax rate for given location.
city string City name for given location.
city_rate long City sales tax rate for given location.
combined_district_rate long Aggregate rate for all city and county sales tax districts effective at the location.
combined_rate long Overall sales tax rate which includes state, county, city and district tax. This rate should be used to determine how much sales tax to collect for an order.
freight_taxable bool Freight taxability for given location.

  Canada Attributes

Parameter Type Description
zip string Postal code for given location.
city string City name for given location.
state string Postal abbreviated state name for given location.
country string Two-letter ISO country code of the country for given location.
combined_rate long Overall sales tax rate. This rate should be used to determine how much sales tax to collect for an order.
freight_taxable bool Freight taxability for given location.

  Australia Attributes

Parameter Type Description
zip string Postal code for given location.
country string Two-letter ISO country code of the country for given location.
country_rate long Country sales tax rate for given location.
combined_rate long Overall sales tax rate. This rate should be used to determine how much sales tax to collect for an order.
freight_taxable bool Freight taxability for given location.

  European Union Attributes

Parameter Type Description
country string Two-letter ISO country code of the country for given location.
name string Country name for given location.
standard_rate long Standard rate for given location.
reduced_rate long Reduced rate for given location.
super_reduced_rate long Super reduced rate for given location.
parking_rate long Parking rate for given location.
distance_sale_threshold long Distance selling threshold for given location.
freight_taxable bool Freight taxability for given location.

Taxes

post Calculate sales tax for an order

Definition

client.tax_for_order
client.tax_for_order
client.taxForOrder();
$client->taxForOrder();
client.TaxForOrder();
POST https://api.taxjar.com/v2/taxes

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.tax_for_order({
  :from_country => 'US',
  :from_zip => '92093',
  :from_state => 'CA',
  :from_city => 'La Jolla',
  :from_street => '9500 Gilman Drive',
  :to_country => 'US',
  :to_zip => '90002',
  :to_state => 'CA',
  :to_city => 'Los Angeles',
  :to_street => '1335 E 103rd St',
  :amount => 15,
  :shipping => 1.5,
  :nexus_addresses => [
    {
      :id => 'Main Location',
      :country => 'US',
      :zip => '92093',
      :state => 'CA',
      :city => 'La Jolla',
      :street => '9500 Gilman Drive',
    }
  ],
  :line_items => [
    {
      :id => '1',
      :quantity => 1,
      :product_tax_code => '20010',
      :unit_price => 15,
      :discount => 0
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.tax_for_order({
  'from_country': 'US',
  'from_zip': '92093',
  'from_state': 'CA',
  'from_city': 'La Jolla',
  'from_street': '9500 Gilman Drive',
  'to_country': 'US',
  'to_zip': '90002',
  'to_state': 'CA',
  'to_city': 'Los Angeles',
  'to_street': '1335 E 103rd St',
  'amount': 15,
  'shipping': 1.5,
  'nexus_addresses': [
    {
      'id': 'Main Location',
      'country': 'US',
      'zip': '92093',
      'state': 'CA',
      'city': 'La Jolla',
      'street': '9500 Gilman Drive'
    }
  ],
  'line_items': [
    {
      'id': '1',
      'quantity': 1,
      'product_tax_code': '20010',
      'unit_price': 15,
      'discount': 0
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.taxForOrder({
  from_country: 'US',
  from_zip: '92093',
  from_state: 'CA',
  from_city: 'La Jolla',
  from_street: '9500 Gilman Drive',
  to_country: 'US',
  to_zip: '90002',
  to_state: 'CA',
  to_city: 'Los Angeles',
  to_street: '1335 E 103rd St',
  amount: 15,
  shipping: 1.5,
  nexus_addresses: [
    {
      id: 'Main Location',
      country: 'US',
      zip: '92093',
      state: 'CA',
      city: 'La Jolla',
      street: '9500 Gilman Drive'
    }
  ],
  line_items: [
    {
      id: '1',
      quantity: 1,
      product_tax_code: '20010',
      unit_price: 15,
      discount: 0
    }
  ]
}).then(function(res) {
  res.tax; // Tax object
  res.tax.amount_to_collect; // Amount to collect
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order_taxes = $client->taxForOrder([
  'from_country' => 'US',
  'from_zip' => '92093',
  'from_state' => 'CA',
  'from_city' => 'La Jolla',
  'from_street' => '9500 Gilman Drive',
  'to_country' => 'US',
  'to_zip' => '90002',
  'to_state' => 'CA',
  'to_city' => 'Los Angeles',
  'to_street' => '1335 E 103rd St',
  'amount' => 15,
  'shipping' => 1.5,
  'nexus_addresses' => [
    [
      'id' => 'Main Location',
      'country' => 'US',
      'zip' => '92093',
      'state' => 'CA',
      'city' => 'La Jolla',
      'street' => '9500 Gilman Drive',
    ]
  ],
  'line_items' => [
    [
      'id' => '1',
      'quantity' => 1,
      'product_tax_code' => '20010',
      'unit_price' => 15,
      'discount' => 0
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.TaxForOrder(new {
  from_country = "US",
  from_zip = "92093",
  from_state = "CA",
  from_city = "La Jolla",
  from_street = "9500 Gilman Drive",
  to_country = "US",
  to_zip = "90002",
  to_state = "CA",
  to_city = "Los Angeles",
  to_street = "1335 E 103rd St",
  amount = 15,
  shipping = 1.5,
  nexus_addresses = new[] {
    new {
      id = "Main Location",
      country = "US",
      zip = "92093",
      state = "CA",
      city = "La Jolla",
      street = "9500 Gilman Drive",
    }
  },
  line_items = new[] {
    new {
      id = "1",
      quantity = 1,
      product_tax_code = "20010",
      unit_price = 15,
      discount = 0
    }
  }
});
$ curl https://api.taxjar.com/v2/taxes \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "from_country": "US",
    "from_zip": "92093",
    "from_state": "CA",
    "from_city": "La Jolla",
    "from_street": "9500 Gilman Drive",
    "to_country": "US",
    "to_zip": "90002",
    "to_state": "CA",
    "to_city": "Los Angeles",
    "to_street": "1335 E 103rd St",
    "amount": 15,
    "shipping": 1.5,
    "nexus_addresses": [
      {
        "id": "Main Location",
        "country": "US",
        "zip": "92093",
        "state": "CA",
        "city": "La Jolla",
        "street": "9500 Gilman Drive"
      }
    ],
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "product_tax_code": "20010",
        "unit_price": 15,
        "discount": 0
      }
    ]
  }'

Request Scenario: Canada

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.tax_for_order({
  :from_country => 'CA',
  :from_zip => 'V6G 3E2',
  :from_state => 'BC',
  :from_city => 'Vancouver',
  :from_street => '845 Avison Way',
  :to_country => 'CA',
  :to_zip => 'M5V 2T6',
  :to_state => 'ON',
  :to_city => 'Toronto',
  :to_street => '301 Front St W',
  :amount => 15,
  :shipping => 1.5,
  :nexus_addresses => [
    {
      :id => 'Main Location',
      :country => 'CA',
      :zip => 'V6G 3E2',
      :state => 'BC',
      :city => 'Vancouver',
      :street => '845 Avison Way',
    }
  ],
  :line_items => [
    {
      :id => '1',
      :quantity => 1,
      :unit_price => 15,
      :discount => 0
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.tax_for_order({
  'from_country': 'CA',
  'from_zip': 'V6G 3E2',
  'from_state': 'BC',
  'from_city': 'Vancouver',
  'from_street': '845 Avison Way',
  'to_country': 'CA',
  'to_zip': 'M5V 2T6',
  'to_state': 'ON',
  'to_city': 'Toronto',
  'to_street': '301 Front St W',
  'amount': 15,
  'shipping': 1.5,
  'nexus_addresses': [
    {
      'id': 'Main Location',
      'country': 'CA',
      'zip': 'V6G 3E2',
      'state': 'BC',
      'city': 'Vancouver',
      'street': '845 Avison Way'
    }
  ],
  'line_items': [
    {
      'id': '1',
      'quantity': 1,
      'unit_price': 15,
      'discount': 0
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.taxForOrder({
  from_country: 'CA',
  from_zip: 'V6G 3E2',
  from_state: 'BC',
  from_city: 'Vancouver',
  from_street: '845 Avison Way',
  to_country: 'CA',
  to_zip: 'M5V 2T6',
  to_state: 'ON',
  to_city: 'Toronto',
  to_street: '301 Front St W',
  amount: 15,
  shipping: 1.5,
  nexus_addresses: [
    {
      id: 'Main Location',
      country: 'CA',
      zip: 'V6G 3E2',
      state: 'BC',
      city: 'Vancouver',
      street: '845 Avison Way'
    }
  ],
  line_items: [
    {
      id: '1',
      quantity: 1,
      unit_price: 15,
      discount: 0
    }
  ]
}).then(function(res) {
  res.tax; // Tax object
  res.tax.amount_to_collect; // Amount to collect
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order_taxes = $client->taxForOrder([
  'from_country' => 'CA',
  'from_zip' => 'V6G 3E2',
  'from_state' => 'BC',
  'from_city' => 'Vancouver',
  'from_street' => '845 Avison Way',
  'to_country' => 'CA',
  'to_zip' => 'M5V 2T6',
  'to_state' => 'ON',
  'to_city' => 'Toronto',
  'to_street' => '301 Front St W',
  'amount' => 15,
  'shipping' => 1.5,
  'nexus_addresses' => [
    [
      'id' => 'Main Location',
      'country' => 'CA',
      'zip' => 'V6G 3E2',
      'state' => 'BC',
      'city' => 'Vancouver',
      'street' => '845 Avison Way',
    ]
  ],
  'line_items' => [
    [
      'id' => '1',
      'quantity' => 1,
      'unit_price' => 15,
      'discount' => 0
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.TaxForOrder(new {
  from_country = "CA",
  from_zip = "V6G 3E2",
  from_state = "BC",
  from_city = "Vancouver",
  from_street = "845 Avison Way",
  to_country = "CA",
  to_zip = "M5V 2T6",
  to_state = "ON",
  to_city = "Toronto",
  to_street = "301 Front St W",
  amount = 15,
  shipping = 1.5,
  nexus_addresses = new[] {
    new {
      id = "Main Location",
      country = "US",
      zip = "V6G 3E2",
      state = "BC",
      city = "Vancouver",
      street = "845 Avison Way",
    }
  },
  line_items = new[] {
    new {
      id = "1",
      quantity = 1,
      unit_price = 15,
      discount = 0
    }
  }
});
$ curl https://api.taxjar.com/v2/taxes \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "from_country": "CA",
    "from_zip": "V6G 3E2",
    "from_state": "BC",
    "from_city": "Vancouver",
    "from_street": "845 Avison Way",
    "to_country": "CA",
    "to_zip": "M5V 2T6",
    "to_state": "ON",
    "to_city": "Toronto",
    "to_street": "301 Front St W",
    "amount": 15,
    "shipping": 1.5,
    "nexus_addresses": [
      {
        "id": "Main Location",
        "country": "CA",
        "zip": "V6G 3E2",
        "state": "BC",
        "city": "Vancouver",
        "street": "845 Avison Way"
      }
    ],
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "unit_price": 15,
        "discount": 0
      }
    ]
  }'

Request Scenario: Australia

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.tax_for_order({
  :from_country => 'AU',
  :from_zip => 'NSW 2000',
  :from_city => 'Sydney',
  :from_street => '483 George St',
  :to_country => 'AU',
  :to_zip => 'VIC 3002',
  :to_city => 'Richmond',
  :to_street => 'Brunton Ave',
  :amount => 15,
  :shipping => 1.5,
  :nexus_addresses => [
    {
      :id => 'Main Location',
      :country => 'AU',
      :zip => 'NSW 2000',
      :city => 'Sydney',
      :street => '483 George St',
    }
  ],
  :line_items => [
    {
      :id => '1',
      :quantity => 1,
      :unit_price => 15,
      :discount => 0
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.tax_for_order({
  'from_country': 'AU',
  'from_zip': 'NSW 2000',
  'from_city': 'Sydney',
  'from_street': '483 George St',
  'to_country': 'AU',
  'to_zip': 'VIC 3002',
  'to_city': 'Richmond',
  'to_street': 'Brunton Ave',
  'amount': 15,
  'shipping': 1.5,
  'nexus_addresses': [
    {
      'id': 'Main Location',
      'country': 'AU',
      'zip': 'NSW 2000',
      'city': 'Sydney',
      'street': '483 George St'
    }
  ],
  'line_items': [
    {
      'id': '1',
      'quantity': 1,
      'unit_price': 15,
      'discount': 0
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.taxForOrder({
  from_country: 'AU',
  from_zip: 'NSW 2000',
  from_city: 'Sydney',
  from_street: '483 George St',
  to_country: 'AU',
  to_zip: 'VIC 3002',
  to_city: 'Richmond',
  to_street: 'Brunton Ave',
  amount: 15,
  shipping: 1.5,
  nexus_addresses: [
    {
      id: 'Main Location',
      country: 'AU',
      zip: 'NSW 2000',
      city: 'Sydney',
      street: '483 George St'
    }
  ],
  line_items: [
    {
      id: '1',
      quantity: 1,
      unit_price: 15,
      discount: 0
    }
  ]
}).then(function(res) {
  res.tax; // Tax object
  res.tax.amount_to_collect; // Amount to collect
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order_taxes = $client->taxForOrder([
  'from_country' => 'AU',
  'from_zip' => 'NSW 2000',
  'from_city' => 'Sydney',
  'from_street' => '483 George St',
  'to_country' => 'AU',
  'to_zip' => 'VIC 3002',
  'to_city' => 'Richmond',
  'to_street' => 'Brunton Ave',
  'amount' => 15,
  'shipping' => 1.5,
  'nexus_addresses' => [
    [
      'id' => 'Main Location',
      'country' => 'AU',
      'zip' => 'NSW 2000',
      'city' => 'Sydney',
      'street' => '483 George St',
    ]
  ],
  'line_items' => [
    [
      'id' => '1',
      'quantity' => 1,
      'unit_price' => 15,
      'discount' => 0
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.TaxForOrder(new {
  from_country = "AU",
  from_zip = "NSW 2000",
  from_city = "Sydney",
  from_street = "483 George St",
  to_country = "AU",
  to_zip = "VIC 3002",
  to_city = "Richmond",
  to_street = "Brunton Ave",
  amount = 15,
  shipping = 1.5,
  nexus_addresses = new[] {
    new {
      id = "Main Location",
      country = "AU",
      zip = "NSW 2000",
      city = "Sydney",
      street = "483 George St",
    }
  },
  line_items = new[] {
    new {
      id = "1",
      quantity = 1,
      unit_price = 15,
      discount = 0
    }
  }
});
$ curl https://api.taxjar.com/v2/taxes \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "from_country": "AU",
    "from_zip": "NSW 2000",
    "from_city": "Sydney",
    "from_street": "483 George St",
    "to_country": "AU",
    "to_zip": "VIC 3002",
    "to_city": "Richmond",
    "to_street": "Brunton Ave",
    "amount": 15,
    "shipping": 1.5,
    "nexus_addresses": [
      {
        "id": "Main Location",
        "country": "AU",
        "zip": "NSW 2000",
        "city": "Sydney",
        "street": "483 George St"
      }
    ],
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "unit_price": 15,
        "discount": 0
      }
    ]
  }'

Request Scenario: European Union

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.tax_for_order({
  :from_country => 'FR',
  :from_zip => '75008',
  :from_city => 'Paris',
  :from_street => '55 Rue du Faubourg Saint-Honoré',
  :to_country => 'FR',
  :to_zip => '13281',
  :to_city => 'Marseille',
  :to_street => 'Rue Fort du Sanctuaire',
  :amount => 15,
  :shipping => 1.5,
  :nexus_addresses => [
    {
      :id => 'Main Location',
      :country => 'FR',
      :zip => '75008',
      :city => 'Paris',
      :street => '55 Rue du Faubourg Saint-Honoré',
    }
  ],
  :line_items => [
    {
      :id => '1',
      :quantity => 1,
      :unit_price => 15,
      :discount => 0
    }
  ]
})
# coding=utf-8
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.tax_for_order({
  'from_country': 'FR',
  'from_zip': '75008',
  'from_city': 'Paris',
  'from_street': '55 Rue du Faubourg Saint-Honoré',
  'to_country': 'FR',
  'to_zip': '13281',
  'to_city': 'Marseille',
  'to_street': 'Rue Fort du Sanctuaire',
  'amount': 15,
  'shipping': 1.5,
  'nexus_addresses': [
    {
      'id': 'Main Location',
      'country': 'FR',
      'zip': '75008',
      'city': 'Paris',
      'street': '55 Rue du Faubourg Saint-Honoré'
    }
  ],
  'line_items': [
    {
      'id': '1',
      'quantity': 1,
      'unit_price': 15,
      'discount': 0
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.taxForOrder({
  from_country: 'FR',
  from_zip: '75008',
  from_city: 'Paris',
  from_street: '55 Rue du Faubourg Saint-Honoré',
  to_country: 'FR',
  to_zip: '13281',
  to_city: 'Marseille',
  to_street: 'Rue Fort du Sanctuaire',
  amount: 15,
  shipping: 1.5,
  nexus_addresses: [
    {
      id: 'Main Location',
      country: 'CA',
      zip: '75008',
      city: 'Paris',
      street: '55 Rue du Faubourg Saint-Honoré'
    }
  ],
  line_items: [
    {
      id: '1',
      quantity: 1,
      unit_price: 15,
      discount: 0
    }
  ]
}).then(function(res) {
  res.tax; // Tax object
  res.tax.amount_to_collect; // Amount to collect
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order_taxes = $client->taxForOrder([
  'from_country' => 'FR',
  'from_zip' => '75008',
  'from_city' => 'Paris',
  'from_street' => '55 Rue du Faubourg Saint-Honoré',
  'to_country' => 'FR',
  'to_zip' => '13281',
  'to_city' => 'Marseille',
  'to_street' => 'Rue Fort du Sanctuaire',
  'amount' => 15,
  'shipping' => 1.5,
  'nexus_addresses' => [
    [
      'id' => 'Main Location',
      'country' => 'FR',
      'zip' => '75008',
      'city' => 'Paris',
      'street' => '55 Rue du Faubourg Saint-Honoré',
    ]
  ],
  'line_items' => [
    [
      'id' => '1',
      'quantity' => 1,
      'unit_price' => 15,
      'discount' => 0
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.TaxForOrder(new {
  from_country = "FR",
  from_zip = "75008",
  from_city = "Paris",
  from_street = "55 Rue du Faubourg Saint-Honoré",
  to_country = "FR",
  to_zip = "13281",
  to_city = "Marseille",
  to_street = "Rue Fort du Sanctuaire",
  amount = 15,
  shipping = 1.5,
  nexus_addresses = new[] {
    new {
      id = "Main Location",
      country = "FR",
      zip = "75008",
      city = "Paris",
      street = "55 Rue du Faubourg Saint-Honoré",
    }
  },
  line_items = new[] {
    new {
      id = "1",
      quantity = 1,
      unit_price = 15,
      discount = 0
    }
  }
});
$ curl https://api.taxjar.com/v2/taxes \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "from_country": "FR",
    "from_zip": "75008",
    "from_city": "Paris",
    "from_street": "55 Rue du Faubourg Saint-Honoré",
    "to_country": "FR",
    "to_zip": "13281",
    "to_city": "Marseille",
    "to_street": "Rue Fort du Sanctuaire",
    "amount": 15,
    "shipping": 1.5,
    "nexus_addresses": [
      {
        "id": "Main Location",
        "country": "FR",
        "zip": "75008",
        "city": "Paris",
        "street": "55 Rue du Faubourg Saint-Honoré"
      }
    ],
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "unit_price": 15,
        "discount": 0
      }
    ]
  }'

Request Scenario: Origin-Based Sourcing Calculate sales tax for origin-based states such as Texas. In origin-based states, sales tax should be collected based on where you, the seller, are located. If shipping from out of state, destination-based sourcing may apply. Review our state guides to learn how to collect sales tax where you have nexus.

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.tax_for_order({
  :from_country => 'US',
  :from_zip => '78701',
  :from_state => 'TX',
  :from_city => 'Austin',
  :from_street => '1100 Congress Ave',
  :to_country => 'US',
  :to_zip => '77058',
  :to_state => 'TX',
  :to_city => 'Houston',
  :to_street => '1601 E NASA Pkwy',
  :amount => 15,
  :shipping => 1.5,
  :nexus_addresses => [
    {
      :id => 'Main Location',
      :country => 'US',
      :zip => '78701',
      :state => 'TX',
      :city => 'Austin',
      :street => '1100 Congress Ave',
    }
  ],
  :line_items => [
    {
      :id => '1',
      :quantity => 1,
      :unit_price => 15,
      :discount => 0
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.tax_for_order({
  'from_country': 'US',
  'from_zip': '78701',
  'from_state': 'TX',
  'from_city': 'Austin',
  'from_street': '1100 Congress Ave',
  'to_country': 'US',
  'to_zip': '77058',
  'to_state': 'TX',
  'to_city': 'Houston',
  'to_street': '1601 E NASA Pkwy',
  'amount': 15,
  'shipping': 1.5,
  'nexus_addresses': [
    {
      'id': 'Main Location',
      'country': 'US',
      'zip': '78701',
      'state': 'TX',
      'city': 'Austin',
      'street': '1100 Congress Ave'
    }
  ],
  'line_items': [
    {
      'id': '1',
      'quantity': 1,
      'unit_price': 15,
      'discount': 0
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.taxForOrder({
  from_country: 'US',
  from_zip: '78701',
  from_state: 'TX',
  from_city: 'Austin',
  from_street: '1100 Congress Ave',
  to_country: 'US',
  to_zip: '77058',
  to_state: 'TX',
  to_city: 'Houston',
  to_street: '1601 E NASA Pkwy',
  amount: 15,
  shipping: 1.5,
  nexus_addresses: [
    {
      id: 'Main Location',
      country: 'US',
      zip: '78701',
      state: 'TX',
      city: 'Austin',
      street: '1100 Congress Ave'
    }
  ],
  line_items: [
    {
      id: '1',
      quantity: 1,
      unit_price: 15,
      discount: 0
    }
  ]
}).then(function(res) {
  res.tax; // Tax object
  res.tax.amount_to_collect; // Amount to collect
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order_taxes = $client->taxForOrder([
  'from_country' => 'US',
  'from_zip' => '78701',
  'from_state' => 'TX',
  'from_city' => 'Austin',
  'from_street' => '1100 Congress Ave',
  'to_country' => 'US',
  'to_zip' => '77058',
  'to_state' => 'TX',
  'to_city' => 'Houston',
  'to_street' => '1601 E NASA Pkwy',
  'amount' => 15,
  'shipping' => 1.5,
  'nexus_addresses' => [
    [
      'id' => 'Main Location',
      'country' => 'US',
      'zip' => '78701',
      'state' => 'TX',
      'city' => 'Austin',
      'street' => '1100 Congress Ave',
    ]
  ],
  'line_items' => [
    [
      'id' => '1',
      'quantity' => 1,
      'unit_price' => 15,
      'discount' => 0
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.TaxForOrder(new {
  from_country = "US",
  from_zip = "78701",
  from_state = "TX",
  from_city = "Austin",
  from_street = "1100 Congress Ave",
  to_country = "US",
  to_zip = "77058",
  to_state = "TX",
  to_city = "Houston",
  to_street = "1601 E NASA Pkwy",
  amount = 15,
  shipping = 1.5,
  nexus_addresses = new[] {
    new {
      id = "Main Location",
      country = "US",
      zip = "78701",
      state = "TX",
      city = "Austin",
      street = "1100 Congress Ave",
    }
  },
  line_items = new[] {
    new {
      id = "1",
      quantity = 1,
      unit_price = 15,
      discount = 0
    }
  }
});
$ curl https://api.taxjar.com/v2/taxes \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "from_country": "US",
    "from_zip": "78701",
    "from_state": "TX",
    "from_city": "Austin",
    "from_street": "1100 Congress Ave",
    "to_country": "US",
    "to_zip": "77058",
    "to_state": "TX",
    "to_city": "Houston",
    "to_street": "1601 E NASA Pkwy",
    "amount": 15,
    "shipping": 1.5,
    "nexus_addresses": [
      {
        "id": "Main Location",
        "country": "US",
        "zip": "78701",
        "state": "TX",
        "city": "Austin",
        "street": "1100 Congress Ave"
      }
    ],
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "unit_price": 15,
        "discount": 0
      }
    ]
  }'

Request Scenario: Shipping Exemptions If separately stated, shipping charges aren’t taxable in states such as California and Massachusetts. They are taxable if you include the charge as part of the price of the item.

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.tax_for_order({
  :from_country => 'US',
  :from_zip => '02110',
  :from_state => 'MA',
  :from_city => 'Boston',
  :from_street => '1 Central Wharf',
  :to_country => 'US',
  :to_zip => '01608',
  :to_state => 'MA',
  :to_city => 'Worcester',
  :to_street => '455 Main St',
  :amount => 15,
  :shipping => 1.5,
  :nexus_addresses => [
    {
      :id => 'Main Location',
      :country => 'US',
      :zip => '02110',
      :state => 'MA',
      :city => 'Boston',
      :street => '1 Central Wharf',
    }
  ],
  :line_items => [
    {
      :id => '1',
      :quantity => 1,
      :unit_price => 15,
      :discount => 0
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.tax_for_order({
  'from_country': 'US',
  'from_zip': '02110',
  'from_state': 'MA',
  'from_city': 'Boston',
  'from_street': '1 Central Wharf',
  'to_country': 'US',
  'to_zip': '01608',
  'to_state': 'MA',
  'to_city': 'Worcester',
  'to_street': '455 Main St',
  'amount': 15,
  'shipping': 1.5,
  'nexus_addresses': [
    {
      'id': 'Main Location',
      'country': 'US',
      'zip': '02110',
      'state': 'MA',
      'city': 'Boston',
      'street': '1 Central Wharf'
    }
  ],
  'line_items': [
    {
      'id': '1',
      'quantity': 1,
      'unit_price': 15,
      'discount': 0
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.taxForOrder({
  from_country: 'US',
  from_zip: '02110',
  from_state: 'MA',
  from_city: 'Boston',
  from_street: '1 Central Wharf',
  to_country: 'US',
  to_zip: '01608',
  to_state: 'MA',
  to_city: 'Worcester',
  to_street: '455 Main St',
  amount: 15,
  shipping: 1.5,
  nexus_addresses: [
    {
      id: 'Main Location',
      country: 'US',
      zip: '02110',
      state: 'MA',
      city: 'Boston',
      street: '1 Central Wharf'
    }
  ],
  line_items: [
    {
      id: '1',
      quantity: 1,
      unit_price: 15,
      discount: 0
    }
  ]
}).then(function(res) {
  res.tax; // Tax object
  res.tax.amount_to_collect; // Amount to collect
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order_taxes = $client->taxForOrder([
  'from_country' => 'US',
  'from_zip' => '02110',
  'from_state' => 'MA',
  'from_city' => 'Boston',
  'from_street' => '1 Central Wharf',
  'to_country' => 'US',
  'to_zip' => '01608',
  'to_state' => 'MA',
  'to_city' => 'Worcester',
  'to_street' => '455 Main St',
  'amount' => 15,
  'shipping' => 1.5,
  'nexus_addresses' => [
    [
      'id' => 'Main Location',
      'country' => 'US',
      'zip' => '02110',
      'state' => 'MA',
      'city' => 'Boston',
      'street' => '1 Central Wharf',
    ]
  ],
  'line_items' => [
    [
      'id' => '1',
      'quantity' => 1,
      'unit_price' => 15,
      'discount' => 0
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.TaxForOrder(new {
  from_country = "US",
  from_zip = "02110",
  from_state = "MA",
  from_city = "Boston",
  from_street = "1 Central Wharf",
  to_country = "US",
  to_zip = "01608",
  to_state = "MA",
  to_city = "Worcester",
  to_street = "455 Main St",
  amount = 15,
  shipping = 1.5,
  nexus_addresses = new[] {
    new {
      id = "Main Location",
      country = "US",
      zip = "02110",
      state = "MA",
      city = "Boston",
      street = "1 Central Wharf",
    }
  },
  line_items = new[] {
    new {
      id = "1",
      quantity = 1,
      unit_price = 15,
      discount = 0
    }
  }
});
$ curl https://api.taxjar.com/v2/taxes \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "from_country": "US",
    "from_zip": "02110",
    "from_state": "MA",
    "from_city": "Boston",
    "from_street": "1 Central Wharf",
    "to_country": "US",
    "to_zip": "01608",
    "to_state": "MA",
    "to_city": "Worcester",
    "to_street": "455 Main St",
    "amount": 15,
    "shipping": 1.5,
    "nexus_addresses": [
      {
        "id": "Main Location",
        "country": "US",
        "zip": "02110",
        "state": "MA",
        "city": "Boston",
        "street": "1 Central Wharf"
      }
    ],
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "unit_price": 15,
        "discount": 0
      }
    ]
  }'

Request Scenario: Clothing Exemptions Clothing items sold in New York under $110 are exempt from the state tax rate, but only exempt from county taxes in certain jurisdictions. We also handle clothing exemptions in states such as Pennsylvania and New Jersey.

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.tax_for_order({
  :from_country => 'US',
  :from_zip => '12054',
  :from_state => 'NY',
  :from_city => 'Delmar',
  :to_country => 'US',
  :to_zip => '10541',
  :to_state => 'NY',
  :to_city => 'Mahopac',
  :amount => 29.94,
  :shipping => 7.99,
  :line_items => [
    {
      :quantity => 1,
      :unit_price => 19.99,
      :product_tax_code => '20010'
    },
    {
      :quantity => 1,
      :unit_price => 9.95,
      :product_tax_code => '20010'
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.tax_for_order({
  'from_country': 'US',
  'from_zip': '12044',
  'from_state': 'NY',
  'from_city': 'Delmar',
  'to_country': 'US',
  'to_zip': '10541',
  'to_state': 'NY',
  'to_city': 'Mahopac',
  'amount': 29.94,
  'shipping': 7.99,
  'line_items': [
    {
      'quantity': 1,
      'unit_price': 19.99,
      'product_tax_code': '20010'
    },
    {
      'quantity': 1,
      'unit_price': 9.95,
      'product_tax_code': '20010'
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.taxForOrder({
  from_country: 'US',
  from_zip: '12054',
  from_state: 'NY',
  from_city: 'Delmar',
  to_country: 'US',
  to_zip: '10541',
  to_state: 'NY',
  to_city: 'Mahopac',
  amount: 29.94,
  shipping: 7.99,
  line_items: [
    {
      quantity: 1,
      unit_price: 19.99,
      product_tax_code: '20010'
    },
    {
      quantity: 1,
      unit_price: 9.95,
      product_tax_code: '20010'
    }
  ]
}).then(function(res) {
  res.tax; // Tax object
  res.tax.amount_to_collect; // Amount to collect
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order_taxes = $client->taxForOrder([
  'from_country' => 'US',
  'from_zip' => '12054',
  'from_state' => 'NY',
  'from_city' => 'Delmar',
  'to_country' => 'US',
  'to_zip' => '10541',
  'to_state' => 'NY',
  'to_city' => 'Mahopac',
  'amount' => 29.94,
  'shipping' => 7.99,
  'line_items' => [
    [
      'quantity' => 1,
      'unit_price' => 19.99,
      'product_tax_code' => '20010'
    ],
    [
      'quantity' => 1,
      'unit_price' => 9.95,
      'product_tax_code' => '20010'
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.TaxForOrder(new {
  from_country = "US",
  from_zip = "12054",
  from_state = "NY",
  from_city = "Delmar",
  to_country = "US",
  to_zip = "10541",
  to_state = "NY",
  to_city = "Mahopac",
  amount = 29.94,
  shipping = 7.99,
  line_items = new[] {
    new {
      quantity = 1,
      unit_price = 19.99,
      product_tax_code = "20010"
    },
    new {
      quantity = 1,
      unit_price = 9.95,
      product_tax_code = "20010"
    }
  }
});
$ curl https://api.taxjar.com/v2/taxes \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "from_city": "Delmar",
    "from_state": "NY",
    "from_zip": "12054",
    "from_country": "US",
    "to_city": "Mahopac",
    "to_state": "NY",
    "to_zip": "10541",
    "to_country": "US",
    "amount": 29.94,
    "shipping": 7.99,
    "line_items": [
      {
        "quantity": 1,
        "unit_price": 19.99,
        "product_tax_code": "20010"
      },
      {
        "quantity": 1,
        "unit_price": 9.95,
        "product_tax_code": "20010"
      }
    ]
  }'

Request Scenario: Food & Grocery Exemptions Food and grocery items are exempt from all sales tax in states such as California, New York, and Texas.

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.tax_for_order({
  :from_country => 'US',
  :from_zip => '94133',
  :from_state => 'CA',
  :from_city => 'San Francisco',
  :to_country => 'US',
  :to_zip => '90071',
  :to_state => 'CA',
  :to_city => 'Los Angeles',
  :amount => 29.94,
  :shipping => 7.99,
  :line_items => [
    {
      :quantity => 1,
      :unit_price => 19.99,
      :product_tax_code => '40030'
    },
    {
      :quantity => 1,
      :unit_price => 9.95,
      :product_tax_code => '40030'
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.tax_for_order({
  'from_country': 'US',
  'from_zip': '94133',
  'from_state': 'CA',
  'from_city': 'San Francisco',
  'to_country': 'US',
  'to_zip': '90071',
  'to_state': 'CA',
  'to_city': 'Los Angeles',
  'amount': 29.94,
  'shipping': 7.99,
  'line_items': [
    {
      'quantity': 1,
      'unit_price': 19.99,
      'product_tax_code': '40030'
    },
    {
      'quantity': 1,
      'unit_price': 9.95,
      'product_tax_code': '40030'
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.taxForOrder({
  from_country: 'US',
  from_zip: '94133',
  from_state: 'CA',
  from_city: 'San Francisco',
  to_country: 'US',
  to_zip: '90071',
  to_state: 'CA',
  to_city: 'Los Angeles',
  amount: 29.94,
  shipping: 7.99,
  line_items: [
    {
      quantity: 1,
      unit_price: 19.99,
      product_tax_code: '40030'
    },
    {
      quantity: 1,
      unit_price: 9.95,
      product_tax_code: '40030'
    }
  ]
}).then(function(res) {
  res.tax; // Tax object
  res.tax.amount_to_collect; // Amount to collect
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order_taxes = $client->taxForOrder([
  'from_country' => 'US',
  'from_zip' => '94133',
  'from_state' => 'CA',
  'from_city' => 'San Francisco',
  'to_country' => 'US',
  'to_zip' => '90071',
  'to_state' => 'CA',
  'to_city' => 'Los Angeles',
  'amount' => 29.94,
  'shipping' => 7.99,
  'line_items' => [
    [
      'quantity' => 1,
      'unit_price' => 19.99,
      'product_tax_code' => '40030'
    ],
    [
      'quantity' => 1,
      'unit_price' => 9.95,
      'product_tax_code' => '40030'
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.TaxForOrder(new {
  from_country = "US",
  from_zip = "94133",
  from_state = "CA",
  from_city = "San Francisco",
  to_country = "US",
  to_zip = "90071",
  to_state = "CA",
  to_city = "Los Angeles",
  amount = 29.94,
  shipping = 7.99,
  line_items = new[] {
    new {
      quantity = 1,
      unit_price = 19.99,
      product_tax_code = "40030"
    },
    new {
      quantity = 1,
      unit_price = 9.95,
      product_tax_code = "40030"
    }
  }
});
$ curl https://api.taxjar.com/v2/taxes \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "from_city": "San Francisco",
    "from_state": "CA",
    "from_zip": "94133",
    "from_country": "US",
    "to_city": "Los Angeles",
    "to_state": "CA",
    "to_zip": "90071",
    "to_country": "US",
    "amount": 29.94,
    "shipping": 7.99,
    "line_items": [
      {
        "quantity": 1,
        "unit_price": 19.99,
        "product_tax_code": "40030"
      },
      {
        "quantity": 1,
        "unit_price": 9.95,
        "product_tax_code": "40030"
      }
    ]
  }'

Request Scenario: Other Exemptions Use the 99999 tax code to manually exempt products in categories we don’t support yet.

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.tax_for_order({
  :from_country => 'US',
  :from_zip => '98101',
  :from_state => 'WA',
  :from_city => 'Seattle',
  :to_country => 'US',
  :to_zip => '99201',
  :to_state => 'WA',
  :to_city => 'Spokane',
  :amount => 29.94,
  :shipping => 7.99,
  :line_items => [
    {
      :quantity => 1,
      :unit_price => 19.99,
      :product_tax_code => '99999'
    },
    {
      :quantity => 1,
      :unit_price => 9.95
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.tax_for_order({
  'from_country': 'US',
  'from_zip': '98101',
  'from_state': 'WA',
  'from_city': 'Seattle',
  'to_country': 'US',
  'to_zip': '99201',
  'to_state': 'WA',
  'to_city': 'Spokane',
  'amount': 29.94,
  'shipping': 7.99,
  'line_items': [
    {
      'quantity': 1,
      'unit_price': 19.99,
      'product_tax_code': '99999'
    },
    {
      'quantity': 1,
      'unit_price': 9.95
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.taxForOrder({
  from_country: 'US',
  from_zip: '98101',
  from_state: 'WA',
  from_city: 'Seattle',
  to_country: 'US',
  to_zip: '99201',
  to_state: 'WA',
  to_city: 'Spokane',
  amount: 29.94,
  shipping: 7.99,
  line_items: [
    {
      quantity: 1,
      unit_price: 19.99,
      product_tax_code: '99999'
    },
    {
      quantity: 1,
      unit_price: 9.95
    }
  ]
}).then(function(res) {
  res.tax; // Tax object
  res.tax.amount_to_collect; // Amount to collect
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order_taxes = $client->taxForOrder([
  'from_country' => 'US',
  'from_zip' => '98101',
  'from_state' => 'WA',
  'from_city' => 'Seattle',
  'to_country' => 'US',
  'to_zip' => '99201',
  'to_state' => 'WA',
  'to_city' => 'Spokane',
  'amount' => 29.94,
  'shipping' => 7.99,
  'line_items' => [
    [
      'quantity' => 1,
      'unit_price' => 19.99,
      'product_tax_code' => '99999'
    ],
    [
      'quantity' => 1,
      'unit_price' => 9.95
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.TaxForOrder(new {
  from_country = "US",
  from_zip = "98101",
  from_state = "WA",
  from_city = "Seattle",
  to_country = "US",
  to_zip = "99201",
  to_state = "WA",
  to_city = "Spokane",
  amount = 29.94,
  shipping = 7.99,
  line_items = new[] {
    new {
      quantity = 1,
      unit_price = 19.99,
      product_tax_code = "99999"
    },
    new {
      quantity = 1,
      unit_price = 9.95
    }
  }
});
$ curl https://api.taxjar.com/v2/taxes \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "from_city": "Seattle",
    "from_state": "WA",
    "from_zip": "98101",
    "from_country": "US",
    "to_city": "Spokane",
    "to_state": "WA",
    "to_zip": "99201",
    "to_country": "US",
    "amount": 29.94,
    "shipping": 7.99,
    "line_items": [
      {
        "quantity": 1,
        "unit_price": 19.99,
        "product_tax_code": "99999"
      },
      {
        "quantity": 1,
        "unit_price": 9.95
      }
    ]
  }'

Request Scenario: No Nexus For interstate transactions, nexus won’t trigger for the destination state unless you provide the destination state via nexus_addresses[] or have the destination state on file in your TaxJar account.

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.tax_for_order({
  :from_country => 'US',
  :from_zip => '33018',
  :from_state => 'FL',
  :from_city => 'Miami',
  :to_country => 'US',
  :to_zip => '97035',
  :to_state => 'OR',
  :to_city => 'Portland',
  :amount => 15,
  :shipping => 1.5
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.tax_for_order({
  'from_country': 'US',
  'from_zip': '33018',
  'from_state': 'FL',
  'from_city': 'Miami',
  'to_country': 'US',
  'to_zip': '97035',
  'to_state': 'OR',
  'to_city': 'Portland',
  'amount': 15,
  'shipping': 1.5
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.taxForOrder({
  from_country: 'US',
  from_zip: '33018',
  from_state: 'FL',
  from_city: 'Miami',
  to_country: 'US',
  to_zip: '97035',
  to_state: 'OR',
  to_city: 'Portland',
  amount: 15,
  shipping: 1.5
}).then(function(res) {
  res.tax; // Tax object
  res.tax.amount_to_collect; // Amount to collect
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order_taxes = $client->taxForOrder([
  'from_country' => 'US',
  'from_zip' => '33018',
  'from_state' => 'FL',
  'from_city' => 'Miami',
  'to_country' => 'US',
  'to_zip' => '97035',
  'to_state' => 'OR',
  'to_city' => 'Portland',
  'amount' => 15,
  'shipping' => 1.5
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var rates = client.TaxForOrder(new {
  from_country = "US",
  from_zip = "33018",
  from_state = "FL",
  from_city = "Miami",
  to_country = "US",
  to_zip = "97305",
  to_state = "OR",
  to_city = "Portland",
  amount = 15,
  shipping = 1.5
});
$ curl https://api.taxjar.com/v2/taxes \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "from_city": "Miami",
    "from_state": "FL",
    "from_zip": "33018",
    "from_country": "US",
    "to_city": "Portland",
    "to_state": "OR",
    "to_zip": "97035",
    "to_country": "US",
    "amount": 15,
    "shipping": 1.5
  }'

Response Example

{
  "tax": {
    "order_total_amount": 16.5,
    "shipping": 1.5,
    "taxable_amount": 15,
    "amount_to_collect": 1.35,
    "rate": 0.09,
    "has_nexus": true,
    "freight_taxable": false,
    "tax_source": "destination",
    "breakdown": {
      "taxable_amount": 15,
      "tax_collectable": 1.35,
      "combined_tax_rate": 0.09,
      "state_taxable_amount": 15,
      "state_tax_rate": 0.0625,
      "state_tax_collectable": 0.94,
      "county_taxable_amount": 15,
      "county_tax_rate": 0.0025,
      "county_tax_collectable": 0.04,
      "city_taxable_amount": 0,
      "city_tax_rate": 0,
      "city_tax_collectable": 0,
      "special_district_taxable_amount": 15,
      "special_tax_rate": 0.025,
      "special_district_tax_collectable": 0.38,
      "line_items": [
        {
          "id": "1",
          "taxable_amount": 15,
          "tax_collectable": 1.35,
          "combined_tax_rate": 0.09,
          "state_taxable_amount": 15,
          "state_sales_tax_rate": 0.0625,
          "state_amount": 0.94,
          "county_taxable_amount": 15,
          "county_tax_rate": 0.0025,
          "county_amount": 0.04,
          "city_taxable_amount": 0,
          "city_tax_rate": 0,
          "city_amount": 0,
          "special_district_taxable_amount": 15,
          "special_tax_rate": 0.025,
          "special_district_amount": 0.38
        }
      ]
    }
  }
}
#<Taxjar::Tax:0x00000a @attrs={
  :order_total_amount => 16.5,
  :shipping => 1.5,
  :taxable_amount => 15.0,
  :amount_to_collect => 1.35,
  :rate => 0.09,
  :has_nexus => true,
  :freight_taxable => false,
  :tax_source => "destination",
  :breakdown => #<Taxjar::Breakdown:0x00000a @attrs={
    :taxable_amount => 15.0,
    :tax_collectable => 1.35,
    :combined_tax_rate => 0.09,
    :state_taxable_amount => 15.0,
    :state_tax_rate => 0.0625,
    :state_tax_collectable => 0.94,
    :county_taxable_amount => 15.0,
    :county_tax_rate => 0.0025,
    :county_tax_collectable => 0.04,
    :city_taxable_amount => 0.0,
    :city_tax_rate => 0.0,
    :city_tax_collectable => 0.0,
    :special_district_taxable_amount => 15.0,
    :special_tax_rate => 0.025,
    :special_district_tax_collectable => 0.38,
    :line_items => [
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "1",
        :taxable_amount => 15.0,
        :tax_collectable => 1.35,
        :combined_tax_rate => 0.09,
        :state_taxable_amount => 15.0,
        :state_sales_tax_rate => 0.065,
        :state_amount => 0.94,
        :county_taxable_amount => 15.0,
        :county_tax_rate => 0.0025,
        :county_amount => 0.04,
        :city_taxable_amount => 0.0,
        :city_tax_rate => 0.0,
        :city_amount => 0.0,
        :special_district_taxable_amount => 15.0,
        :special_tax_rate => 0.025,
        :special_district_amount => 0.38
      }>
    ]
  }>
}>
<TaxJarTax {
  'breakdown': <TaxJarBreakdown {
    'special_district_taxable_amount': 15.0,
    'city_tax_rate': 0.0,
    'county_tax_collectable': 0.15,
    'county_taxable_amount': 15.0,
    'special_district_tax_collectable': 0.23,
    'line_items': [<TaxJarBreakdownLineItem {
      'special_district_taxable_amount': 15.0,
      'city_tax_rate': 0.0,
      'county_taxable_amount': 15.0,
      'special_district_amount': 0.23,
      'state_sales_tax_rate': 0.0625,
      'state_amount': 0.94,
      'city_taxable_amount': 0.0,
      'taxable_amount': 15.0,
      'special_tax_rate': 0.015,
      'state_taxable_amount': 15.0,
      'combined_tax_rate': 0.0875,
      'county_tax_rate': 0.01,
      'city_amount': 0.0,
      'county_amount': 0.15,
      'id': '1',
      'tax_collectable': 1.31
    }>],
    'taxable_amount': 15.0,
    'state_taxable_amount': 15.0,
    'combined_tax_rate': 0.0875,
    'state_tax_collectable': 0.94,
    'state_tax_rate': 0.0625,
    'city_tax_collectable': 0.0,
    'county_tax_rate': 0.01,
    'special_tax_rate': 0.015,
    'city_taxable_amount': 0.0,
    'tax_collectable': 1.31
  }>,
  'has_nexus': True,
  'tax_source': 'destination',
  'shipping': 1.5,
  'taxable_amount': 15.0,
  'rate': 0.0875,
  'freight_taxable': False,
  'amount_to_collect': 1.31,
  'order_total_amount': 16.5
}>

Response Scenario: Canada

{
  "tax": {
    "amount_to_collect": 2.15,
    "breakdown": {
      "combined_tax_rate": 0.13,
      "gst": 0.83,
      "gst_tax_rate": 0.05,
      "gst_taxable_amount": 16.5,
      "line_items": [
        {
          "combined_tax_rate": 0.13,
          "gst": 0.75,
          "gst_tax_rate": 0.05,
          "gst_taxable_amount": 15,
          "id": "1",
          "pst": 1.2,
          "pst_tax_rate": 0.08,
          "pst_taxable_amount": 15,
          "qst": 0,
          "qst_tax_rate": 0,
          "qst_taxable_amount": 0,
          "tax_collectable": 1.95,
          "taxable_amount": 15
        }
      ],
      "pst": 1.32,
      "pst_tax_rate": 0.08,
      "pst_taxable_amount": 16.5,
      "qst": 0,
      "qst_tax_rate": 0,
      "qst_taxable_amount": 0,
      "shipping": {
        "combined_tax_rate": 0.13,
        "gst": 0.08,
        "gst_tax_rate": 0.05,
        "gst_taxable_amount": 1.5,
        "pst": 0.12,
        "pst_tax_rate": 0.08,
        "pst_taxable_amount": 1.5,
        "qst": 0,
        "qst_tax_rate": 0,
        "qst_taxable_amount": 0,
        "tax_collectable": 0.2,
        "taxable_amount": 1.5
      },
      "tax_collectable": 2.15,
      "taxable_amount": 16.5
    },
    "freight_taxable": true,
    "has_nexus": true,
    "order_total_amount": 16.5,
    "rate": 0.13,
    "shipping": 1.5,
    "tax_source": "destination",
    "taxable_amount": 16.5
  }
}
#<Taxjar::Tax:0x00000a @attrs={
  :order_total_amount => 16.5,
  :shipping => 1.5,
  :taxable_amount => 16.5,
  :amount_to_collect => 2.15,
  :rate => 0.13,
  :has_nexus => true,
  :freight_taxable => true,
  :tax_source => "destination",
  :breakdown => #<Taxjar::Breakdown:0x00000a @attrs={
    :taxable_amount => 16.5,
    :tax_collectable => 2.15,
    :combined_tax_rate => 0.13,
    :gst_taxable_amount => 16.5,
    :gst_tax_rate => 0.05,
    :gst => 0.83,
    :pst_taxable_amount => 16.5,
    :pst_tax_rate => 0.08,
    :pst => 1.32,
    :qst_taxable_amount => 0.0,
    :qst_tax_rate => 0.0,
    :qst => 0.0,
    :shipping => {
      :taxable_amount => 1.5,
      :tax_collectable => 0.2,
      :combined_tax_rate => 0.13,
      :gst_taxable_amount => 1.5,
      :gst_tax_rate => 0.05,
      :gst => 0.08,
      :pst_taxable_amount => 1.5,
      :pst_tax_rate => 0.08,
      :pst => 0.12,
      :qst_taxable_amount => 0.0,
      :qst_tax_rate => 0.0,
      :qst => 0.0
    },
    :line_items => [
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "1",
        :taxable_amount => 15.0,
        :tax_collectable => 1.95,
        :combined_tax_rate => 0.13,
        :gst_taxable_amount => 15.0,
        :gst_tax_rate => 0.05,
        :gst => 0.75,
        :pst_taxable_amount => 15.0,
        :pst_tax_rate => 0.08,
        :pst => 1.2,
        :qst_taxable_amount => 0.0,
        :qst_tax_rate => 0.0,
        :qst => 0.0
      }>
    ]
  }>
}>
<TaxJarTax {
  'breakdown': <TaxJarBreakdown {
    'line_items': [
      <TaxJarBreakdownLineItem {
        'gst': 0.75,
        'pst_tax_rate': 0.08,
        'gst_tax_rate': 0.05,
        'taxable_amount': 15.0,
        'gst_taxable_amount': 15.0,
        'qst_taxable_amount': 0.0,
        'pst_taxable_amount': 15.0,
        'combined_tax_rate': 0.13,
        'qst': 0.0,
        'qst_tax_rate': 0.0,
        'id': '1',
        'pst': 1.2,
        'tax_collectable': 1.95
      }>
    ],
    'gst': 0.83,
    'pst_tax_rate': 0.08,
    'gst_tax_rate': 0.05,
    'shipping': {
      'gst': 0.08,
      'pst_tax_rate': 0.08,
      'gst_tax_rate': 0.05,
      'taxable_amount': 1.5,
      'gst_taxable_amount': 1.5,
      'qst_taxable_amount': 0.0,
      'pst_taxable_amount': 1.5,
      'combined_tax_rate': 0.13,
      'qst': 0.0,
      'qst_tax_rate': 0.0,
      'pst': 0.12,
      'tax_collectable': 0.2
    },
    'taxable_amount': 16.5,
    'gst_taxable_amount': 16.5,
    'qst_taxable_amount': 0.0,
    'pst_taxable_amount': 16.5,
    'combined_tax_rate': 0.13,
    'qst': 0.0,
    'qst_tax_rate': 0.0,
    'pst': 1.32,
    'tax_collectable': 2.15
  }>,
  'has_nexus': True,
  'tax_source': 'destination',
  'shipping': 1.5,
  'taxable_amount': 16.5,
  'rate': 0.13,
  'freight_taxable': True,
  'amount_to_collect': 2.15,
  'order_total_amount': 16.5
}>

Response Scenario: Australia

{
  "tax": {
    "amount_to_collect": 1.65,
    "breakdown": {
      "combined_tax_rate": 0.1,
      "country_tax_collectable": 1.65,
      "country_tax_rate": 0.1,
      "country_taxable_amount": 16.5,
      "line_items": [
        {
          "combined_tax_rate": 0.1,
          "country_tax_collectable": 1.5,
          "country_tax_rate": 0.1,
          "country_taxable_amount": 15,
          "id": "1",
          "tax_collectable": 1.5,
          "taxable_amount": 15
        }
      ],
      "shipping": {
        "combined_tax_rate": 0.1,
        "country_tax_collectable": 0.15,
        "country_tax_rate": 0.1,
        "country_taxable_amount": 1.5,
        "tax_collectable": 0.15,
        "taxable_amount": 1.5
      },
      "tax_collectable": 1.65,
      "taxable_amount": 16.5
    },
    "freight_taxable": true,
    "has_nexus": true,
    "order_total_amount": 16.5,
    "rate": 0.1,
    "shipping": 1.5,
    "tax_source": "destination",
    "taxable_amount": 16.5
  }
}
#<Taxjar::Tax:0x00000a @attrs={
  :order_total_amount => 16.5,
  :shipping => 1.5,
  :taxable_amount => 16.5,
  :amount_to_collect => 1.65,
  :rate => 0.1,
  :has_nexus => true,
  :freight_taxable => true,
  :tax_source => "destination",
  :breakdown => #<Taxjar::Breakdown:0x00000a @attrs={
    :taxable_amount => 16.5,
    :tax_collectable => 1.65,
    :combined_tax_rate => 0.1,
    :country_taxable_amount => 16.5,
    :country_tax_rate => 0.1,
    :country_tax_collectable => 1.65,
    :shipping => {
      :taxable_amount => 1.5,
      :tax_collectable => 0.15,
      :combined_tax_rate => 0.1,
      :country_taxable_amount => 1.5,
      :country_tax_rate => 0.1,
      :country_tax_collectable => 0.15
    },
    :line_items => [
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "1",
        :taxable_amount => 15.0,
        :tax_collectable => 1.5,
        :combined_tax_rate => 0.1,
        :country_taxable_amount => 15.0,
        :country_tax_rate => 0.1,
        :country_tax_collectable => 1.5
      }>
    ]
  }>
}>
<TaxJarTax {
  'breakdown': <TaxJarBreakdown {
    'line_items': [
      <TaxJarBreakdownLineItem {
        'country_tax_collectable': 1.5,
        'country_taxable_amount': 15.0,
        'taxable_amount': 15.0,
        'combined_tax_rate': 0.1,
        'id': '1',
        'country_tax_rate': 0.1,
        'tax_collectable': 1.5
      }>
    ],
    'country_tax_collectable': 1.65,
    'shipping': {
      'country_tax_collectable': 0.15,
      'country_tax_rate': 0.1,
      'taxable_amount': 1.5,
      'combined_tax_rate': 0.1,
      'country_taxable_amount': 1.5,
      'tax_collectable': 0.15
    },
    'country_tax_rate': 0.1,
    'taxable_amount': 16.5,
    'combined_tax_rate': 0.1,
    'country_taxable_amount': 16.5,
    'tax_collectable': 1.65
  >},
  'has_nexus': True,
  'tax_source': 'destination',
  'shipping': 1.5,
  'taxable_amount': 16.5,
  'rate': 0.1,
  'freight_taxable': True,
  'amount_to_collect': 1.65,
  'order_total_amount': 16.5
}>

Response Scenario: European Union

{
  "tax": {
    "amount_to_collect": 3.3,
    "breakdown": {
      "combined_tax_rate": 0.2,
      "country_tax_collectable": 3.3,
      "country_tax_rate": 0.2,
      "country_taxable_amount": 16.5,
      "line_items": [
        {
          "combined_tax_rate": 0.2,
          "country_tax_collectable": 3,
          "country_tax_rate": 0.2,
          "country_taxable_amount": 15,
          "id": "1",
          "tax_collectable": 3,
          "taxable_amount": 15
        }
      ],
      "shipping": {
        "combined_tax_rate": 0.2,
        "country_tax_collectable": 0.3,
        "country_tax_rate": 0.2,
        "country_taxable_amount": 1.5,
        "tax_collectable": 0.3,
        "taxable_amount": 1.5
      },
      "tax_collectable": 3.3,
      "taxable_amount": 16.5
    },
    "freight_taxable": true,
    "has_nexus": true,
    "order_total_amount": 16.5,
    "rate": 0.2,
    "shipping": 1.5,
    "tax_source": "destination",
    "taxable_amount": 16.5
  }
}
#<Taxjar::Tax:0x00000a @attrs={
  :order_total_amount => 16.5,
  :shipping => 1.5,
  :taxable_amount => 16.5,
  :amount_to_collect => 3.3,
  :rate => 0.2,
  :has_nexus => true,
  :freight_taxable => true,
  :tax_source => "destination",
  :breakdown => #<Taxjar::Breakdown:0x00000a @attrs={
    :taxable_amount => 16.5,
    :tax_collectable => 3.3,
    :combined_tax_rate => 0.2,
    :country_taxable_amount => 16.5,
    :country_tax_rate => 0.2,
    :country_tax_collectable => 3.3,
    :shipping => {
      :taxable_amount => 1.5,
      :tax_collectable => 0.3,
      :combined_tax_rate => 0.2,
      :country_taxable_amount => 1.5,
      :country_tax_rate => 0.2,
      :country_tax_collectable => 0.3
    },
    :line_items => [
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "1",
        :taxable_amount => 15.0,
        :tax_collectable => 3.0,
        :combined_tax_rate => 0.2,
        :country_taxable_amount => 15.0,
        :country_tax_rate => 0.2,
        :country_tax_collectable => 3.0
      }>
    ]
  }>
}>
<TaxJarTax {
  'breakdown': <TaxJarBreakdown {
    'line_items': [
      <TaxJarBreakdownLineItem {
        'country_tax_collectable': 3.0,
        'country_taxable_amount': 15.0,
        'taxable_amount': 15.0,
        'combined_tax_rate': 0.2,
        'id': '1',
        'country_tax_rate': 0.2,
        'tax_collectable': 3.0
      }>
    ],
    'country_tax_collectable': 3.3,
    'shipping': {
      'country_tax_collectable': 0.3,
      'country_tax_rate': 0.2,
      'taxable_amount': 1.5,
      'combined_tax_rate': 0.2,
      'country_taxable_amount': 1.5,
      'tax_collectable': 0.3
    },
    'country_tax_rate': 0.2,
    'taxable_amount': 16.5,
    'combined_tax_rate': 0.2,
    'country_taxable_amount': 16.5,
    'tax_collectable': 3.3
  }>,
  'has_nexus': True,
  'tax_source': 'destination',
  'shipping': 1.5,
  'taxable_amount': 16.5,
  'rate': 0.2,
  'freight_taxable': True,
  'amount_to_collect': 3.3,
  'order_total_amount': 16.5
}>

Response Scenario: Origin-Based Sourcing

{
  "tax": {
    "amount_to_collect": 1.36,
    "breakdown": {
      "city_tax_collectable": 0.17,
      "city_tax_rate": 0.01,
      "city_taxable_amount": 16.5,
      "combined_tax_rate": 0.0825,
      "county_tax_collectable": 0,
      "county_tax_rate": 0,
      "county_taxable_amount": 0,
      "line_items": [
        {
          "city_amount": 0.15,
          "city_tax_rate": 0.01,
          "city_taxable_amount": 15,
          "combined_tax_rate": 0.0825,
          "county_amount": 0,
          "county_tax_rate": 0,
          "county_taxable_amount": 0,
          "id": "1",
          "special_district_amount": 0.15,
          "special_district_taxable_amount": 15,
          "special_tax_rate": 0.01,
          "state_amount": 0.94,
          "state_sales_tax_rate": 0.0625,
          "state_taxable_amount": 15,
          "tax_collectable": 1.24,
          "taxable_amount": 15
        }
      ],
      "shipping": {
        "city_amount": 0.02,
        "city_tax_rate": 0.01,
        "city_taxable_amount": 1.5,
        "combined_tax_rate": 0.0825,
        "county_amount": 0,
        "county_tax_rate": 0,
        "county_taxable_amount": 0,
        "special_district_amount": 0.02,
        "special_tax_rate": 0.01,
        "special_taxable_amount": 1.5,
        "state_amount": 0.09,
        "state_sales_tax_rate": 0.0625,
        "state_taxable_amount": 1.5,
        "tax_collectable": 0.12,
        "taxable_amount": 1.5
      },
      "special_district_tax_collectable": 0.17,
      "special_district_taxable_amount": 16.5,
      "special_tax_rate": 0.01,
      "state_tax_collectable": 1.03,
      "state_tax_rate": 0.0625,
      "state_taxable_amount": 16.5,
      "tax_collectable": 1.36,
      "taxable_amount": 16.5
    },
    "freight_taxable": true,
    "has_nexus": true,
    "order_total_amount": 16.5,
    "rate": 0.0825,
    "shipping": 1.5,
    "tax_source": "origin",
    "taxable_amount": 16.5
  }
}
#<Taxjar::Tax:0x00000a @attrs={
  :order_total_amount => 16.5,
  :shipping => 1.5,
  :taxable_amount => 16.5,
  :amount_to_collect => 1.36,
  :rate => 0.0825,
  :has_nexus => true,
  :freight_taxable => true,
  :tax_source => "origin",
  :breakdown => #<Taxjar::Breakdown:0x00000a @attrs={
    :taxable_amount => 16.5,
    :tax_collectable => 1.36,
    :combined_tax_rate => 0.0825,
    :state_taxable_amount => 16.5,
    :state_tax_rate => 0.0625,
    :state_tax_collectable => 1.03,
    :county_taxable_amount => 0.0,
    :county_tax_rate => 0.0,
    :county_tax_collectable => 0.0,
    :city_taxable_amount => 16.5,
    :city_tax_rate => 0.01,
    :city_tax_collectable => 0.17,
    :special_district_taxable_amount => 16.5,
    :special_tax_rate => 0.01,
    :special_district_tax_collectable => 0.17,
    :shipping => {
      :taxable_amount => 1.5,
      :tax_collectable => 0.12,
      :combined_tax_rate => 0.0825,
      :state_taxable_amount => 1.5,
      :state_sales_tax_rate => 0.0625,
      :state_amount => 0.09,
      :county_taxable_amount => 0.0,
      :county_tax_rate => 0.0,
      :county_amount => 0.0,
      :city_taxable_amount => 1.5,
      :city_tax_rate => 0.01,
      :city_amount => 0.02,
      :special_taxable_amount => 1.5,
      :special_tax_rate => 0.01,
      :special_district_amount => 0.02
    },
    :line_items => [
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "1",
        :taxable_amount => 15.0,
        :tax_collectable => 1.24,
        :combined_tax_rate => 0.0825,
        :state_taxable_amount => 15.0,
        :state_sales_tax_rate => 0.0625,
        :state_amount => 0.94,
        :county_taxable_amount => 0.0,
        :county_tax_rate => 0.0,
        :county_amount => 0.0,
        :city_taxable_amount => 15.0,
        :city_tax_rate => 0.01,
        :city_amount => 0.15,
        :special_district_taxable_amount => 15.0,
        :special_tax_rate => 0.01,
        :special_district_amount => 0.15
      }>
    ]
  }>
}>
<TaxJarTax {
  'breakdown': <TaxJarBreakdown {
    'special_district_taxable_amount': 16.5,
    'city_tax_rate': 0.01,
    'county_tax_collectable': 0.0,
    'county_taxable_amount': 0.0,
    'special_district_tax_collectable': 0.17,
    'line_items': [
      <TaxJarBreakdownLineItem {
        'special_district_taxable_amount': 15.0,
        'city_tax_rate': 0.01,
        'county_taxable_amount': 0.0,
        'special_district_amount': 0.15,
        'state_sales_tax_rate': 0.0625,
        'state_amount': 0.94,
        'city_taxable_amount': 15.0,
        'taxable_amount': 15.0,
        'special_tax_rate': 0.01,
        'state_taxable_amount': 15.0,
        'combined_tax_rate': 0.0825,
        'county_tax_rate': 0.0,
        'city_amount': 0.15,
        'county_amount': 0.0,
        'id': '1',
        'tax_collectable': 1.24
      }>
    ],
    'shipping': {
      'city_tax_rate': 0.01,
      'county_taxable_amount': 0.0,
      'special_district_amount': 0.02,
      'state_sales_tax_rate': 0.0625,
      'state_amount': 0.09,
      'special_taxable_amount': 1.5,
      'city_amount': 0.02,
      'taxable_amount': 1.5,
      'state_taxable_amount': 1.5,
      'combined_tax_rate': 0.0825,
      'county_tax_rate': 0.0,
      'special_tax_rate': 0.01,
      'county_amount': 0.0,
      'city_taxable_amount': 1.5,
      'tax_collectable': 0.12
    },
    'taxable_amount': 16.5,
    'state_taxable_amount': 16.5,
    'combined_tax_rate': 0.0825,
    'state_tax_collectable': 1.03,
    'state_tax_rate': 0.0625,
    'city_tax_collectable': 0.17,
    'county_tax_rate': 0.0,
    'special_tax_rate': 0.01,
    'city_taxable_amount': 16.5,
    'tax_collectable': 1.36
  }>,
  'has_nexus': True,
  'tax_source': 'origin',
  'shipping': 1.5,
  'taxable_amount': 16.5,
  'rate': 0.0825,
  'freight_taxable': True,
  'amount_to_collect': 1.36,
  'order_total_amount': 16.5
}>

Response Scenario: Shipping Exemptions

{
  "tax": {
    "amount_to_collect": 0.94,
    "breakdown": {
      "city_tax_collectable": 0,
      "city_tax_rate": 0,
      "city_taxable_amount": 0,
      "combined_tax_rate": 0.0625,
      "county_tax_collectable": 0,
      "county_tax_rate": 0,
      "county_taxable_amount": 0,
      "line_items": [
        {
          "city_amount": 0,
          "city_tax_rate": 0,
          "city_taxable_amount": 0,
          "combined_tax_rate": 0.0625,
          "county_amount": 0,
          "county_tax_rate": 0,
          "county_taxable_amount": 0,
          "id": "1",
          "special_district_amount": 0,
          "special_district_taxable_amount": 0,
          "special_tax_rate": 0,
          "state_amount": 0.94,
          "state_sales_tax_rate": 0.0625,
          "state_taxable_amount": 15,
          "tax_collectable": 0.94,
          "taxable_amount": 15
        }
      ],
      "special_district_tax_collectable": 0,
      "special_district_taxable_amount": 0,
      "special_tax_rate": 0,
      "state_tax_collectable": 0.94,
      "state_tax_rate": 0.0625,
      "state_taxable_amount": 15,
      "tax_collectable": 0.94,
      "taxable_amount": 15
    },
    "freight_taxable": false,
    "has_nexus": true,
    "order_total_amount": 16.5,
    "rate": 0.0625,
    "shipping": 1.5,
    "tax_source": "destination",
    "taxable_amount": 15
  }
}
#<Taxjar::Tax:0x00000a @attrs={
  :order_total_amount => 16.5,
  :shipping => 1.5,
  :taxable_amount => 15.0,
  :amount_to_collect => 0.94,
  :rate => 0.0625,
  :has_nexus => true,
  :freight_taxable => false,
  :tax_source => "destination",
  :breakdown => #<Taxjar::Breakdown:0x00000a @attrs={
    :taxable_amount => 15.0,
    :tax_collectable => 0.94,
    :combined_tax_rate => 0.0625,
    :state_taxable_amount => 15.0,
    :state_tax_rate => 0.0625,
    :state_tax_collectable => 0.94,
    :county_taxable_amount => 0.0,
    :county_tax_rate => 0.0,
    :county_tax_collectable => 0.0,
    :city_taxable_amount => 0.0,
    :city_tax_rate => 0.0,
    :city_tax_collectable => 0.0,
    :special_district_taxable_amount => 0.0,
    :special_tax_rate => 0.0,
    :special_district_tax_collectable => 0.0,
    :line_items => [
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "1",
        :taxable_amount => 15.0,
        :tax_collectable => 0.94,
        :combined_tax_rate => 0.0625,
        :state_taxable_amount => 15.0,
        :state_sales_tax_rate => 0.0625,
        :state_amount => 0.94,
        :county_taxable_amount => 0.0,
        :county_tax_rate => 0.0,
        :county_amount => 0.0,
        :city_taxable_amount => 0.0,
        :city_tax_rate => 0.0,
        :city_amount => 0.0,
        :special_district_taxable_amount => 0.0,
        :special_tax_rate => 0.0,
        :special_district_amount => 0.0
      }>
    ]
  }>
}>
<TaxJarTax {
  'breakdown': <TaxJarBreakdown {
    'special_district_taxable_amount': 0.0,
    'city_tax_rate': 0.0,
    'county_tax_collectable': 0.0,
    'county_taxable_amount': 0.0,
    'special_district_tax_collectable': 0.0,
    'line_items': [
      <TaxJarBreakdownLineItem {
        'special_district_taxable_amount': 0.0,
        'city_tax_rate': 0.0,
        'county_taxable_amount': 0.0,
        'special_district_amount': 0.0,
        'state_sales_tax_rate': 0.0625,
        'state_amount': 0.94,
        'city_taxable_amount': 0.0,
        'taxable_amount': 15.0,
        'special_tax_rate': 0.0,
        'state_taxable_amount': 15.0,
        'combined_tax_rate': 0.0625,
        'county_tax_rate': 0.0,
        'city_amount': 0.0,
        'county_amount': 0.0,
        'id': '1',
        'tax_collectable': 0.94
      }>
    ],
    'taxable_amount': 15.0,
    'state_taxable_amount': 15.0,
    'combined_tax_rate': 0.0625,
    'state_tax_collectable': 0.94,
    'state_tax_rate': 0.0625,
    'city_tax_collectable': 0.0,
    'county_tax_rate': 0.0,
    'special_tax_rate': 0.0,
    'city_taxable_amount': 0.0,
    'tax_collectable': 0.94
  }>,
  'has_nexus': True,
  'tax_source': 'destination',
  'shipping': 1.5,
  'taxable_amount': 15.0,
  'rate': 0.0625,
  'freight_taxable': False,
  'amount_to_collect': 0.94,
  'order_total_amount': 16.5
}>

Response Scenario: Clothing Exemptions

{
  "tax": {
    "amount_to_collect": 1.98,
    "breakdown": {
      "city_tax_collectable": 0,
      "city_tax_rate": 0,
      "city_taxable_amount": 0,
      "combined_tax_rate": 0.05218,
      "county_tax_collectable": 1.52,
      "county_tax_rate": 0.04,
      "county_taxable_amount": 37.93,
      "line_items": [
        {
          "city_amount": 0,
          "city_tax_rate": 0,
          "city_taxable_amount": 0,
          "combined_tax_rate": 0.04375,
          "county_amount": 0.8,
          "county_tax_rate": 0.04,
          "county_taxable_amount": 19.99,
          "id": "1",
          "special_district_amount": 0.07,
          "special_district_taxable_amount": 19.99,
          "special_tax_rate": 0.00375,
          "state_amount": 0,
          "state_sales_tax_rate": 0,
          "state_taxable_amount": 0,
          "tax_collectable": 0.87,
          "taxable_amount": 19.99
        },
        {
          "city_amount": 0,
          "city_tax_rate": 0,
          "city_taxable_amount": 0,
          "combined_tax_rate": 0.04375,
          "county_amount": 0.4,
          "county_tax_rate": 0.04,
          "county_taxable_amount": 9.95,
          "id": "2",
          "special_district_amount": 0.04,
          "special_district_taxable_amount": 9.95,
          "special_tax_rate": 0.00375,
          "state_amount": 0,
          "state_sales_tax_rate": 0,
          "state_taxable_amount": 0,
          "tax_collectable": 0.44,
          "taxable_amount": 9.95
        }
      ],
      "shipping": {
        "city_amount": 0,
        "city_tax_rate": 0,
        "city_taxable_amount": 0,
        "combined_tax_rate": 0.08375,
        "county_amount": 0.32,
        "county_tax_rate": 0.04,
        "county_taxable_amount": 7.99,
        "special_district_amount": 0.03,
        "special_tax_rate": 0.00375,
        "special_taxable_amount": 7.99,
        "state_amount": 0.32,
        "state_sales_tax_rate": 0.04,
        "state_taxable_amount": 7.99,
        "tax_collectable": 0.67,
        "taxable_amount": 7.99
      },
      "special_district_tax_collectable": 0.14,
      "special_district_taxable_amount": 37.93,
      "special_tax_rate": 0.00375,
      "state_tax_collectable": 0.32,
      "state_tax_rate": 0.04,
      "state_taxable_amount": 7.99,
      "tax_collectable": 1.98,
      "taxable_amount": 37.93
    },
    "freight_taxable": true,
    "has_nexus": true,
    "order_total_amount": 37.93,
    "rate": 0.05218,
    "shipping": 7.99,
    "tax_source": "destination",
    "taxable_amount": 37.93
  }
}
#<Taxjar::Tax:0x00000a @attrs={
  :order_total_amount => 37.93,
  :shipping => 7.99,
  :taxable_amount => 37.93,
  :amount_to_collect => 1.98,
  :rate => 0.05218,
  :has_nexus => true,
  :freight_taxable => true,
  :tax_source => "destination",
  :breakdown => #<Taxjar::Breakdown:0x00000a @attrs={
    :taxable_amount => 37.93,
    :tax_collectable => 1.98,
    :combined_tax_rate => 0.05218,
    :state_taxable_amount => 7.99,
    :state_tax_rate => 0.04,
    :state_tax_collectable => 0.32,
    :county_taxable_amount => 37.93,
    :county_tax_rate => 0.04,
    :county_tax_collectable => 1.52,
    :city_taxable_amount => 0.0,
    :city_tax_rate => 0.0,
    :city_tax_collectable => 0.0,
    :special_district_taxable_amount => 37.93,
    :special_tax_rate => 0.00375,
    :special_district_tax_collectable => 0.14,
    :shipping => {
      :taxable_amount => 7.99,
      :tax_collectable => 0.67,
      :combined_tax_rate => 0.08375,
      :state_taxable_amount => 7.99,
      :state_sales_tax_rate => 0.04,
      :state_amount => 0.32,
      :county_taxable_amount => 7.99,
      :county_tax_rate => 0.04,
      :county_amount => 0.32,
      :city_taxable_amount => 0.0,
      :city_tax_rate => 0.0,
      :city_amount => 0.0,
      :special_taxable_amount => 7.99,
      :special_tax_rate => 0.00375,
      :special_district_amount => 0.03
    },
    :line_items => [
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "1",
        :taxable_amount => 19.99,
        :tax_collectable => 0.87,
        :combined_tax_rate => 0.04375,
        :state_taxable_amount => 0.0,
        :state_sales_tax_rate => 0.0,
        :state_amount => 0.0,
        :county_taxable_amount => 19.99,
        :county_tax_rate => 0.04,
        :county_amount => 0.8,
        :city_taxable_amount => 0.0,
        :city_tax_rate => 0.0,
        :city_amount => 0.0,
        :special_district_taxable_amount => 19.99,
        :special_tax_rate => 0.00375,
        :special_district_amount => 0.07
      }>,
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "2",
        :taxable_amount => 9.95,
        :tax_collectable => 0.44,
        :combined_tax_rate => 0.04375,
        :state_taxable_amount => 0.0,
        :state_sales_tax_rate => 0.0,
        :state_amount => 0.0,
        :county_taxable_amount => 9.95,
        :county_tax_rate => 0.04,
        :county_amount => 0.4,
        :city_taxable_amount => 0.0,
        :city_tax_rate => 0.0,
        :city_amount => 0.0,
        :special_district_taxable_amount => 9.95,
        :special_tax_rate => 0.00375,
        :special_district_amount => 0.04
      }>
    ]
  }>
}>
<TaxJarTax {
  'breakdown': <TaxJarBreakdown {
    'special_district_taxable_amount': 37.93,
    'city_tax_rate': 0.0,
    'county_tax_collectable': 1.52,
    'county_taxable_amount': 37.93,
    'special_district_tax_collectable': 0.14,
    'line_items': [
      <TaxJarBreakdownLineItem {
        'special_district_taxable_amount': 19.99,
        'city_tax_rate': 0.0,
        'county_taxable_amount': 19.99,
        'special_district_amount': 0.07,
        'state_sales_tax_rate': 0.0,
        'state_amount': 0.0,
        'city_taxable_amount': 0.0,
        'taxable_amount': 19.99,
        'special_tax_rate': 0.00375,
        'state_taxable_amount': 0.0,
        'combined_tax_rate': 0.04375,
        'county_tax_rate': 0.04,
        'city_amount': 0.0,
        'county_amount': 0.8,
        'id': '1',
        'tax_collectable': 0.87
      }>,
      <TaxJarBreakdownLineItem {
        'special_district_taxable_amount': 9.95,
        'city_tax_rate': 0.0,
        'county_taxable_amount': 9.95,
        'special_district_amount': 0.04,
        'state_sales_tax_rate': 0.0,
        'state_amount': 0.0,
        'city_taxable_amount': 0.0,
        'taxable_amount': 9.95,
        'special_tax_rate': 0.00375,
        'state_taxable_amount': 0.0,
        'combined_tax_rate': 0.04375,
        'county_tax_rate': 0.04,
        'city_amount': 0.0,
        'county_amount': 0.4,
        'id': '2',
        'tax_collectable': 0.44
      }>
    ],
    'shipping': {
      'city_tax_rate': 0.0,
      'county_taxable_amount': 7.99,
      'special_district_amount': 0.03,
      'state_sales_tax_rate': 0.04,
      'state_amount': 0.32,
      'special_taxable_amount': 7.99,
      'city_amount': 0.0,
      'taxable_amount': 7.99,
      'state_taxable_amount': 7.99,
      'combined_tax_rate': 0.08375,
      'county_tax_rate': 0.04,
      'special_tax_rate': 0.00375,
      'county_amount': 0.32,
      'city_taxable_amount': 0.0,
      'tax_collectable': 0.67
    },
    'taxable_amount': 37.93,
    'state_taxable_amount': 7.99,
    'combined_tax_rate': 0.05218,
    'state_tax_collectable': 0.32,
    'state_tax_rate': 0.04,
    'city_tax_collectable': 0.0,
    'county_tax_rate': 0.04,
    'special_tax_rate': 0.00375,
    'city_taxable_amount': 0.0,
    'tax_collectable': 1.98
  }>,
  'has_nexus': True,
  'tax_source': 'destination',
  'shipping': 7.99,
  'taxable_amount': 37.93,
  'rate': 0.05218,
  'freight_taxable': True,
  'amount_to_collect': 1.98,
  'order_total_amount': 37.93
}>

Response Scenario: Food & Grocery Exemptions

{
  "tax": {
    "amount_to_collect": 0,
    "breakdown": {
      "city_tax_collectable": 0,
      "city_tax_rate": 0,
      "city_taxable_amount": 0,
      "combined_tax_rate": 0,
      "county_tax_collectable": 0,
      "county_tax_rate": 0,
      "county_taxable_amount": 0,
      "line_items": [
        {
          "city_amount": 0,
          "city_tax_rate": 0,
          "city_taxable_amount": 0,
          "combined_tax_rate": 0,
          "county_amount": 0,
          "county_tax_rate": 0,
          "county_taxable_amount": 0,
          "id": "1",
          "special_district_amount": 0,
          "special_district_taxable_amount": 0,
          "special_tax_rate": 0,
          "state_amount": 0,
          "state_sales_tax_rate": 0,
          "state_taxable_amount": 0,
          "tax_collectable": 0,
          "taxable_amount": 0
        },
        {
          "city_amount": 0,
          "city_tax_rate": 0,
          "city_taxable_amount": 0,
          "combined_tax_rate": 0,
          "county_amount": 0,
          "county_tax_rate": 0,
          "county_taxable_amount": 0,
          "id": "2",
          "special_district_amount": 0,
          "special_district_taxable_amount": 0,
          "special_tax_rate": 0,
          "state_amount": 0,
          "state_sales_tax_rate": 0,
          "state_taxable_amount": 0,
          "tax_collectable": 0,
          "taxable_amount": 0
        }
      ],
      "special_district_tax_collectable": 0,
      "special_district_taxable_amount": 0,
      "special_tax_rate": 0,
      "state_tax_collectable": 0,
      "state_tax_rate": 0,
      "state_taxable_amount": 0,
      "tax_collectable": 0,
      "taxable_amount": 0
    },
    "freight_taxable": false,
    "has_nexus": true,
    "order_total_amount": 37.93,
    "rate": 0,
    "shipping": 7.99,
    "tax_source": "destination",
    "taxable_amount": 0
  }
}
#<Taxjar::Tax:0x00000a @attrs={
  :order_total_amount => 37.93,
  :shipping => 7.99,
  :taxable_amount => 0.0,
  :amount_to_collect => 0.0,
  :rate => 0.0,
  :has_nexus => true,
  :freight_taxable => false,
  :tax_source => "destination",
  :breakdown => #<Taxjar::Breakdown:0x00000a @attrs={
    :taxable_amount => 0.0,
    :tax_collectable => 0.0,
    :combined_tax_rate => 0.0,
    :state_taxable_amount => 0.0,
    :state_tax_rate => 0.0,
    :state_tax_collectable => 0.0,
    :county_taxable_amount => 0.0,
    :county_tax_rate => 0.0,
    :county_tax_collectable => 0.0,
    :city_taxable_amount => 0.0,
    :city_tax_rate => 0.0,
    :city_tax_collectable => 0.0,
    :special_district_taxable_amount => 0.0,
    :special_tax_rate => 0.0,
    :special_district_tax_collectable => 0.0,
    :line_items => [
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "1",
        :taxable_amount => 0.0,
        :tax_collectable => 0.0,
        :combined_tax_rate => 0.0,
        :state_taxable_amount => 0.0,
        :state_sales_tax_rate => 0.0,
        :state_amount => 0.0,
        :county_taxable_amount => 0.0,
        :county_tax_rate => 0.0,
        :county_amount => 0.0,
        :city_taxable_amount => 0.0,
        :city_tax_rate => 0.0,
        :city_amount => 0.0,
        :special_district_taxable_amount => 0.0,
        :special_tax_rate => 0.0,
        :special_district_amount => 0.0
      }>,
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "2",
        :taxable_amount => 0.0,
        :tax_collectable => 0.0,
        :combined_tax_rate => 0.0,
        :state_taxable_amount => 0.0,
        :state_sales_tax_rate => 0.0,
        :state_amount => 0.0,
        :county_taxable_amount => 0.0,
        :county_tax_rate => 0.0,
        :county_amount => 0.0,
        :city_taxable_amount => 0.0,
        :city_tax_rate => 0.0,
        :city_amount => 0.0,
        :special_district_taxable_amount => 0.0,
        :special_tax_rate => 0.0,
        :special_district_amount => 0.0
      }>
    ]
  }>
}>
<TaxJarTax {
  'breakdown': <TaxJarBreakdown {
    'special_district_taxable_amount': 0.0,
    'city_tax_rate': 0.0,
    'county_tax_collectable': 0.0,
    'county_taxable_amount': 0.0,
    'special_district_tax_collectable': 0.0,
    'line_items': [
      <TaxJarBreakdownLineItem {
        'special_district_taxable_amount': 0.0,
        'city_tax_rate': 0.0,
        'county_taxable_amount': 0.0,
        'special_district_amount': 0.0,
        'state_sales_tax_rate': 0.0,
        'state_amount': 0.0,
        'city_taxable_amount': 0.0,
        'taxable_amount': 0.0,
        'special_tax_rate': 0.0,
        'state_taxable_amount': 0.0,
        'combined_tax_rate': 0.0,
        'county_tax_rate': 0.0,
        'city_amount': 0.0,
        'county_amount': 0.0,
        'id': '1',
        'tax_collectable': 0.0
      }>,
      <TaxJarBreakdownLineItem {
        'special_district_taxable_amount': 0.0,
        'city_tax_rate': 0.0,
        'county_taxable_amount': 0.0,
        'special_district_amount': 0.0,
        'state_sales_tax_rate': 0.0,
        'state_amount': 0.0,
        'city_taxable_amount': 0.0,
        'taxable_amount': 0.0,
        'special_tax_rate': 0.0,
        'state_taxable_amount': 0.0,
        'combined_tax_rate': 0.0,
        'county_tax_rate': 0.0,
        'city_amount': 0.0,
        'county_amount': 0.0,
        'id': '2',
        'tax_collectable': 0.0
      }>
    ],
    'taxable_amount': 0.0,
    'state_taxable_amount': 0.0,
    'combined_tax_rate': 0.0,
    'state_tax_collectable': 0.0,
    'state_tax_rate': 0.0,
    'city_tax_collectable': 0.0,
    'county_tax_rate': 0.0,
    'special_tax_rate': 0.0,
    'city_taxable_amount': 0.0,
    'tax_collectable': 0.0
  }>,
  'has_nexus': True,
  'tax_source': 'destination',
  'shipping': 7.99,
  'taxable_amount': 0.0,
  'rate': 0.0,
  'freight_taxable': False,
  'amount_to_collect': 0.0,
  'order_total_amount': 37.93
}>

Response Scenario: Other Exemptions

{
  "tax": {
    "amount_to_collect": 1.58,
    "breakdown": {
      "city_tax_collectable": 0.41,
      "city_tax_rate": 0.023,
      "city_taxable_amount": 17.94,
      "combined_tax_rate": 0.088,
      "county_tax_collectable": 0,
      "county_tax_rate": 0,
      "county_taxable_amount": 0,
      "line_items": [
        {
          "city_amount": 0,
          "city_tax_rate": 0,
          "city_taxable_amount": 0,
          "combined_tax_rate": 0,
          "county_amount": 0,
          "county_tax_rate": 0,
          "county_taxable_amount": 0,
          "id": "1",
          "special_district_amount": 0,
          "special_district_taxable_amount": 0,
          "special_tax_rate": 0,
          "state_amount": 0,
          "state_sales_tax_rate": 0,
          "state_taxable_amount": 0,
          "tax_collectable": 0,
          "taxable_amount": 0
        },
        {
          "city_amount": 0.23,
          "city_tax_rate": 0.023,
          "city_taxable_amount": 9.95,
          "combined_tax_rate": 0.088,
          "county_amount": 0,
          "county_tax_rate": 0,
          "county_taxable_amount": 0,
          "id": "2",
          "special_district_amount": 0,
          "special_district_taxable_amount": 0,
          "special_tax_rate": 0,
          "state_amount": 0.65,
          "state_sales_tax_rate": 0.065,
          "state_taxable_amount": 9.95,
          "tax_collectable": 0.88,
          "taxable_amount": 9.95
        }
      ],
      "shipping": {
        "city_amount": 0.18,
        "city_tax_rate": 0.023,
        "city_taxable_amount": 7.99,
        "combined_tax_rate": 0.088,
        "county_amount": 0,
        "county_tax_rate": 0,
        "county_taxable_amount": 0,
        "special_district_amount": 0,
        "special_tax_rate": 0,
        "special_taxable_amount": 0,
        "state_amount": 0.52,
        "state_sales_tax_rate": 0.065,
        "state_taxable_amount": 7.99,
        "tax_collectable": 0.7,
        "taxable_amount": 7.99
      },
      "special_district_tax_collectable": 0,
      "special_district_taxable_amount": 0,
      "special_tax_rate": 0,
      "state_tax_collectable": 1.17,
      "state_tax_rate": 0.065,
      "state_taxable_amount": 17.94,
      "tax_collectable": 1.58,
      "taxable_amount": 17.94
    },
    "freight_taxable": true,
    "has_nexus": true,
    "order_total_amount": 37.93,
    "rate": 0.088,
    "shipping": 7.99,
    "tax_source": "destination",
    "taxable_amount": 17.94
  }
}
#<Taxjar::Tax:0x00000a @attrs={
  :order_total_amount => 37.93,
  :shipping => 7.99,
  :taxable_amount => 17.94,
  :amount_to_collect => 1.58,
  :rate => 0.088,
  :has_nexus => true,
  :freight_taxable => true,
  :tax_source => "destination",
  :breakdown => #<Taxjar::Breakdown:0x00000a @attrs={
    :taxable_amount => 17.94,
    :tax_collectable => 1.58,
    :combined_tax_rate => 0.088,
    :state_taxable_amount => 17.94,
    :state_tax_rate => 0.065,
    :state_tax_collectable => 1.17,
    :county_taxable_amount => 0.0,
    :county_tax_rate => 0.0,
    :county_tax_collectable => 0.0,
    :city_taxable_amount => 17.94,
    :city_tax_rate => 0.023,
    :city_tax_collectable => 0.41,
    :special_district_taxable_amount => 0.0,
    :special_tax_rate => 0.0,
    :special_district_tax_collectable => 0.0,
    :shipping => {
      :taxable_amount => 7.99,
      :tax_collectable => 0.7,
      :combined_tax_rate => 0.088,
      :state_taxable_amount => 7.99,
      :state_sales_tax_rate => 0.065,
      :state_amount => 0.52,
      :county_taxable_amount => 0.0,
      :county_tax_rate => 0.0,
      :county_amount => 0.0,
      :city_taxable_amount => 7.99,
      :city_tax_rate => 0.023,
      :city_amount => 0.18,
      :special_taxable_amount => 0.0,
      :special_tax_rate => 0.0,
      :special_district_amount => 0.0
    },
    :line_items => [
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "1",
        :taxable_amount => 0.0,
        :tax_collectable => 0.0,
        :combined_tax_rate => 0.0,
        :state_taxable_amount => 0.0,
        :state_sales_tax_rate => 0.0,
        :state_amount => 0.0,
        :county_taxable_amount => 0.0,
        :county_tax_rate => 0.0,
        :county_amount => 0.0,
        :city_taxable_amount => 0.0,
        :city_tax_rate => 0.0,
        :city_amount => 0.0,
        :special_district_taxable_amount => 0.0,
        :special_tax_rate => 0.0,
        :special_district_amount => 0.0
      }>,
      #<Taxjar::BreakdownLineItem:0x00000a @attrs={
        :id => "2",
        :taxable_amount => 9.95,
        :tax_collectable => 0.88,
        :combined_tax_rate => 0.088,
        :state_taxable_amount => 9.95,
        :state_sales_tax_rate => 0.065,
        :state_amount => 0.65,
        :county_taxable_amount => 0.0,
        :county_tax_rate => 0.0,
        :county_amount => 0.0,
        :city_taxable_amount => 9.95,
        :city_tax_rate => 0.023,
        :city_amount => 0.23,
        :special_district_taxable_amount => 0.0,
        :special_tax_rate => 0.0,
        :special_district_amount => 0.0
      }>
    ]
  }>
}>
<TaxJarTax {
  'breakdown': <TaxJarBreakdown {
    'special_district_taxable_amount': 0.0,
    'city_tax_rate': 0.023,
    'county_tax_collectable': 0.0,
    'county_taxable_amount': 0.0,
    'special_district_tax_collectable': 0.0,
    'line_items': [
      <TaxJarBreakdownLineItem {
        'special_district_taxable_amount': 0.0,
        'city_tax_rate': 0.0,
        'county_taxable_amount': 0.0,
        'special_district_amount': 0.0,
        'state_sales_tax_rate': 0.0,
        'state_amount': 0.0,
        'city_taxable_amount': 0.0,
        'taxable_amount': 0.0,
        'special_tax_rate': 0.0,
        'state_taxable_amount': 0.0,
        'combined_tax_rate': 0.0,
        'county_tax_rate': 0.0,
        'city_amount': 0.0,
        'county_amount': 0.0,
        'id': '1',
        'tax_collectable': 0.0
      }>,
      <TaxJarBreakdownLineItem {
        'special_district_taxable_amount': 0.0,
        'city_tax_rate': 0.023,
        'county_taxable_amount': 0.0,
        'special_district_amount': 0.0,
        'state_sales_tax_rate': 0.065,
        'state_amount': 0.65,
        'city_taxable_amount': 9.95,
        'taxable_amount': 9.95,
        'special_tax_rate': 0.0,
        'state_taxable_amount': 9.95,
        'combined_tax_rate': 0.088,
        'county_tax_rate': 0.0,
        'city_amount': 0.23,
        'county_amount': 0.0,
        'id': '2',
        'tax_collectable': 0.88
      }>
    ],
    'shipping': {
      'city_tax_rate': 0.023,
      'county_taxable_amount': 0.0,
      'special_district_amount': 0.0,
      'state_sales_tax_rate': 0.065,
      'state_amount': 0.52,
      'special_taxable_amount': 0.0,
      'city_amount': 0.18,
      'taxable_amount': 7.99,
      'state_taxable_amount': 7.99,
      'combined_tax_rate': 0.088,
      'county_tax_rate': 0.0,
      'special_tax_rate': 0.0,
      'county_amount': 0.0,
      'city_taxable_amount': 7.99,
      'tax_collectable': 0.7
    },
    'taxable_amount': 17.94,
    'state_taxable_amount': 17.94,
    'combined_tax_rate': 0.088,
    'state_tax_collectable': 1.17,
    'state_tax_rate': 0.065,
    'city_tax_collectable': 0.41,
    'county_tax_rate': 0.0,
    'special_tax_rate': 0.0,
    'city_taxable_amount': 17.94,
    'tax_collectable': 1.58
  }>,
  'has_nexus': True,
  'tax_source': 'destination',
  'shipping': 7.99,
  'taxable_amount': 17.94,
  'rate': 0.088,
  'freight_taxable': True,
  'amount_to_collect': 1.58,
  'order_total_amount': 37.93
}>

Response Scenario: No Nexus

{
  "tax": {
    "amount_to_collect": 0,
    "freight_taxable": false,
    "has_nexus": false,
    "rate": 0,
    "tax_source": null,
    "taxable_amount": 0
  }
}
#<Taxjar::Tax:0x00000a @attrs={
  :taxable_amount => 0.0,
  :amount_to_collect => 0.0,
  :rate => 0.0,
  :has_nexus => false,
  :freight_taxable => false,
  :tax_source => nil
}>
<TaxJarTax {
  'has_nexus': False,
  'taxable_amount': 0.0,
  'rate': 0.0,
  'freight_taxable': False,
  'amount_to_collect': 0.0
}>

Shows the sales tax that should be collected for a given order.

Request

POST https://api.taxjar.com/v2/taxes

Parameters

Parameter Type Required Description
from_country string optional Two-letter ISO country code of the country where the order shipped from. View Note
from_zip string optional Postal code where the order shipped from (5-Digit ZIP or ZIP+4).
from_state string optional Two-letter ISO state code where the order shipped from.
from_city string optional City where the order shipped from.
from_street string optional Street address where the order shipped from.
to_country string required Two-letter ISO country code of the country where the order shipped to.
to_zip string conditional Postal code where the order shipped to (5-Digit ZIP or ZIP+4).
to_state string conditional Two-letter ISO state code where the order shipped to.
to_city string optional City where the order shipped to.
to_street string optional Street address where the order shipped to.
amount long optional Total amount of the order, excluding shipping. View Note
shipping long required Total amount of shipping for the order.
nexus_addresses[][id] string optional Unique identifier of the given nexus address. View Note
nexus_addresses[][country] string conditional Two-letter ISO country code of the country for the nexus address.
nexus_addresses[][zip] string conditional Postal code for the nexus address.
nexus_addresses[][state] string conditional State for the nexus address.
nexus_addresses[][city] string optional City for the nexus address.
nexus_addresses[][street] string optional Street address for the nexus address.
line_items[][id] string optional Unique identifier of the given line item. View Note
line_items[][quantity] integer optional Quantity for the item.
line_items[][product_tax_code] string optional Product tax code for the item. If omitted, the item will remain fully taxable.
line_items[][unit_price] long optional Unit price for the item.
line_items[][discount] long optional Total discount (non-unit) for the item.

Notes

  • Either amount or line_items parameters are required to perform tax calculations.

  • The to_zip parameter is required when to_country is ‘US’.

  • The to_state parameter is required when to_country is 'US’ or 'CA’.

  • Either an address on file, or nexus_addresses parameter, or from_ parameters are required to perform tax calculations.

Response

Returns a JSON object with sales tax for a given order. If available, returns a breakdown of rates by jurisdiction.

Attributes

Parameter Type Description
order_total_amount long Total amount of the order.
shipping long Total amount of shipping for the order.
taxable_amount long Amount of the order to be taxed.
amount_to_collect long Amount of sales tax to collect.
rate long Overall sales tax rate of the order (amount_to_collect ÷ taxable_amount).
has_nexus bool Whether or not you have nexus for the order based on an address on file, nexus_addresses parameter, or from_ parameters.
freight_taxable bool Freight taxability for the order.
tax_source string Origin-based or destination-based sales tax collection.
breakdown object Breakdown of rates by jurisdiction for the order, shipping, and individual line items.

  United States Breakdown Attributes

Parameter Type Description
taxable_amount long Total amount of the order to be taxed.
tax_collectable long Total amount of sales tax to collect.
combined_tax_rate long Overall sales tax rate of the breakdown which includes state, county, city and district tax for the order and shipping if applicable.
state_taxable_amount long Amount of the order to be taxed at the state tax rate.
state_tax_rate long State sales tax rate for given location.
state_tax_collectable long Amount of sales tax to collect for the state.
county_taxable_amount long Amount of the order to be taxed at the county tax rate.
county_tax_rate long County sales tax rate for given location.
county_tax_collectable long Amount of sales tax to collect for the county.
city_taxable_amount long Amount of the order to be taxed at the city tax rate.
city_tax_rate long City sales tax rate for given location.
city_tax_collectable long Amount of sales tax to collect for the city.
special_district_taxable_amount long Amount of the order to be taxed at the special district tax rate.
special_district_tax_rate long Special district sales tax rate for given location.
special_district_tax_collectable long Amount of sales tax to collect for the special district.
shipping object Breakdown of shipping rates if applicable.
line_items object Breakdown of rates by line item if applicable.

  Canada Breakdown Attributes

Parameter Type Description
gst_taxable_amount long Amount of the order to be taxed at the GST rate.
gst_tax_rate long Goods and services tax rate for given location.
gst long Amount of goods and services tax to collect for given location.
pst_taxable_amount long Amount of the order to be taxed at the PST rate.
pst_tax_rate long Provincial sales tax rate for given location.
pst long Amount of provincial sales tax to collect for given location.
qst_taxable_amount long Amount of the order to be taxed at the QST rate.
qst_tax_rate long Quebec sales tax rate for given location.
qst long Amount of Quebec sales tax to collect for given location.
shipping object Breakdown of shipping rates if applicable.
line_items object Breakdown of rates by line item if applicable.

  International Breakdown Attributes

Parameter Type Description
country_taxable_amount long Amount of the order to be taxed at the country tax rate.
country_tax_rate long Country sales tax rate for given location
country_tax_collectable long Amount of sales tax to collect for the country.
shipping object Breakdown of shipping rates if applicable.
line_items object Breakdown of rates by line item if applicable.

Transactions

Manage your transactions for automated sales tax reporting and filing in TaxJar. These endpoints only affect orders and refunds created specifically through the API, not transactions from other channels.

We currently support reporting and filing in the United States.

get List order transactions

Definition

client.list_orders
client.list_orders
client.listOrders();
$client->listOrders();
client.ListOrders();
GET https://api.taxjar.com/v2/transactions/orders

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

orders = client.list_orders({
  :from_transaction_date => '2015/05/01',
  :to_transaction_date => '2015/05/31'
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

orders = client.list_orders({
  'from_transaction_date': '2015/05/01',
  'to_transaction_date': '2015/05/31'
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.listOrders({
  from_transaction_date: '2015/05/01',
  to_transaction_date: '2015/05/31'
}).then(function(res) {
  res.orders; // Array of orders
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$orders = $client->listOrders([
  'from_transaction_date' => '2015/05/01',
  'to_transaction_date' => '2015/05/31'
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var orders = client.ListOrders(new {
    from_transaction_date = "2015/05/01",
    to_transaction_date = "2015/05/31"
});
$ curl -G https://api.taxjar.com/v2/transactions/orders \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -d from_transaction_date="2015/05/01" \
  -d to_transaction_date="2015/05/31"

Response Example

{
  "orders": [
    "123",
    "456"
  ]
}
["20", "21", "22"]
['20', '21', '22']

Lists existing order transactions created through the API.

Request

GET https://api.taxjar.com/v2/transactions/orders

Parameters

Parameter Type Required Description
transaction_date date optional The date the transactions were originally recorded. View Note
from_transaction_date date optional Start date of a range for which the transactions were originally recorded.
to_transaction_date date optional End date of a range for which the transactions were originally recorded.

Notes

Use transaction_date to list transactions for a specific date. Otherwise, use from_transaction_date and to_transaction_date for a range of dates.

get Show an order transaction

Definition

client.show_order
client.show_order
client.showOrder();
$client->showOrder();
client.ShowOrder();
GET https://api.taxjar.com/v2/transactions/orders/:transaction_id

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.show_order('123')
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.show_order('123')
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.showOrder('123').then(function(res) {
  res.order;
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order = $client->showOrder('123');
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var order = client.ShowOrder("123");
$ curl https://api.taxjar.com/v2/transactions/orders/123 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214"

Response Example

{
  "order": {
    "transaction_id": "123",
    "user_id": 10649,
    "transaction_date": "2015-05-14T00:00:00Z",
    "to_country": "US",
    "to_zip": "90002",
    "to_state": "CA",
    "to_city": "LOS ANGELES",
    "to_street": "123 Palm Grove Ln",
    "amount": "17.0",
    "shipping": "2.0",
    "sales_tax": "0.95",
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "product_identifier": "12-34243-0",
        "description": "Heavy Widget",
        "unit_price": "15.0",
        "discount": "0.0",
        "sales_tax": "0.95"
      }
    ]
  }
}
#<Taxjar::Order:0x00000a @attrs={
  :transaction_id => "123",
  :user_id => 11836,
  :transaction_date => "2015-05-14T00:00:00Z",
  :transaction_reference_id => nil,
  :from_country => "US",
  :from_zip => 93107,
  :from_state => "CA",
  :from_city => "SANTA BARBARA",
  :from_street => "1281 State St",
  :to_country => "US",
  :to_zip => 90002,
  :to_state => "CA",
  :to_city => "LOS ANGELES",
  :to_street => "123 Palm Grove Ln",
  :amount => 17,
  :shipping => 2,
  :sales_tax => 0.95,
  :line_items => [
    {
      :id => "1",
      :quantity => 1,
      :product_identifier => "12-34243-0",
      :product_tax_code => nil,
      :description => "Heavy Widget",
      :unit_price => 15,
      :discount => 0,
      :sales_tax => 0.95
    }
  ]
}>
<TaxJarOrder {
  'from_state': 'CA',
  'line_items': [<TaxJarLineItem {
    'description': 'Heavy Widget',
    'unit_price': 15,
    'discount': 0,
    'product_identifier': '12-34243-0',
    'sales_tax': 0.95,
    'product_tax_code': None,
    'id': 1,
    'quantity': 1
  }>],
  'user_id': 1,
  'to_zip': '90002',
  'from_street': '1218 State St',
  'from_city': 'SANTA BARBARA',
  'from_zip': '93107',
  'to_country': 'US',
  'shipping': 2,
  'from_country': 'US',
  'to_city': 'LOS ANGELES',
  'to_street': '123 Palm Grove Ln',
  'transaction_date': '2016-03-10T00:00:00.000Z',
  'transaction_reference_id': None,
  'sales_tax': 0.95,
  'amount': 17,
  'transaction_id': '123',
  'to_state': 'CA'
}>

Shows an existing order transaction created through the API.

Request

GET https://api.taxjar.com/v2/transactions/orders/:transaction_id

Parameters

Parameter Type Required Description
transaction_id string required Unique identifier of the given order transaction.

post Create an order transaction

Definition

client.create_order
client.create_order
client.createOrder();
$client->createOrder();
client.CreateOrder();
POST https://api.taxjar.com/v2/transactions/orders

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.create_order({
  :transaction_id => '123',
  :transaction_date => '2015/05/14',
  :to_country => 'US',
  :to_zip => '90002',
  :to_state => 'CA',
  :to_city => 'Los Angeles',
  :to_street => '123 Palm Grove Ln',
  :amount => 16.5,
  :shipping => 1.5,
  :sales_tax => 0.95,
  :line_items => [
    {
      :quantity => 1,
      :product_identifier => '12-34243-9',
      :description => 'Fuzzy Widget',
      :unit_price => 15,
      :sales_tax => 0.95
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.create_order({
  'transaction_id': '123',
  'transaction_date': '2015/05/14',
  'to_country': 'US',
  'to_zip': '90002',
  'to_state': 'CA',
  'to_city': 'Los Angeles',
  'to_street': '123 Palm Grove Ln',
  'amount': 16.5,
  'shipping': 1.5,
  'sales_tax': 0.95,
  'line_items': [
    {
      'quantity': 1,
      'product_identifier': '12-34243-9',
      'description': 'Fuzzy Widget',
      'unit_price': 15,
      'sales_tax': 0.95
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.createOrder({
  transaction_id: '123',
  transaction_date: '2015/05/14',
  to_country: 'US',
  to_zip: '90002',
  to_state: 'CA',
  to_city: 'Los Angeles',
  to_street: '123 Palm Grove Ln',
  amount: 16.5,
  shipping: 1.5,
  sales_tax: 0.95,
  line_items: [
    {
      quantity: 1,
      product_identifier: '12-34243-9',
      description: 'Fuzzy Widget',
      unit_price: 15,
      sales_tax: 0.95
    }
  ]
}).then(function(res) {
  res.order; // Order object
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order = $client->createOrder([
  'transaction_id' => '123',
  'transaction_date' => '2015/05/14',
  'to_country' => 'US',
  'to_zip' => '90002',
  'to_state' => 'CA',
  'to_city' => 'Los Angeles',
  'to_street' => '123 Palm Grove Ln',
  'amount' => 16.5,
  'shipping' => 1.5,
  'sales_tax' => 0.95,
  'line_items' => [
    [
      'quantity' => 1,
      'product_identifier' => '12-34243-9',
      'description' => 'Fuzzy Widget',
      'unit_price' => 15,
      'sales_tax' => 0.95
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var order = client.CreateOrder(new {
  transaction_id = "123",
  transaction_date = "2015/05/04",
  to_country = "US",
  to_zip = "90002",
  to_city = "Los Angeles",
  to_street = "123 Palm Grove Ln",
  amount = 16.5,
  shipping = 1.5,
  sales_tax = 0.95,
  line_items = new[] {
    new {
      quantity = 1,
      product_identifier = "12-34243-0",
      description = "Heavy Widget",
      unit_price = 15,
      sales_tax = 0.95
    }
  }
});
$ curl https://api.taxjar.com/v2/transactions/orders \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_id": "123",
    "transaction_date": "2015/05/14",
    "to_street": "123 Palm Grove Ln",
    "to_city": "Los Angeles",
    "to_state": "CA",
    "to_zip": "90002",
    "to_country": "US",
    "amount": 16.5,
    "shipping": 1.5,
    "sales_tax": 0.95,
    "line_items": [
      {
        "quantity": 1,
        "product_identifier": "12-34234-9",
        "description": "Fuzzy Widget",
        "unit_price": 15,
        "sales_tax": 0.95
      }
    ]
  }'

Response Example

{
  "order": {
    "transaction_id": "123",
    "user_id": 10649,
    "transaction_date": "2015-05-14T00:00:00Z",
    "to_country": "US",
    "to_zip": "90002",
    "to_state": "CA",
    "to_city": "LOS ANGELES",
    "to_street": "123 Palm Grove Ln",
    "amount": "16.5",
    "shipping": "1.5",
    "sales_tax": "0.95",
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "product_identifier": "12-34243-9",
        "description": "Fuzzy Widget",
        "unit_price": "15.0",
        "discount": "0.0",
        "sales_tax": "0.95"
      }
    ]
  }
}
#<Taxjar::Order:0x00000a @attrs={
  :transaction_id => 20,
  :user_id => 11836,
  :transaction_date => "2015-05-14T00:00:00Z",
  :transaction_reference_id => nil,
  :from_country => "US",
  :from_zip => 93101,
  :from_state => "CA",
  :from_city => "SANTA BARBARA",
  :from_street => "1218 State St",
  :to_country => "US",
  :to_zip => 90002,
  :to_state => "CA",
  :to_city => "LOS ANGELES",
  :to_street => "123 Palm Grove Ln",
  :amount => 16.5,
  :shipping => 1.5,
  :sales_tax => 0.95,
  :line_items => [
    {
      :id => "1",
      :quantity => 1,
      :product_identifier => "12-34243-9",
      :product_tax_code => nil,
      :description => "Fuzzy Widget",
      :unit_price => 15,
      :discount => 0,
      :sales_tax => 0.95
    }
  ]
}>
<TaxJarOrder {
  'from_state': 'CA',
  'line_items': [<TaxJarLineItem {
    'description': 'Fuzzy Widget',
    'unit_price': 15,
    'discount': 0,
    'product_identifier': '12-34243-9',
    'sales_tax': 0.95,
    'product_tax_code': None,
    'id': 1,
    'quantity': 1
  }>],
  'user_id': 11836,
  'to_zip': '90002',
  'from_street': '1218 State St',
  'from_city': 'SANTA BARBARA',
  'from_zip': '93101',
  'to_country': 'US',
  'shipping': 1.5,
  'from_country': 'US',
  'to_city': 'LOS ANGELES',
  'to_street': '123 Palm Grove Ln',
  'transaction_date': '2015-05-14T00:00:00Z',
  'transaction_reference_id': None,
  'sales_tax': 0.95,
  'amount': 16.5,
  'transaction_id': '20',
  'to_state': 'CA'
}>

Creates a new order transaction.

Request

POST https://api.taxjar.com/v2/transactions/orders

Parameters

Parameter Type Required Description
transaction_id string required Unique identifier of the given order transaction.
transaction_date datetime required The date/time the transaction was originally recorded. View Note
from_country string optional Two-letter ISO country code of the country where the order shipped from. View Note
from_zip string optional Postal code where the order shipped from (5-Digit ZIP or ZIP+4).
from_state string optional Two-letter ISO state code where the order shipped from.
from_city string optional City where the order shipped from.
from_street string optional Street address where the order shipped from.
to_country string required Two-letter ISO country code of the country where the order shipped to.
to_zip string required Postal code where the order shipped to (5-Digit ZIP or ZIP+4).
to_state string required Two-letter ISO state code where the order shipped to.
to_city string optional City where the order shipped to.
to_street string optional Street address where the order shipped to.
amount long required Total amount of the order with shipping, excluding sales tax in dollars.
shipping long required Total amount of shipping for the order in dollars.
sales_tax long required Total amount of sales tax collected for the order in dollars.
line_items[][id] string optional Unique identifier of the given line item.
line_items[][quantity] integer optional Quantity for the item.
line_items[][product_identifier] string optional Product identifier for the item.
line_items[][description] string optional Description of the line item (up to 255 characters).
line_items[][product_tax_code] string optional Product tax code for the item. If omitted, the item will remain fully taxable.
line_items[][unit_price] long optional Unit price for the item in dollars.
line_items[][discount] long optional Total discount (non-unit) for the item in dollars.
line_items[][sales_tax] long optional Total sales tax collected (non-unit) for the item in dollars.

Notes

  • Either an address on file or from_ parameters are required to perform tax calculations.

  • The transaction_date may be a date '2015-05-25’, an ISO UTC date/time '2015-05-25T13:05:45’, or an ISO date/time with zone offset '2015-05-25T13:05:45-05:00’.

put Update an order transaction

Definition

client.update_order
client.update_order
client.updateOrder();
$client->updateOrder();
client.UpdateOrder();
PUT https://api.taxjar.com/v2/transactions/orders/:transaction_id

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.update_order({
  :transaction_id => '123',
  :amount => 17,
  :shipping => 2,
  :line_items => [
    {
      :quantity => 1,
      :product_identifier => '12-34243-0',
      :description => 'Heavy Widget',
      :unit_price => 15,
      :discount => 0,
      :sales_tax => 0.95
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

order = client.update_order('123', {
  'transaction_id': '123',
  'amount': 17,
  'shipping': 2,
  'line_items': [
    {
      'quantity': 1,
      'product_identifier': '12-34243-0',
      'description': 'Heavy Widget',
      'unit_price': 15,
      'discount': 0,
      'sales_tax': 0.95
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.updateOrder({
  transaction_id: '123',
  amount: 17,
  shipping: 2,
  line_items: [
    {
      quantity: 1,
      product_identifier: '12-34243-0',
      description: 'Heavy Widget',
      unit_price: 15,
      discount: 0,
      sales_tax: 0.95
    }
  ]
}).then(function(res) {
  res.order; // Order object
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$order = $client->updateOrder([
  'transaction_id' => '123',
  'amount' => 17,
  'shipping' => 2,
  'line_items' => [
    [
      'quantity' => 1,
      'product_identifier' => '12-34243-0',
      'description' => 'Heavy Widget',
      'unit_price' => 15,
      'discount' => 0,
      'sales_tax' => 0.95
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var order = client.UpdateOrder(new
{
  transaction_id = "123",
  amount = 17,
  shipping = 2,
  line_items = new[] {
    new {
      quantity = 1,
      product_identifier = "12-34243-0",
      description = "Heavy Widget",
      unit_price = 15,
      discount = 0,
      sales_tax = 0.95
    }
  }
});
$ curl https://api.taxjar.com/v2/transactions/orders/123 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_id": "123",
    "amount": 17,
    "shipping": 2,
    "line_items": [
      {
        "quantity": 1,
        "product_identifier": "12-34234-0",
        "unit_price": 15,
        "discount": 0,
        "sales_tax": 0.95
      }
    ]
  }' \
  -X PUT

Response Example

{
  "order": {
    "transaction_id": "123",
    "user_id": 10649,
    "transaction_date": "2015-05-14T00:00:00Z",
    "to_country": "US",
    "to_zip": "90002",
    "to_state": "CA",
    "to_city": "LOS ANGELES",
    "to_street": "123 Palm Grove Ln",
    "amount": "17.0",
    "shipping": "2.0",
    "sales_tax": "0.95",
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "product_identifier": "12-34243-0",
        "description": "Heavy Widget",
        "unit_price": "15.0",
        "discount": "0.0",
        "sales_tax": "0.95"
      }
    ]
  }
}
#<Taxjar::Order:0x00000a @attrs={
  :transaction_id => "123",
  :user_id => 11836,
  :transaction_date => "2015-05-14T00:00:00Z",
  :transaction_reference_id => nil,
  :from_country => "US",
  :from_zip => 93101,
  :from_state => "CA",
  :from_city => "SANTA BARBARA",
  :from_street => "1218 State St",
  :to_country => "US",
  :to_zip => 90002,
  :to_state => "CA",
  :to_city => "LOS ANGELES",
  :to_street => "123 Palm Grove Ln",
  :amount => 17.0,
  :shipping => 2.0,
  :sales_tax => 0.95,
  :line_items => [
    {
      :id => "1",
      :quantity => 1,
      :product_identifier => "12-34243-0",
      :product_tax_code => nil,
      :description => "Heavy Widget",
      :unit_price => 15,
      :discount => 0,
      :sales_tax => 0.95
    }
  ]
}>
<TaxJarOrder {
  'from_state': 'CA',
  'line_items': [<TaxJarLineItem {
    'description': 'Heavy Widget',
    'unit_price': 15,
    'discount': 0,
    'product_identifier': '12-34243-0',
    'sales_tax': 0.95,
    'product_tax_code': None,
    'id': 0,
    'quantity': 1
  }>,
  'user_id': 11836,
  'to_zip': '90002',
  'from_street': '1218 State St',
  'from_city': 'SANTA BARBARA',
  'from_zip': '93101',
  'to_country': 'US',
  'shipping': 2,
  'from_country': 'US',
  'to_city': 'LOS ANGELES',
  'to_street': '123 Palm Grove Ln',
  'transaction_date': '2015-05-14T00:00:00Z',
  'transaction_reference_id': None,
  'sales_tax': 0.95,
  'amount': 17,
  'transaction_id': '123',
  'to_state': 'CA'
}>

Updates an existing order transaction created through the API.

Request

PUT https://api.taxjar.com/v2/transactions/orders/:transaction_id

Parameters

Parameter Type Required Description
transaction_id string required Unique identifier of the given order transaction.
transaction_date datetime optional The date/time the transaction was originally recorded. View Note
from_country string optional Two-letter ISO country code of the country where the order shipped from. View Note
from_zip string optional Postal code where the order shipped from (5-Digit ZIP or ZIP+4).
from_state string optional Two-letter ISO state code where the order shipped from.
from_city string optional City where the order shipped from.
from_street string optional Street address where the order shipped from.
to_country string optional Two-letter ISO country code of the country where the order shipped to.
to_zip string optional Postal code where the order shipped to (5-Digit ZIP or ZIP+4).
to_state string optional Two-letter ISO state code where the order shipped to.
to_city string optional City where the order shipped to.
to_street string optional Street address where the order shipped to.
amount long optional Total amount of the order with shipping, excluding sales tax in dollars.
shipping long optional Total amount of shipping for the order in dollars.
sales_tax long optional Total amount of sales tax collected for the order in dollars.
line_items[][id] string optional Unique identifier of the given line item.
line_items[][quantity] integer optional Quantity for the item.
line_items[][product_identifier] string optional Product identifier for the item.
line_items[][description] string optional Description of the line item (up to 255 characters).
line_items[][product_tax_code] string optional Product tax code for the item. If omitted, the item will remain fully taxable.
line_items[][unit_price] long optional Unit price for the item in dollars.
line_items[][discount] long optional Total discount (non-unit) for the item in dollars.
line_items[][sales_tax] long optional Total sales tax collected (non-unit) for the item in dollars.

Notes

  • Either an address on file or from_ parameters are required to perform tax calculations.

  • The transaction_date may be a date '2015-05-25’, an ISO UTC date/time '2015-05-25T13:05:45’, or an ISO date/time with zone offset '2015-05-25T13:05:45-05:00’.

delete Delete an order transaction

Definition

client.delete_order
client.delete_order
client.deleteOrder();
$client->deleteOrder();
client.DeleteOrder();
DELETE https://api.taxjar.com/v2/transactions/orders/:transaction_id

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

client.delete_order('123')
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

client.delete_order('123')
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.deleteOrder('123').then(function(res) {

});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$client->deleteOrder('123');
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var order = client.DeleteOrder("123");
$ curl https://api.taxjar.com/v2/transactions/orders/123 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -X DELETE

Response Example

{
  "order": {
    "transaction_id": "123",
    "user_id": 10649,
    "transaction_date": null,
    "transaction_reference_id": null,
    "from_country": null,
    "from_zip": null,
    "from_state": null,
    "from_city": null,
    "from_street": null,
    "to_country": null,
    "to_zip": null,
    "to_state": null,
    "to_city": null,
    "to_street": null,
    "amount": null,
    "shipping": null,
    "sales_tax": null,
    "line_items": []
  }
}
#<Taxjar::Order:0x00000a @attrs={
  :transaction_id => "123",
  :user_id => 10649,
  :transaction_date => nil,
  :transaction_reference_id => nil,
  :from_country => nil,
  :from_zip => nil,
  :from_state => nil,
  :from_city => nil,
  :from_street => nil,
  :to_country => nil,
  :to_zip => nil,
  :to_state => nil,
  :to_city => nil,
  :to_street => nil,
  :amount => nil,
  :shipping => nil,
  :sales_tax => nil,
  :line_items => []
}>
<TaxJarOrder {
  'from_state': None,
  'line_items': [],
  'user_id': 10649,
  'to_zip': None,
  'from_street': None,
  'from_city': None,
  'from_zip': None,
  'to_country': None,
  'shipping': None,
  'from_country': None,
  'to_city': None,
  'to_street': None,
  'transaction_date': None,
  'transaction_reference_id': None,
  'sales_tax': None,
  'amount': None,
  'transaction_id': '123',
  'to_state': None
}>

Deletes an existing order transaction created through the API.

Request

DELETE https://api.taxjar.com/v2/transactions/orders/:transaction_id

Parameters

Parameter Type Required Description
transaction_id string required Unique identifier of the given order transaction.

get List refund transactions

Definition

client.list_refunds
client.list_refunds
client.listRefunds();
$client->listRefunds();
client.ListRefunds();
GET https://api.taxjar.com/v2/transactions/refunds

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

refunds = client.list_refunds({
  :from_transaction_date => '2015/05/01',
  :to_transaction_date => '2015/05/31'
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

refunds = client.list_refunds({
  'from_transaction_date': '2015/05/01',
  'to_transaction_date': '2015/05/31'
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.listRefunds({
  from_transaction_date: '2015/05/01',
  to_transaction_date: '2015/05/31'
}).then(function(res) {
  res.refunds; // Array of refunds
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$refunds = $client->listRefunds([
  'from_transaction_date' => '2015/05/01',
  'to_transaction_date' => '2015/05/31'
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var refunds = client.ListRefunds(new
{
  from_transaction_date = "2015/05/01",
  to_transaction_date = "2015/05/31"
});
$ curl -G https://api.taxjar.com/v2/transactions/refunds \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -d from_transaction_date="2015/05/01" \
  -d to_transaction_date="2015/05/31"

Response Example

{
  "refunds": [
    "321",
    "654"
  ]
}
["203", "204", "205"]
['203', '204', '205']

Lists existing refund transactions created through the API.

Request

GET https://api.taxjar.com/v2/transactions/refunds

Parameters

Parameter Type Required Description
transaction_date date optional The date the transactions were originally recorded. View Note
from_transaction_date date optional The start date of a range for which the transactions were originally recorded.
to_transaction_date date optional The end date of a range for which the transactions were originally recorded.

Notes

Use transaction_date to list transactions for a specific date. Otherwise, use from_transaction_date and to_transaction_date for a range of dates.

get Show a refund transaction

Definition

client.show_refund
client.show_refund
client.showRefund();
$client->showRefund();
client.ShowRefund();
GET https://api.taxjar.com/v2/transactions/refunds/:transaction_id

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

refund = client.show_refund('321')
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

refund = client.show_refund('321')
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.showRefund('321').then(function(res) {
  res.refund;
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$refund = $client->showRefund('321');
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var refund = client.ShowRefund("321");
$ curl https://api.taxjar.com/v2/transactions/refunds/321 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214"

Response Example

{
  "refund": {
    "transaction_id": "321",
    "user_id": 10649,
    "transaction_date": "2015-05-14T00:00:00Z",
    "transaction_reference_id": "123",
    "to_country": "US",
    "to_zip": "90002",
    "to_state": "CA",
    "to_city": "LOS ANGELES",
    "to_street": "123 Palm Grove Ln",
    "amount": "17.0",
    "shipping": "2.0",
    "sales_tax": "0.95",
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "product_identifier": "12-34243-0",
        "description": "Heavy Widget",
        "unit_price": "15.0",
        "discount": "0.0",
        "sales_tax": "0.95"
      }
    ]
  }
}
#<Taxjar::Refund:0x00000a @attrs={
  :transaction_id => "321",
  :user_id => 11836,
  :transaction_date => "2015-06-14T00:00:00Z",
  :transaction_reference_id => "123",
  :from_country => "US",
  :from_zip => 93107,
  :from_state => "CA",
  :from_city => "SANTA BARBARA",
  :from_street => "1218 State St",
  :to_country => "US",
  :to_zip => 90002,
  :to_state => "CA",
  :to_city => "LOS ANGELES",
  :to_street => "123 Palm Grove Ln",
  :amount => 17.0,
  :shipping => 2.0,
  :sales_tax => 0.95,
  :line_items => [
    {
      :id => "1",
      :quantity => 1,
      :product_identifier => "12-34243-0",
      :product_tax_code => nil,
      :description => "Heavy Widget",
      :unit_price => 15,
      :discount => 0,
      :sales_tax => 0.95
    }
  ]
}>
<TaxJarRefund {
  'from_state': 'CA',
  'line_items': [<TaxJarLineItem {
    'description': 'Heavy Widget',
    'unit_price': 15,
    'discount': 0,
    'product_identifier': '12-34243-0',
    'sales_tax': 0.95,
    'product_tax_code': None,
    'id': 0,
    'quantity': 1
  }>],
  'user_id': 11836,
  'to_zip': '90002',
  'from_street': '1218 State St',
  'from_city': 'SANTA BARBARA',
  'from_zip': 93107,
  'to_country': 'US',
  'shipping': 2,
  'from_country': 'US',
  'to_city': 'LOS ANGELES',
  'to_street': '123 Palm Grove Ln',
  'transaction_date': '2015-06-14T00:00:00Z',
  'transaction_reference_id': '123',
  'sales_tax': 0.95,
  'amount': 17,
  'transaction_id': '321',
  'to_state': 'CA'
}>

Shows an existing refund transaction created through the API.

Request

GET https://api.taxjar.com/v2/transactions/refunds/:transaction_id

Parameters

Parameter Type Required Description
transaction_id string required Unique identifier of the given refund transaction.

post Create a refund transaction

Definition

client.create_refund
client.create_refund
client.createRefund();
$client->createRefund();
client.CreateRefund();
POST https://api.taxjar.com/v2/transactions/refunds

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.create_refund({
  :transaction_id => '123',
  :transaction_date => '2015/05/14',
  :transaction_reference_id => '123',
  :to_country => 'US',
  :to_zip => '90002',
  :to_state => 'CA',
  :to_city => 'Los Angeles',
  :to_street => '123 Palm Grove Ln',
  :amount => 16.5,
  :shipping => 1.5,
  :sales_tax => 0.95,
  :line_items => [
    {
      :quantity => 1,
      :product_identifier => '12-34243-9',
      :description => 'Fuzzy Widget',
      :unit_price => 15,
      :sales_tax => 0.95
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

refund = client.create_refund({
  'transaction_id': '321',
  'transaction_date': '2016-05-14',
  'transaction_reference_id': '123',
  'from_state': 'CA',
  'from_city': 'Santa Barbara',
  'from_street': '1218 State St',
  'from_country': 'US',
  'from_zip': '93101',
  'to_country': 'US',
  'to_state': 'CA',
  'to_city': 'Los Angeles',
  'to_street': '123 Palm Grove Ln',
  'to_zip': '90002',
  'amount': 16.5,
  'shipping': 1.5,
  'sales_tax': 0.95,
  'line_items': [
    {
      'quantity': 1,
      'product_identifier': '12-34243-9',
      'description': 'Fuzzy Widget',
      'unit_price': 15,
      'sales_tax': 0.95
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.createRefund({
  transaction_id: '123',
  transaction_date: '2015/05/14',
  transaction_reference_id: '123',
  to_country: 'US',
  to_zip: '90002',
  to_state: 'CA',
  to_city: 'Los Angeles',
  to_street: '123 Palm Grove Ln',
  amount: 16.5,
  shipping: 1.5,
  sales_tax: 0.95,
  line_items: [
    {
      quantity: 1,
      product_identifier: '12-34243-9',
      description: 'Fuzzy Widget',
      unit_price: 15,
      sales_tax: 0.95
    }
  ]
}).then(function(res) {
  res.refund; // Refund object
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$refund = $client->createRefund([
  'transaction_id' => '321',
  'transaction_date' => '2015/05/14',
  'transaction_reference_id' => '123',
  'to_country' => 'US',
  'to_zip' => '90002',
  'to_state' => 'CA',
  'to_city' => 'Los Angeles',
  'to_street' => '123 Palm Grove Ln',
  'amount' => 16.5,
  'shipping' => 1.5,
  'sales_tax' => 0.95,
  'line_items' => [
    [
      'quantity' => 1,
      'product_identifier' => '12-34243-9',
      'description' => 'Fuzzy Widget',
      'unit_price' => 15,
      'sales_tax' => 0.95
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var refund = client.CreateRefund(new
{
  transaction_id = "321",
  transaction_date = "2015/05/04",
  transaction_reference_id = "123",
  to_country = "US",
  to_zip = "90002",
  to_city = "Los Angeles",
  to_street = "123 Palm Grove Ln",
  amount = 16.5,
  shipping = 1.5,
  sales_tax = 0.95,
  line_items = new[] {
    new {
      quantity = 1,
      product_identifier = "12-34243-0",
      description = "Heavy Widget",
      unit_price = 15,
      sales_tax = 0.95
    }
  }
});
$ curl https://api.taxjar.com/v2/transactions/refunds \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_id": "123",
    "transaction_date": "2015/05/14",
    "transaction_reference_id": "123",
    "to_street": "123 Palm Grove Ln",
    "to_city": "Los Angeles",
    "to_state": "CA",
    "to_zip": "90002",
    "to_country": "US",
    "amount": 16.5,
    "shipping": 1.5,
    "sales_tax": 0.95,
    "line_items": [
      {
        "quantity": 1,
        "product_identifier": "12-34234-9",
        "description": "Fuzzy Widget",
        "unit_price": 15,
        "sales_tax": 0.95
      }
    ]
  }'

Response Example

{
  "refund": {
    "transaction_id": "321",
    "user_id": 10649,
    "transaction_date": "2015-05-14T00:00:00Z",
    "transaction_reference_id": "123",
    "to_country": "US",
    "to_zip": "90002",
    "to_state": "CA",
    "to_city": "LOS ANGELES",
    "to_street": "123 Palm Grove Ln",
    "amount": "16.5",
    "shipping": "1.5",
    "sales_tax": "0.95",
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "product_identifier": "12-34243-9",
        "description": "Fuzzy Widget",
        "unit_price": "15.0",
        "discount": "0.0",
        "sales_tax": "0.95"
      }
    ]
  }
}
#<Taxjar::Refund:0x00000a @attrs={
  :transaction_id => "321",
  :user_id => 11836,
  :transaction_date => "2015-06-14T00:00:00Z",
  :transaction_reference_id => "123",
  :from_country => "US",
  :from_zip => 93107,
  :from_state => "CA",
  :from_city => "SANTA BARBARA",
  :from_street => "1218 State St",
  :to_country => "US",
  :to_zip => 90002,
  :to_state => "CA",
  :to_city => "LOS ANGELES",
  :to_street => "123 Palm Grove Ln",
  :amount => 16.5,
  :shipping => 1.5,
  :sales_tax => 0.95,
  :line_items => [
    {
      :id => "1",
      :quantity => 1,
      :product_identifier => "12-34243-0",
      :product_tax_code => nil,
      :description => "Heavy Widget",
      :unit_price => 15,
      :discount => 0,
      :sales_tax => 0.95
    }
  ]
}>
<TaxJarRefund {
  'from_state': 'CA',
  'line_items': [<TaxJarLineItem {
    'description': 'Heavy Widget',
    'unit_price': 15,
    'discount': 0,
    'product_identifier': '12-34243-0',
    'sales_tax': 0.95,
    'product_tax_code': None,
    'id': 0,
    'quantity': 1
  }>],
  'user_id': 11836,
  'to_zip': '90002',
  'from_street': '1218 State St',
  'from_city': 'SANTA BARBARA',
  'from_zip': 93107,
  'to_country': 'US',
  'shipping': 1.5,
  'from_country': 'US',
  'to_city': 'LOS ANGELES',
  'to_street': '123 Palm Grove Ln',
  'transaction_date': '2015-06-14T00:00:00Z',
  'transaction_reference_id': '123',
  'sales_tax': 0.95,
  'amount': 16.5,
  'transaction_id': '321',
  'to_state': 'CA'
}>

Creates a new refund transaction.

Request

POST https://api.taxjar.com/v2/transactions/refunds

Parameters

Parameter Type Required Description
transaction_id string required Unique identifier of the given refund transaction.
transaction_reference_id string required Unique identifier of the corresponding order transaction for the refund.
transaction_date datetime required The date/time the transaction was originally recorded. View Note
from_country string optional Two-letter ISO country code of the country where the order shipped from. View Note
from_zip string optional Postal code where the order shipped from (5-Digit ZIP or ZIP+4).
from_state string optional Two-letter ISO state code where the order shipped from.
from_city string optional City where the order shipped from.
from_street string optional Street address where the order shipped from.
to_country string required Two-letter ISO country code of the country where the order shipped to.
to_zip string required Postal code where the order shipped to (5-Digit ZIP or ZIP+4).
to_state string required Two-letter ISO state code where the order shipped to.
to_city string optional City where the order shipped to.
to_street string optional Street address where the order shipped to.
amount long required Total amount of the refunded order with shipping, excluding sales tax in dollars.
shipping long required Total amount of shipping for the refunded order in dollars.
sales_tax long required Total amount of sales tax collected for the refunded order in dollars.
line_items[][id] string optional Unique identifier of the given line item.
line_items[][quantity] integer optional Quantity for the item.
line_items[][product_identifier] string optional Product identifier for the item.
line_items[][description] string optional Description of the line item (up to 255 characters).
line_items[][product_tax_code] string optional Product tax code for the item. If omitted, the item will remain fully taxable.
line_items[][unit_price] long optional Unit price for the item in dollars.
line_items[][discount] long optional Total discount (non-unit) for the item in dollars.
line_items[][sales_tax] long optional Total sales tax collected (non-unit) for the item in dollars.

Notes

  • Either an address on file or from_ parameters are required to perform tax calculations.

  • The transaction_date may be a date '2015-05-25’, an ISO UTC date/time '2015-05-25T13:05:45’, or an ISO date/time with zone offset '2015-05-25T13:05:45-05:00’.

put Update a refund transaction

Definition

client.update_refund
client.update_refund
client.updateRefund();
$client->updateRefund();
client.UpdateRefund();
PUT https://api.taxjar.com/v2/transactions/refunds/:transaction_id

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

order = client.update_refund({
  :transaction_id => '321',
  :amount => 17,
  :shipping => 2,
  :sales_tax => 0.95,
  :line_items => [
    {
      :quantity => 1,
      :product_identifier => '12-34243-0',
      :description => 'Heavy Widget',
      :unit_price => 15,
      :sales_tax => 0.95
    }
  ]
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

refund = client.update_refund('321', {
  'transaction_id': '321',
  'amount': 17,
  'shipping': 2,
  'sales_tax': 0.95,
  'line_items': [
    {
      'quantity': 1,
      'product_identifier': '12-34243-0',
      'description': 'Heavy Widget',
      'unit_price': 15,
      'sales_tax': 0.95
    }
  ]
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.updateRefund({
  transaction_id: '123',
  amount: 17,
  shipping: 2,
  line_items: [
    {
      quantity: 1,
      product_identifier: '12-34243-0',
      description: 'Heavy Widget',
      unit_price: 15,
      sales_tax: 0.95
    }
  ]
}).then(function(res) {
  res.refund; // Refund object
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$refund = $client->updateRefund([
  'transaction_id' => '321',
  'amount' => 17,
  'shipping' => 2,
  'line_items' => [
    [
      'quantity' => 1,
      'product_identifier' => '12-34243-0',
      'description' => 'Heavy Widget',
      'unit_price' => 15,
      'sales_tax' => 0.95
    ]
  ]
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var refund = client.UpdateRefund(new
{
  transaction_id = "321",
  amount = 17,
  shipping = 2,
  line_items = new[] {
    new {
      quantity = 1,
      product_identifier = "12-34243-0",
      description = "Heavy Widget",
      unit_price = 15,
      discount = 0,
      sales_tax = 0.95
    }
  }
});
$ curl https://api.taxjar.com/v2/transactions/refunds/321 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_id": "321",
    "amount": 17,
    "shipping": 2,
    "sales_tax": 0.95,
    "line_items": [
      {
        "quantity": 1,
        "product_identifier": "12-34234-0",
        "description": "Heavy Widget",
        "unit_price": 15,
        "sales_tax": 0.95
      }
    ]
  }' \
  -X PUT

Response Example

{
  "refund": {
    "transaction_id": "321",
    "user_id": 10649,
    "transaction_date": "2015-05-14T00:00:00Z",
    "transaction_reference_id": "123",
    "to_country": "US",
    "to_zip": "90002",
    "to_state": "CA",
    "to_city": "LOS ANGELES",
    "to_street": "123 Palm Grove Ln",
    "amount": "17.0",
    "shipping": "2.0",
    "sales_tax": "0.95",
    "line_items": [
      {
        "id": "1",
        "quantity": 1,
        "product_identifier": "12-34243-0",
        "description": "Heavy Widget",
        "unit_price": 15,
        "discount": 0,
        "sales_tax": 0.95
      }
    ]
  }
}
#<Taxjar::Refund:0x00000a @attrs={
  :transaction_id => "321",
  :user_id => 11836,
  :transaction_date => "2015-06-14T00:00:00Z",
  :transaction_reference_id => "123",
  :from_country => "US",
  :from_zip => 93107,
  :from_state => "CA",
  :from_city => "SANTA BARBARA",
  :from_street => "1218 State St",
  :to_country => "US",
  :to_zip => 90002,
  :to_state => "CA",
  :to_city => "LOS ANGELES",
  :to_street => "123 Palm Grove Ln",
  :amount => 17.0,
  :shipping => 2.0,
  :sales_tax => 0.95,
  :line_items => [
    {
      :id => "1",
      :quantity => 1,
      :product_identifier => "12-34243-9",
      :product_tax_code => nil,
      :description => "Heavy Widget",
      :unit_price => 15,
      :discount => 0,
      :sales_tax => 0.95
    }
  ]
}>
<TaxJarRefund {
  'from_state': 'CA',
  'line_items': [<TaxJarLineItem {
    'description': 'Heavy Widget',
    'unit_price': 15,
    'discount': 0,
    'product_identifier': '12-34243-9',
    'sales_tax': 0.95,
    'product_tax_code': None,
    'id': 0,
    'quantity': 1
  }>],
  'user_id': 1,
  'to_zip': '90002',
  'from_street': '1218 State St',
  'from_city': 'SANTA BARBARA',
  'from_zip': 93107,
  'to_country': 'US',
  'shipping': 2,
  'from_country': 'US',
  'to_city': 'LOS ANGELES',
  'to_street': '123 Palm Grove Ln',
  'transaction_date': '2016-03-10T00:00:00.000Z',
  'transaction_reference_id': '123',
  'sales_tax': 0.95,
  'amount': 17,
  'transaction_id': '321',
  'to_state': 'CA'
}>

Updates an existing refund transaction created through the API.

Request

PUT https://api.taxjar.com/v2/transactions/refunds/:transaction_id

Parameters

Parameter Type Required Description
transaction_id string required Unique identifier of the given transaction.
transaction_reference_id string required Unique identifier of the corresponding order transaction for the refund.
transaction_date datetime optional The date/time the transaction was originally recorded.
from_country string optional Two-letter ISO country code of the country where the order shipped from. View Note
from_zip string optional Postal code where the order shipped from (5-Digit ZIP or ZIP+4).
from_state string optional Two-letter ISO state code where the order shipped from.
from_city string optional City where the order shipped from.
from_street string optional Street address where the order shipped from.
to_country string optional Two-letter ISO country code of the country where the refunded order shipped to.
to_zip string optional Postal code where the refunded order shipped to (5-Digit ZIP or ZIP+4).
to_state string optional Two-letter ISO state code where the refunded order shipped to.
to_city string optional City where the refunded order shipped to.
to_street string optional Street address where the refunded order shipped to.
amount long optional Total amount of the refunded order with shipping, excluding sales tax in dollars.
shipping long optional Total amount of shipping for the refunded order in dollars.
sales_tax long optional Total amount of sales tax collected for the refunded order in dollars.
line_items[][id] string optional Unique identifier of the given line item.
line_items[][quantity] integer optional Quantity for the item.
line_items[][product_identifier] string optional Product identifier for the item.
line_items[][description] string optional Description of the line item (up to 255 characters).
line_items[][product_tax_code] string optional Product tax code for the item. If omitted, the item will remain fully taxable.
line_items[][unit_price] long optional Unit price for the item in dollars.
line_items[][discount] long optional Total discount (non-unit) for the item in dollars.
line_items[][sales_tax] long optional Total sales tax collected (non-unit) for the item in dollars.

Notes

  • Either an address on file or from_ parameters are required to perform tax calculations.

  • The transaction_date may be a date '2015-05-25’, an ISO UTC date/time '2015-05-25T13:05:45’, or an ISO date/time with zone offset '2015-05-25T13:05:45-05:00’.

delete Delete a refund transaction

Definition

client.delete_refund
client.delete_refund
client.deleteRefund();
$client->deleteRefund();
client.DeleteRefund();
DELETE https://api.taxjar.com/v2/transactions/refunds/:transaction_id

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

client.delete_refund('321')
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

client.delete_refund('321')
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.deleteRefund('321').then(function(res) {

});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$client->deleteRefund('321');
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var refund = client.DeleteRefund("321");
$ curl https://api.taxjar.com/v2/transactions/refunds/321 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -X DELETE

Response Example

{
  "refund": {
    "transaction_id": "321",
    "user_id": 10649,
    "transaction_date": null,
    "transaction_reference_id": null,
    "from_country": null,
    "from_zip": null,
    "from_state": null,
    "from_city": null,
    "from_street": null,
    "to_country": null,
    "to_zip": null,
    "to_state": null,
    "to_city": null,
    "to_street": null,
    "amount": null,
    "shipping": null,
    "sales_tax": null,
    "line_items": []
  }
}
#<Taxjar::Refund:0x00000a @attrs={
  :transaction_id => "321",
  :user_id => 11836,
  :transaction_date => nil,
  :transaction_reference_id => nil,
  :from_country => nil,
  :from_zip => nil,
  :from_state => nil,
  :from_city => nil,
  :from_street => nil,
  :to_country => nil,
  :to_zip => nil,
  :to_state => nil,
  :to_city => nil,
  :to_street => nil,
  :amount => nil,
  :shipping => nil,
  :sales_tax => nil,
  :line_items => []
}>
<TaxJarRefund {
  'from_state': None,
  'line_items': [],
  'user_id': 11836,
  'to_zip': None,
  'from_street': None,
  'from_city': None,
  'from_zip': None,
  'to_country': None,
  'shipping': None,
  'from_country': None,
  'to_city': None,
  'to_street': None,
  'transaction_date': None,
  'transaction_reference_id': None,
  'sales_tax': None,
  'amount': None,
  'transaction_id': '321',
  'to_state': None
}>

Deletes an existing refund transaction created through the API.

Request

DELETE https://api.taxjar.com/v2/transactions/refunds/:transaction_id

Parameters

Parameter Type Required Description
transaction_id string required Unique identifier of the given refund transaction.

Nexus

get List nexus regions

Definition

client.nexus_regions
client.nexus_regions
client.nexusRegions();
$client->nexusRegions();
client.NexusRegions();
GET https://api.taxjar.com/v2/nexus/regions

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

nexus_regions = client.nexus_regions
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

nexus_regions = client.nexus_regions()
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.nexusRegions().then(function(res) {
  res.regions; // Array of nexus regions
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$nexus_regions = $client->nexusRegions();
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var nexusRegions = client.NexusRegions();
$ curl https://api.taxjar.com/v2/nexus/regions \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214"

Response Example

{
  "regions": [
    {
      "country_code": "US",
      "country": "United States",
      "region_code": "CA",
      "region": "California"
    },
    {
      "country_code": "US",
      "country": "United States",
      "region_code": "NY",
      "region": "New York"
    },
    {
      "country_code": "US",
      "country": "United States",
      "region_code": "WA",
      "region": "Washington"
    }
  ]
}
[
  #<Taxjar::NexusRegion:0x00000a @attrs={
    :country_code => "US",
    :country => "United States",
    :region_code => "CA",
    :region => "California"
  }>,
  #<Taxjar::NexusRegion:0x00000a @attrs={
    :country_code => "US",
    :country => "United States",
    :region_code => "NY",
    :region => "New York"
  }>,
  #<Taxjar::NexusRegion:0x00000a @attrs={
    :country_code => "US",
    :country => "United States",
    :region_code => "WA",
    :region => "Washington"
  }>
]
[
  <TaxJarRegion {
    'country_code': 'US',
    'country': 'United States',
    'region_code': 'CA',
    'region': 'California'
  }>,
  <TaxJarRegion {
    'country_code': 'US',
    'country': 'United States',
    'region_code': 'NY',
    'region': 'New York'
  }>,
  <TaxJarRegion {
    'country_code': 'US',
    'country': 'United States',
    'region_code': 'WA',
    'region': 'Washington'
  }>
]

Lists existing nexus locations for a TaxJar account.

Request

GET https://api.taxjar.com/v2/nexus/regions

Response

Returns a JSON object with an array of nexus regions sorted alphabetically.

Attributes

Parameter Type Description
country_code string Two-letter ISO country code for nexus region.
country string Country name for nexus region.
region_code string Two-letter ISO region code for nexus region.
region string Region name for nexus region.

Validations

get Validate a VAT number

Validates an existing VAT identification number against VIES.

Definition

client.validate
client.validate
client.validate();
$client->validate();
client.Validate();
GET https://api.taxjar.com/v2/validation

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

validation = client.validate({
  :vat => 'FR40303265045'
})
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

validation = client.validate({
  'vat': 'FR40303265045'
})
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.validate({
  vat: 'FR40303265045'
}).then(function(res) {
  res.validation; // Validation object
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$validation = $client->validate([
  'vat' => 'FR40303265045'
]);
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var validation = client.Validate(new {
  vat = "FR40303265045"
});
$ curl -G https://api.taxjar.com/v2/validation \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -d vat="FR40303265045"

Response Example

{
  "validation": {
    "valid": true,
    "exists": true,
    "vies_available": true,
    "vies_response": {
      "country_code": "FR",
      "vat_number": "40303265045",
      "request_date": "2016-02-10",
      "valid": true,
      "name": "SA SODIMAS",
      "address": "11 RUE AMPERE\n26600 PONT DE L ISERE"
    }
  }
}
#<Taxjar::Validation:0x00000a @attrs={
  :valid => true,
  :exists => true,
  :vies_available => true,
  :vies_response => {
    :country_code => "FR",
    :vat_number => "40303265045",
    :request_date => "2016-02-10",
    :valid => true,
    :name => "SA SODIMAS",
    :address => "11 RUE AMPERE\n26600 PONT DE L ISERE"
  }
}>
<TaxJarValidation {
  'valid': True,
  'exists': True,
  'vies_available': True,
  'vies_response': <TaxJarViesResponse {
    'country_code': 'FR',
    'vat_number': '40303265045',
    'request_date': '2016-02-10',
    'valid': True,
    'name': 'SA SODIMAS',
    'address': "11 RUE AMPERE\n26600 PONT DE L ISERE"
  }>
}>

Request

GET https://api.taxjar.com/v2/validation

Parameters

Parameter Type Required Description
vat string required VAT identification number to validate. Country code should precede number, e.g. GB980780684.

Response

Returns a JSON object declaring if the VAT number is valid and exists along with data returned by VIES.

Attributes

Parameter Type Description
valid bool Whether or not the VAT number is valid via regex and VIES.
exists bool Whether or not the VAT number exists in VIES.
vies_available bool Whether or not VIES is currently available.
vies_response object Data returned by VIES based on the given VAT number.

Summarized Rates

get Summarize tax rates for all regions

Retrieve minimum and average sales tax rates by region as a backup.

Definition

client.summary_rates
client.summary_rates
client.summaryRates();
$client->summaryRates();
client.SummaryRates();
GET https://api.taxjar.com/v2/summary_rates

Request Example

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

summarized_rates = client.summary_rates
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

summarized_rates = client.summary_rates()
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

client.summaryRates().then(function(res) {
  res.summary_rates; // Array of summarized rates
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

$summarized_rates = $client->summaryRates();
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

var summaryRates = client.SummaryRates();
$ curl https://api.taxjar.com/v2/summary_rates \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214"

Response Example
Summary response shortened for brevity.

{
  "summary_rates": [
    {
      "country_code": "US",
      "country": "United States",
      "region_code": "CA",
      "region": "California",
      "minimum_rate": {
        "label": "State Tax",
        "rate": 0.065
      },
      "average_rate": {
        "label": "Tax",
        "rate": 0.0827
      }
    },
    {
      "country_code": "CA",
      "country": "Canada",
      "region_code": "BC",
      "region": "British Columbia",
      "minimum_rate": {
        "label": "GST",
        "rate": 0.05
      },
      "average_rate": {
        "label": "PST",
        "rate": 0.12
      }
    },
    {
      "country_code": "UK",
      "country": "United Kingdom",
      "region_code": null,
      "region": null,
      "minimum_rate": {
        "label": "VAT",
        "rate": 0.2
      },
      "average_rate": {
        "label": "VAT",
        "rate": 0.2
      }
    }
  ]
}
[
  #<Taxjar::SummaryRate:0x00000a @attrs={
    :country_code => "US",
    :country => "United States",
    :region_code => "CA",
    :region => "California",
    :minimum_rate => {
      :label => "State Tax",
      :rate => 0.065
    },
    :average_rate => {
      :label => "Tax",
      :rate => 0.0827
    }
  }>,
  #<Taxjar::SummaryRate:0x00000a @attrs={
    :country_code => "CA",
    :country => "Canada",
    :region_code => "BC",
    :region => "British Columbia",
    :minimum_rate => {
      :label => "GST",
      :rate => 0.05
    },
    :average_rate => {
      :label => "PST",
      :rate => 0.12
    }
  }>,
  #<Taxjar::SummaryRate:0x00000a @attrs={
    :country_code => "UK",
    :country => "United Kingdom",
    :region_code => nil,
    :region => nil,
    :minimum_rate => {
      :label => "VAT",
      :rate => 0.2
    },
    :average_rate => {
      :label => "VAT",
      :rate => 0.2
    }
  }>
]
[
  <TaxJarSummaryRate {
    'average_rate': {
      'rate': 0.0827,
      'label': 'Tax'
    },
    'region_code': 'CA',
    'minimum_rate': {
      'rate': 0.065,
      'label': 'State Tax'
    },
    'country': 'US',
    'region': 'California',
    'country_code': 'US'
  }>,
  <TaxJarSummaryRate {
    'average_rate': {
      'rate': 0.12,
      'label': 'PST'
    },
    'region_code': 'BC',
    'minimum_rate': {
      'rate': 0.05,
      'label': 'GST'
    },
    'country': 'Canada',
    'region': 'British Columbia',
    'country_code': 'CA'
  }>,
  <TaxJarSummaryRate {
    'average_rate': {
      'rate': 0.2,
      'label': 'VAT'
    },
    'region_code': None,
    'minimum_rate': {
      'rate': 0.2,
      'label': 'VAT'
    },
    'country': 'United Kingdom',
    'region': None,
    'country_code': 'UK'
  }>
]

Request

GET https://api.taxjar.com/v2/summary_rates

Response

Returns a JSON object with an array of summarized rates for each region/state.

Attributes

Parameter Type Description
country_code string Country code for summarized region.
country string Country name for summarized region.
region_code string Region code for summarized region.
region string Region name for summarized region.
minimum_rate object Region/state-only sales tax rate with label.
average_rate object Average rate for region/state and local sales tax across all postal codes in the summarized region with label.

Errors

 

require "taxjar"
client = Taxjar::Client.new(api_key: "9e0cd62a22f451701f29c3bde214")

begin
  # Invalid request
  order = client.create_order({
    :transaction_date => '2015/05/14',
    :to_country => 'US',
    :to_state => 'CA',
    :to_zip => '90002',
    :amount => 17.45,
    :shipping => 1.5,
    :sales_tax => 0.95
  })
rescue Taxjar::Error => e
  # <Taxjar::Error::NotAcceptable: transaction_id is missing>
  puts e.class.name
  puts e.message
end
import taxjar
client = taxjar.Client(api_key='9e0cd62a22f451701f29c3bde214')

try:
  order = client.create_order({
    'transaction_date': '2015/05/14',
    'to_country': 'US',
    'to_state': 'CA',
    'to_zip': '90002',
    'amount': 17.45,
    'shipping': 1.5,
    'sales_tax': 0.95
  })
except taxjar.exceptions.TaxJarConnectionError as err:
  print err
except taxjar.exceptions.TaxJarResponseError as err:
  # 406 Not Acceptable – transaction_id is missing
  print err.full_response
var client = require("taxjar")("9e0cd62a22f451701f29c3bde214");

// Invalid request
taxjar.createOrder({
  transaction_date: '2015/05/14',
  to_country: 'US',
  to_state: 'CA',
  to_zip: '90002',
  amount: 17.45,
  shipping: 1.5,
  sales_tax: 0.95
}).then(function(res) {
  res.order; // Order object
}).catch(function(err) {
  err.detail; // Error detail
  err.status; // Error status code
});
require __DIR__ . '/vendor/autoload.php';
$client = TaxJar\Client::withApiKey("9e0cd62a22f451701f29c3bde214");

try {
  // Invalid request
  $order = $client->createOrder([
    'transaction_date' => '2015/05/14',
    'to_country' => 'US',
    'to_zip' => '90002',
    'to_state' => 'CA',
    'amount' => 17.45,
    'shipping' => 1.5,
    'sales_tax' => 0.95
  ]);
} catch (TaxJar\Exception $e) {
  // 406 Not Acceptable – transaction_id is missing
  echo $e->getMessage();
}
using Taxjar;
var client = new TaxjarApi("9e0cd62a22f451701f29c3bde214");

try
{
  // Invalid request
  var order = client.CreateOrder(new {
    transaction_date = "2015/05/04",
    to_country = "US",
    to_zip = "90002",
    to_state = "CA",
    amount = 17.45,
    shipping = 1.5,
    sales_tax = 0.95
  });
}
catch(TaxjarException e)
{
  // 406 Not Acceptable – transaction_id is missing
  e.TaxjarError.Error;
  e.TaxjarError.Detail;
  e.TaxjarError.StatusCode;
}

The TaxJar API uses the following error codes:

Error Code Meaning
400 Bad Request – Your request format is bad.
401 Unauthorized – Your API key is wrong.
403 Forbidden – The resource requested is not authorized for use.
404 Not Found – The specified resource could not be found.
405 Method Not Allowed – You tried to access a resource with an invalid method.
406 Not Acceptable – Your request is not acceptable.
410 Gone – The resource requested has been removed from our servers.
422 Unprocessable Entity – Your request could not be processed.
429 Too Many Requests – You’re requesting too many resources! Slow down!
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarily offline for maintenance. Try again later.

400 Bad Request

If you receive the message “No from address, no nexus address, and no address on file”, we recommend providing from_ or nexus_addresses[] depending on the endpoint’s accepted parameters. Otherwise sign in and provide your business address and locations in TaxJar.

Additionally, we provide specific 400 error messages for invalid data:

  • Invalid ZIP and state combinations for to_zip, to_state and from_zip, from_state

Transactions

  • amount param does not equal sum of line_items + shipping
  • line_items[][description] param exceeds limit of 255 characters

401 Unauthorized

Verify your API token is correct and make sure you’re correctly setting the Authorization header.

403 Forbidden

Make sure you have an active API token with TaxJar by reviewing your account. Your trial or subscription may have expired. If you’re still not sure what’s wrong, contact us and we’ll investigate.

406 Not Acceptable

This error occurs most often when posting form-encoded data with parameters such as nexus_addresses[] or line_items[]. If your code looks correct, try submitting the request with a Content-Type: application/json header. Data should always be JSON-encoded.

Additionally, a 406 response will be returned if you provide blank values for required fields when pushing orders or refunds through the /v2/transactions endpoints.