Thank you for your question.
Here is your situation.
The state where you are a resident would have the right to tax your world wide earnings regardless of where it was earned.
However, if no recipricol income tax agreement exists between your primary resident state, and the state in which you work, the state in which the income was earned is the one that gets to withhold taxes. AND you would file a non-resident return in that state.
In actuality, technicaly, withholding should be for Montana.
It does not matter where the sales are made; you are paid out of Montana, and the withholding should be for Montana.
AND you would have to file a Montana non-resident tax return.
Let me complicate things for you more. If you make sales in those other states and you accumulate 183 days in a year in any of those other states, you are also required to file a non-resident return for them as well.
Each state gives you credit for paying taxes to the other.
Here is the Montana rule on this: Taken from the Montana Department of Revenue, I quote: "...If you are a resident, nonresident, or a part-year resident,you have to file a Montana individual income tax return when you have Montana source income....."
Part of he definition of Montana Sourced Income is that it is income paid by an employer that has a physical presence and located within the boundaries of Montana.
When one starts examining all the state laws, you find they work in concert with each other to ensure that anyone who can, will be able to grab a piece of your paycheck.
how does that happen? well,,,,every year there are governor's conventions and Mayors conventions in the united states. During these conventions, they have break out sessions and training, often conducted by prominent politicians and university professors say from Harvard, Cornell, and so forth. As time goes on, more and more processes, policies and laws are changing to correlate with each other and begin to carry a common theme.
Thanks. Best of luck to you.