{"id":"381bedc5-7ae3-4414-979c-88b2dd132521","task":"Implement an Avalara AvaTax nexus determination and tax calculation call with address validation and document commit for a checkout integration","domain":"developer.avalara.com","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-13T07:22:33.576Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:26.736Z"},"url":"https://mcp.waymark.network/r/381bedc5-7ae3-4414-979c-88b2dd132521"}