Good topic. One thing that bites invoice generators hard on the Canada leg is that the tax depends on the buyer's province and on what the product is, so the same line item can total differently on two invoices that look identical. Manitoba is a good example. Groceries are 5 percent GST only while general merchandise is 5 percent GST plus 7 percent RST, so a category error quietly changes the total. Quebec has its own quirk. The QST is calculated on the price before GST is applied, not on the GST inclusive amount, so adding the two rates together overstates the tax. When a buyer in Ontario gets a 13 percent HST total on an invoice from a seller in Alberta, support tickets follow if the invoice does not show the breakdown. TrueNorth API has a calculate tax endpoint that covers all 13 provinces and territories with 41 product tax categories, which fits this use case well since you can resolve the tax per line item before the PDF renders.
Good topic. One thing that bites invoice generators hard on the Canada leg is that the tax depends on the buyer's province and on what the product is, so the same line item can total differently on two invoices that look identical. Manitoba is a good example. Groceries are 5 percent GST only while general merchandise is 5 percent GST plus 7 percent RST, so a category error quietly changes the total. Quebec has its own quirk. The QST is calculated on the price before GST is applied, not on the GST inclusive amount, so adding the two rates together overstates the tax. When a buyer in Ontario gets a 13 percent HST total on an invoice from a seller in Alberta, support tickets follow if the invoice does not show the breakdown. TrueNorth API has a calculate tax endpoint that covers all 13 provinces and territories with 41 product tax categories, which fits this use case well since you can resolve the tax per line item before the PDF renders.