Taxability codes

Name what was sold with code, and the answer says whether that sale is taxed at the address and at what rate, with the government page that says so.

What a code is

A code names what the thing sold is, in just enough detail for the tax rules to tell it apart from the next thing. Tax law doesn't care whose laptop it is; it cares whether it's a tangible good, food, software or a service, and within food whether someone prepared it. A code says only what the thing is, the same everywhere; a rule says how one place's tax treats it from a date. Who bought it (a reseller, an exempt organization) and where the sale is sourced are yours to decide.

Pass one or more, comma-separated, so an invoice with several kinds of line is one lookup: &code=food.catering,delivery. An unknown code is a 400 listing the valid ones, so a typo can't look like not_researched. See Taxability in the API reference for the response.

CodeWhat it covers
goods.generalTangible goods sold at retail that no narrower code here describes: furniture, tools, electronics, household goods. Not food, clothing, medicine or other goods a jurisdiction treats on their own.
food.groceryFood and food ingredients sold unprepared, for eating at home: produce, meat, dairy, bread, packaged staples. Not candy, soft drinks, alcohol, dietary supplements or tobacco, and not food the seller prepared.
food.preparedFood the seller sells ready to eat: sold heated, mixed or combined by the seller (sandwiches, salads, meals), or sold with eating utensils the seller provides; delivered meals included. Not catering at the customer's event.
food.cateringFood and drink the seller prepares and serves at the customer's event, with the service on the same bill: staff, setup, rentals and service charges.
software.saasPrewritten software the customer uses remotely, by subscription or access, without receiving a copy.
software.customSoftware written for one customer to its specifications, or prewritten software customized for it; the development work, not a prewritten copy.
service.professionalProfessional advice or work sold to the customer: legal, accounting, consulting, engineering and similar, where the product is the professional's work rather than goods or software.
construction.real_propertyBuilding, repairing, painting or improving the customer's building or land, labour and materials billed together, sold to the owner (not to another contractor).
deliveryA separately stated charge for delivering goods to the buyer.
nontaxableAn amount that isn't a sale of anything: card fees passed through, deposits held, reimbursements. The caller's assertion; no jurisdiction's rule is consulted.

The list grows only when a rule needs a split: clothing, candy and soft drinks, medicine and digital goods each get a code when their rules are researched.

Other taxonomies

The definitions follow the Streamlined Sales Tax Library of Definitions, which 24 states have written into their own law word for word; New York and California aren't members, but their tests line up with the same ideas, and where a state tests differently, that difference is in the rule's conditions, not a different code. If you already have a product tax code from another provider, translate it with this table.

OpenTaxRateStreamlined definitionStripe TaxTaxJarAvalara
goods.generaltangible personal propertytxcd_99999999(none)P0000000
food.groceryfood and food ingredientstxcd_4004000040030PF050002
food.preparedprepared foodtxcd_4006000341000PA0010000
food.cateringprepared food (catering)txcd_40060003*41000*SF096370
software.saasprewritten computer software, remote accesstxcd_1010300130070SW054003
software.customcomputer software, not prewrittentxcd_1020300119005*DC010200
service.professional(services aren't defined)txcd_2006000019005SC160000
construction.real_property(not defined)txcd_20070010(none)SC150603
deliverydelivery chargestxcd_92010001shippingFR010000
nontaxable—txcd_00000000(none)ON030000

* The nearest code; that provider has no exact match.

Coverage

Rules are researched for Washington, New York, California and every Canadian province and territory, for the ten codes. Each one is read from the state's or agency's own statutes, regulations and bulletins, and cites the pages it came from. No state publishes taxability as data, so the rules are written down by hand from those pages and tested against the agencies' worked examples.

Everywhere else, and any code or date without a rule there, answers not_researched. The general rate is still returned as always. GET /v1/coverage lists each state's taxabilityCodes: the codes with a researched rule there today.

Treatments

Each entry's treatment describes the sale as a whole.

TreatmentMeaningrate
taxableEvery part at its rate.The combined rate
partialSome parts, or a reduced rate: a restaurant meal in British Columbia pays GST but not PST.The sum of the taxing parts
not_taxedNo part taxes it.0
conditionalThe outcome turns on facts the code doesn't fix, listed in the rules' conditions.null
not_researchedA part has no researched rule for this code on this date.null

Each of taxes carries the legal treatment of its parts: taxable, exempt, zero_rated, conditional, not_a_sale or not_researched. Exempt and zero-rated both mean no tax, but a Canadian return reports them on different lines. A rule's fromIs is effective when its sources give the day it took effect, and earliest_verified when it's likely older but earlier dates aren't researched; those earlier dates answer not_researched.

Reading a conditional answer

When rate is a number, charge it. When it's null and the treatment is conditional, show the rules' conditions and let a person pick the one that applies; each names its own treatment and, where a part's rate is reduced, its rate. When it's null and not_researched, send the sale to another engine or a person. Never use the general rate in its place.

"food.prepared": {
  "treatment": "conditional",
  "rate": null,
  "taxes": [
    {
      "tax": "CA",
      "parts": [...],
      "treatment": "conditional",
      "rate": null,
      "rule": {
        "summary": "Ready-to-eat food is taxable when hot, served as a meal or for eating at the retailer's facilities, or sold to go by a seller meeting the 80-80 rule; otherwise cold food to go is exempt.",
        "conditions": [
          { "when": "Sold as a hot prepared food product ...", "treatment": "taxable" },
          { "when": "Served as a meal, or furnished for consumption at tables ...", "treatment": "taxable" },
          { "when": "Cold food to go ... (80-80 rule)", "treatment": "taxable" },
          { "when": "Cold food to go ..., when none of the above applies", "treatment": "exempt" },
          ...
        ],
        "citations": [ { "title": "Cal. Rev. & Tax. Code § 6359(d)", "url": "https://www.cdtfa.ca.gov/lawguides/vol1/sutl/6359.html" }, ... ]
      }
    }
  ]
}

A sandwich to go in Los Angeles is conditional: hot, it's taxed; cold, it isn't, unless the seller falls under California's 80-80 rule. The code can't say which, so the answer lists each case (shortened above; the API returns each condition in full).