POST /api/v2/addresses/resolve to validate and normalize the destination address before tax calculation; an invalid address returns error details and should block checkout or prompt correction
Build a CreateTransactionModel with type SalesOrder (not SalesInvoice until post-payment commit), customerCode, addresses (ShipFrom, ShipTo), and lines array with each line's amount, quantity, and taxCode
POST /api/v2/transactions/create and parse the response: totalTax is the aggregate; lines[].tax gives per-line breakdowns useful for cart display
After payment capture, call POST /api/v2/transactions/{code}/commit to change the document type to SalesInvoice and lock it for reporting — or create with type SalesInvoice and commit:true directly
For returns, create a ReturnInvoice transaction referencing the original invoice code so Avalara reverses the tax obligation correctly for filing purposes
Known gotchas
Avalara tax codes (TaxCodes) are not equivalent to TaxJar PTCs; maintain a separate mapping table if you support both providers, and do not cross-apply codes between systems
Using SalesOrder (uncommitted) documents does not count against filing totals — only committed SalesInvoice documents appear in tax returns; failing to commit after payment leads to under-reporting
Avalara sandbox (avatax.itg.avalara.com) uses different credentials from production; test credentials do not work against production endpoints and vice versa — maintain separate configuration per environment
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp