New York City just got more expensive and almost no one noticed.

A long-running court battle that ended in January gives New York merchants the right to charge extra for credit card purchases as long as the pricing is clear.

Instead, some businesses are slipping in sneaky fees or trumpeting non-existent cash “discounts.”

“Pay by Cash and Save!” read one notice at AlMar, an Italian restaurant in Dumbo.

But the cash tab for the portobello mushroom panini was $14.50 — exactly the price on the menu — with no discount. Paying with a credit card added 4 percent to the price.

One AlMar patron griped on Yelp that the surcharge came as a surprise.

“We didn’t find out until they’d already processed our cards,” the diner wrote in February.

Many businesses say they need to charge extra to be able to pay the 2 to 4 percent fees they must fork over to credit card companies. But the surcharges have not gone down well at other establishments.

“Wonderful meal. Unfortunately, it was ruined by the 4 percent credit card surcharge,” one patron of the Taverna Kyclades in Bayside posted on Yelp earlier this month.

“They have a $4 ‘technology fee’ for using a credit card. This is ridiculous and they tried to tell us that everyone is supposedly doing this,” said another Yelp reviewer in February of Spanglish NYC in Bayside. “We won’t be returning here because of the fee.”

Spanglish quickly discontinued the surcharge and instead offers a discount off the menu’s prices for paying cash.

“I was getting too many complaints,” said David Arias, the restaurant’s owner. “Customers are not familiar with these charges.”

The consumers have reason to complain.

Adding a surcharge as a percentage of the tab is still illegal even though the Court of Appeals said extra fees are now allowed.

Under the new rules, the higher credit card price is supposed to be listed in “dollars and cents” on the menu or price tag or sign in order to avoid consumers having to do the math on the upcharge themselves, according to the state Attorney General’s Office.

Businesses are then free to offer a real cash discount off the higher, credit card price, the AG’s Office said.

“In concrete terms, the way this works is that the customer sees the highest possible price, inclusive of the credit card fee, typically 3.5 percent,” said Jonathan Razi, CEO of CardX, a Chicago-based credit card processing company.

But many businesses are mistakenly executing the new rules, or openly flouting them.

At Sal’s Pizzeria on Court Street in Cobble Hill, Brooklyn, a pie or slice came with a stomach-­churning 7 percent credit ­card surcharge that was not disclosed on a sign or the menu. The pizzeria does note there is a $1 “cup usage” fee for tap water.

Interestingly, at Mama Maria’s, an Italian restaurant next door with the same owner that was given a makeover on Gorden Ramsay’s “Kitchen Nightmares” show, there was no surcharge.

Some merchants are camouflaging the credit card surcharge by calling it a “non-cash adjustment” or “svc fee.” Others are writing it in tiny type on the menu or in barely noticeable signs that blend in with other notices.

Those who violate the law could face a fine of up to $500 or up to one year in jail or both, according to the AG’s Office.

Michelle Leonard, who was entering Taverna Kyclades for dinner Friday night, said she was unaware of the credit card surcharge and began digging in her purse to see how much cash she had on hand.

“This really pisses me off,” Leonard said. “Who likes to be overcharged?”

Hair and nail salons and delis are among the businesses that are now charging more for using plastic — often adding the surcharge incorrectly.

“There’s so much confusion,” said Peter Freeman, a co-owner of Brooklyn Farmacy & Soda Fountain. “I barely understand it and we were part of the case.”

The Carroll Gardens ice cream shop joined four other businesses in suing the New York Attorney General’s Office in 2013 for the ability to list a single price for an item — and to then add a surcharge as a flat fee or a percentage.

The case went to the US Supreme Court and back to the state Court of Appeals. It concluded in January.

With the case resolved, businesses can jack up prices to cover the increasing fees they pay to banks to accept credit cards.

“We buy ice cream. Right after ice cream, credit card fees are our biggest expense,” he said.

Freeman said he was struggling with how much to charge for his sundaes and scoops.

“We don’t want to just raise our prices,” he said. “That may be what we have to do.”

Businesses are trying to deal with exploding credit card use. Spending on plastic issued by Mastercard and Visa, including debit and prepaid cards, accounted for $6.021 trillion in 2018, a 9.5 percent increase over the previous year, according to the Nilson Report, an industry newsletter.

Smaller mom-and-pop shops often pay higher processing rates than national chains.

“Why is it that huge corporations have to make money off our backs?” said Alfredo Miccoli, the co-owner and chef at AlMar. “Why do I need to lose 4 percent at the end of the year because people use cards?”

William Degel, the owner of Uncle Jack’s Steakhouses in Manhattan and Queens, said the business has been hammered by credit card fees, labor costs and other expenses.

He added a 2.99 percent charge for plastic, noting the surcharge on the menu, which lists the cash — not credit card — price for food. He said lawyers and credit card processing companies told him it was kosher to do it that way.

“If we’re being misinformed, that’s horrible,” Degel said. “I never want to hurt the customer either.”