Authorization: Bearer <token>, which is the form TaxJar documents alongside Token token="...".
Things to know before you call:
- Amounts come back as strings. Transaction and rate responses send money and tax rates as decimal strings (
"16.5","0.0625"), while thetaxesanswer sends numbers. The schemas accept the form each route actually sends, and the exportedreadNumberhelper converts either one. - Shipping is required on a transaction.
orders.createandrefunds.createreject a payload withoutshipping, even when it is 0. The schema enforces it before the request, so you get a clear error instead of TaxJar’s 422. - Calculation is not a transaction.
taxes.calculatereports what you should collect. It records nothing, which is why it is a read; useorders.createto record the sale for filing. - An update may be refused after filing. TaxJar accepts
orders.updateandrefunds.updateuntil the period is filed; after that the API refuses the change. The plugin does not retry a rejected update. - A refund points at its order. Send
transaction_reference_idonrefunds.createso the refund nets against the original order in reporting. - Customer exemption applies forward. A customer created with
exemption_typeexempts later transactions that cite itscustomer_id. Omittingexempt_regionscovers every region. - The list routes return IDs only.
orders.list,refunds.listandcustomers.listanswer an array of IDs under their key, not full records; call thegetendpoint for the details. - Date formats differ by route. The transaction routes document
YYYY/MM/DDand also acceptYYYY-MM-DD. - Deletes cannot be undone. A deleted transaction leaves the tax report, and a deleted customer loses its exemption.
- 21 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the TaxJar API key before the first call: More: API Key
pnpm corsair setup --plugin=taxjar --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Calculate the tax for a two-state orderWhat’s next
API reference
Every
taxjar.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.