No, it is generally illegal in New York State for merchants to add a surcharge for credit card use.
According to the New York State Department of Financial Services (DFS): "A merchant may not impose a surcharge on a consumer for using a credit card." This prohibition is rooted in the state's General Business Law § 518.
There are narrow exceptions, such as when a surcharge is required by law or possibly for certain government/educational entities, but these are rare and specific. Standard retail and service businesses cannot impose them.
If you believe you've been illegally surcharged, you can file a complaint with the NY Department of Financial Services. Violations can result in penalties for the merchant.
Bottom line: In New York, the price you see should be the price you pay with a credit card—no extra fees allowed.