Good topic. The lookup table approach works until you hit the edge cases that a flat province rate cannot express. A few that caught me building for Canada: Manitoba charges only 5 percent GST on groceries but 5 percent GST plus 7 percent RST on general merchandise, so the same buyer in the same province gets two different totals depending on the product. In Quebec the QST is 9.975 percent but it is calculated on the price before GST is applied, not on the GST inclusive amount, so you cannot just add the two percentages together. And any table you hardcode in TypeScript starts drifting the moment rates or categories change, so version it or fetch it at runtime. One more thing that matters for invoices: the tax follows the buyer, not the seller, so validating the delivery address before you compute is what keeps the province lookup honest. If you ever want to skip maintaining the table, TrueNorth API has a calculate tax endpoint that covers all 13 provinces and territories with 41 product tax categories, plus an address validation endpoint for exactly that buyer location problem.