According to the Swiss Federal Act on Currency and Payment Instruments “Everyone is obliged to accept up to 100 Swiss regular issue coins in payment” and “Everyone must accept Swiss banknotes in payment without restriction”. You can find these rules here:
https://www.admin.ch/opc/en/classified-compilation/19994336/index.html
All merchants and individuals doing business in Switzerland are legally obligated to accept coins and banknotes issued by the Swiss National Bank in keeping with the laws on legal tender. In practice, some merchants are not particularly keen on accepting very large-denomination banknotes (such as CHF 1000 notes) or small-denomination coins. However, they are legally obligated to do so. In keeping with the legal requirements, serious online stores should accept payment in cash (via a cash deposit, for example).
Obviously, Swiss law normally does not apply to merchants outside of Switzerland. In the US, for example, merchants are not required to accept any one means of payment for goods or services, so if you shop online at stores in the US, you may be limited to paying via a specific financial service.