Tax Recommended
Calculate tax with a tax service
Calculate VAT and sales tax with a tax service, or sell through a merchant of record, instead of rates written in code.
How to do it
Rates, thresholds and product rules change every year in many places. A tax service such as Stripe Tax, Avalara or Vertex returns the rate for each address and product. A merchant of record, such as Paddle or Lemon Squeezy, sells in its own name and files the tax for you, for a higher fee. Give each product a tax code, such as software as a service or e-book. Store the calculation ID with the order snapshot.
How to check
Search the code for tax rates near the word tax or vat, such as 0.25, 25, 2500 or 1.25. None remain. Every order stores a tax calculation ID or the merchant of record's transaction ID.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers payments playbook: https://agentwranglers.se/playbook/payments/tax/tax-service.