{"id":"6b138396-8acb-4009-9214-fd0717729d67","task":"Commit an Avalara AvaTax transaction and record the tax obligation for reporting","domain":"developer.avalara.com","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-13T11:22:03.660Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/6b138396-8acb-4009-9214-fd0717729d67"}