Introduction

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")
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 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();
GET https://api.taxjar.com/v2/categories

Request Example

require "taxjar"
client = Taxjar::Client.new(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:0x007f081dc3e278 @attrs={
    :name => "Digital Goods",
    :product_tax_code => "31000",
    :description => "Digital products transferred electronically."
  }>,
  #<Taxjar::Category:0x007f081dc3de90 @attrs={
    :name => "Clothing",
    :product_tax_code => "20010",
    :description => "All human wearing apparel suitable for general use"
  }>,
  #<Taxjar::Category:0x007f081dc3da80 @attrs={
    :name => "Non-Prescription",
    :product_tax_code => "51010",
    :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.

Rates

get Show tax rates for a location

Definition

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'
})

# International Examples (Requires City and Country)
rates = client.rates_for_location('V5K0A1', {
  :city => 'VANCOUVER',
  :country => 'CA'
})

rates = client.rates_for_location('00150', {
  :city => 'HELSINKI',
  :country => 'FI'
})
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
});

// International Examples (Requires City and Country)
client.ratesForLocation('V5K0A1', {
  city: 'VANCOUVER',
  country: 'CA'
}).then(function(res) {
  res.rate; // Rate object
});

client.ratesForLocation('00150', {
  city: 'HELSINKI',
  country: 'FI'
}).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'
]);

// International Examples (Requires City and Country)
$rates = $client->ratesForLocation('V5K0A1', [
  'city' => 'VANCOUVER',
  'country' => 'CA'
]);

$rates = $client->ratesForLocation('00150', [
  'city' => 'HELSINKI',
  'country' => 'FI'
]);
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"
});

// International Examples (Requires City and Country)
var rates = client.RatesForLocation("V5K0A1", new {
  city = "VANCOUVER",
  country = "CA"
});

var rates = client.RatesForLocation("00150", new {
  city = "HELSINKI",
  country = "FI"
});
# 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"

# International Examples (Requires City and Country)
curl -G https://api.taxjar.com/v2/rates/V5K0A1 \
  -H "Authorization: Bearer 9e0cd62a22f451701f29c3bde214" \
  -d city="VANCOUVER" \
  -d country="CA"

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.065",
    "county": "LOS ANGELES",
    "county_rate": "0.01",
    "city": "SANTA MONICA",
    "city_rate": "0.005",
    "combined_district_rate": "0.015",
    "combined_rate": "0.095"
  }
}

{
  "rate": {
    "zip": "V5K0A1",
    "city": "Vancouver",
    "state": "BC",
    "country": "CA",
    "combined_rate": "0.12"
  }
}

{
  "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:0x007fc47056a928 @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
}>

#<Taxjar::Rate:0x007fc47056a928 @attrs={
  :zip => "V5K0A1",
  :city => "Vancouver",
  :state => "BC",
  :country => "CA",
  :combined_rate => "0.12"
}>

#<Taxjar::Rate:0x007fc47056a928 @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
}>

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.

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.

US/Canada Attributes

Parameter Type Description
zip string Postal code for given location.
state string 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.

International 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.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
    }
  ]
})
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
      }
    ]
  }'

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
        }
      ]
    }
  }
}
{
  :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 => {
    :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 => [
      {
        :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
      }
    ]
  }
}

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.

Transactions

get List order transactions

Definition

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'
})
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"]

Lists existing order transactions.

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.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')
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:0x007fd3e514a940 @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.0",
      :discount => "0.0",
      :sales_tax => "0.95"
    }
  ]
}>

Shows an existing order transaction.

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.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
    }
  ]
})
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 = 17,
  shipping = 2,
  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:0x007f6d65b252d0 @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.0",
      :discount => "0.0",
      :sales_tax => "0.95"
    }
  ]
}>

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.
shipping long required Total amount of shipping for the order.
sales_tax long required Total amount of sales tax collected for the order.
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.
line_items[][discount] long optional Total discount (non-unit) for the item.
line_items[][sales_tax] long optional Total sales tax collected (non-unit) for the item.

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.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
    }
  ]
})
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:0x007f6d65b252d0 @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.0",
      :discount => "0.0",
      :sales_tax => "0.95"
    }
  ]
}>

Updates an existing order transaction.

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.
shipping long optional Total amount of shipping for the order.
sales_tax long optional Total amount of sales tax collected for the order.
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.
line_items[][discount] long optional Total discount (non-unit) for the item.
line_items[][sales_tax] long optional Total sales tax collected (non-unit) for the item.

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.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')
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:0x007f6d65b252d0 @attrs={
  :transaction_id => "123",
  :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 => []
}>

Deletes an existing order transaction.

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.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'
})
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"]

Lists existing refund transactions.

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.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')
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:0x007f6da40e33a0 @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.0",
      :discount => "0.0",
      :sales_tax => "0.95"
    }
  ]
}>

Shows an existing refund transaction.

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.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
    }
  ]
})
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 = 17,
  shipping = 2,
  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:0x007f6da40e33a0 @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.0",
      :discount => "0.0",
      :sales_tax => "0.95"
    }
  ]
}>

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.
shipping long required Total amount of shipping for the refunded order.
sales_tax long required Total amount of sales tax collected for the refunded order.
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.
line_items[][discount] long optional Total discount (non-unit) for the item.
line_items[][sales_tax] long optional Total sales tax collected (non-unit) for the item.

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.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
    }
  ]
})
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.0",
        "discount": "0.0",
        "sales_tax": "0.95"
      }
    ]
  }
}
#<Taxjar::Refund:0x007f6da40e33a0 @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.0",
      :discount => "0.0",
      :sales_tax => "0.95"
    }
  ]
}>

Updates an existing refund transaction.

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.
shipping long optional Total amount of shipping for the refunded order.
sales_tax long optional Total amount of sales tax collected for the refunded order.
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.
line_items[][discount] long optional Total discount (non-unit) for the item.
line_items[][sales_tax] long optional Total sales tax collected (non-unit) for the item.

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.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')
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:0x007f6da40e33a0 @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 => []
}>

Deletes an existing refund transaction.

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.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
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"
    }
  ]
}
[
  {
    :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"
  }
]

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();
GET https://api.taxjar.com/v2/validation

Request Example

require "taxjar"
client = Taxjar::Client.new(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:0x006f6da40e33a0 @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"
  }
}>

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.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
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
      }
    }
  ]
}
[
  {
    :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 => nil,
    :region => nil,
    :minimum_rate => {
      :label => "VAT",
      :rate => 0.2
    },
    :average_rate => {
      :label => "VAT",
      :rate => 0.2
    }
  }
]

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

Error Handling Example

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
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
});
<?php
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 (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.