I’ve worked for almost 10 years as a contractor for US companies and never paid tax to the American IRS, instead always to the Canadian CRA.
For the first time, a US-based company I’ve done contracting work for asked me to fill out a W-8BEN IRS tax form, so I did a bit of research.
First off, I asked my Canadian accountant about it and they pointed out they’re not licensed to officially help me with it (I could find another accountant for that).
I found a blog post by The Balance about filling out the W-8BEN, pointing out that the US and Canada have had a treaty for nearly 30 years, in which most income made by Canadian contractors for work for US employers should be taxed in Canada. An exception to that is if the Canadian is actually living in the US, obviously. Also, if they’re actually an employee making over $10,000 each year, they may need to pay that to the US IRS.
And here’s the treaty between Canada and US: canada.pdf. Article 14, paragraph 1 is where it says I shouldn’t pay any tax to the US for doing “independent personal services” (ie, work as a contractor).
Hope this helps someone else (or me in the future once I forget this info!)