In a temporary victory for New York merchants over credit card companies, the U.S. Supreme Court ruled Wednesday that a state law preventing retailers from telling shoppers they are imposing a “surcharge” on credit card purchases amounts to a speech regulation that could be unconstitutional.

Chief Justice John Roberts Jr., writing for a unanimous court, said the New York law was not just a commercial regulation but a speech regulation. “What the law does regulate is how sellers may communicate their prices,” Roberts wrote. “In regulating the communication of prices rather than prices themselves, [the law] regulates speech.”