I know that this won't be the be all end all answer to this question. However, based on the information online there are no concrete answers in regards to how SaaS companies are taxed and where they pay their taxes too.
Same as any other entity (or person).
Entity pays taxes in it's domicile jurisdiction.
Best you talk with a tax preparer in your home country to ensure you have all the details.
And... If you're a US citizen + your SAAS company is generating massive cash, likely best to organize your entity in a low tax jurisdiction, like Bermuda which is home to Google, Intel, Verizon, etc.
And... best wait till Trump's new tax bill passes. If he has his way, corporate taxes may drop to a point low enough to keep your business in the US.
Great question, when it comes to business federal taxing they are taxed as any other but as a virtual service provider (non-physical) every state has a different law on that. The general idea is that some states don't have an import or sales tax law and or out of state law - so technically speaking you may have to file taxes completely differently than any other business out there because each state may vary.
If you end up having to send a tech to that area, you may have to to file especially for that state - I'm not a tax professional and you may have to talk to a tax expert in this field. One of the tax preparers I trust is Perla, she owns a bookkeeping & tax service - email@example.com
As an example, when I file taxes because provide consultancy services that are not physical or create software that does not transfer to any physical object I don't have to file separately on states unless I happen to send something to them - then I would have to file for that state.