A US company is free to cut off service to whatever foreigner it wants, just like a foreign country is free to ban whatever US firm it wants from operating in it.
Can you link an article or at least mention some more keywords? A super vague search query based on this information, like "costa rica banning us firm consequences", isn't turning up anything that sounds relevant
> The US government is not free to use frivolous sanctions to indirectly make payment processors stop serving a foreigner.
You may regard them as such, but they are not in any sense frivolous. It is the law that if-x-then-y, it's not a discretionary item that one interprets. And to be clear, these are not "indirectly" making payment processors stop serving the person, it is very clearly direct and you do not, as a company, have a choice in the matter.
1. The law in question does not compel the US Government to bend over backwards to protect foreign nationals from prosecution for war crimes.
2. The US Government plays incredibly fast and loose with laws that compel foreign policy from it. If its adherence to them is discretionary, you can absolutely piss on it for being discretionary in this case.