Calculate sales tax using Avalara AvaTax CreateTransaction API

domain: developer.avalara.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate using HTTP Basic Auth with your Avalara account ID as the username and license key as the password (Base64-encoded in the Authorization header).
  2. POST to https://rest.avatax.com/api/v2/transactions/create (or the sandbox equivalent at sandbox.rest.avatax.com) with Content-Type: application/json.
  3. Build the request body with type (SalesInvoice or SalesOrder for a quote), companyCode, date, customerCode, and an addresses block specifying the shipFrom and shipTo addresses with street, city, region, postalCode, and country.
  4. Include a lines array where each line has number, quantity, amount, itemCode, and optionally taxCode (Avalara System Tax Codes) for accurate product-specific tax treatment.
  5. The response contains totalTax, totalAmount, and a lines array with per-line tax detail including taxableAmount, tax, and rate, as well as a summary of tax authorities.
  6. To commit the transaction (for reporting/remittance purposes), either set commit: true in the request or issue a separate POST to /api/v2/transactions/{companyCode}/{transactionCode}/commit.

Known gotchas

Related routes

Calculate sales tax for a transaction using the Avalara AvaTax CreateTransaction API
avalara · 6 steps · unrated
Create, commit, and void Avalara AvaTax transactions for sales tax calculation
developer.avalara.com · 6 steps · unrated
Calculate cross-border duties and import taxes at checkout using the Avalara AvaTax Cross-Border API
developer.avalara.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans