Build a CreateTransactionModel with type set to SalesInvoice, commit set to false initially, and all required fields: companyCode, date, customerCode, addresses, and lines with itemCode and taxCode
POST to /api/v2/transactions/create and receive the transaction back with calculated tax details on each line
Review the tax details and if correct, commit the transaction by calling POST /api/v2/companies/:companyCode/transactions/:transactionCode/commit
Store the returned id and transactionCode in your order record for future void or adjustment operations
For returns or cancellations, use POST /api/v2/transactions/create with type set to ReturnInvoice and reference the original transactionCode in the referenceCode field
Known gotchas
Transactions created with commit: true in the initial CreateTransaction call bypass the two-step flow; ensure your checkout is ready to commit before doing this as uncommitting requires admin intervention
The taxCode on each line item determines the taxability; using the wrong taxCode for a product category can result in incorrect tax rates being applied
Avalara reconciles committed transactions for filing; voiding a committed transaction after a filing period has closed requires a ReturnInvoice rather than a void
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