Sen. Chuck Schumer has been in talks with the chief executive of Grubhub over bogus fees the food-delivery giant has been charging restaurants nationwide — and is demanding that the company cough up refunds going back for years.

In an exclusive interview with The Post, Schumer said he spoke with Grubhub CEO Matt Maloney last week about the company’s longtime practice — first exposed by The Post in May — of charging restaurants fees for phone calls that didn’t result in food orders.

Grubhub, which owns Seamless, has admitted that it has collected fees for orders that haven’t happened, but company reps at a New York City Council hearing last month said they were offering only 60 days’ worth of refunds.

Schumer told The Post that Grubhub’s 60-day solution is “not fair,” and is pushing for the company to return all commissions it shouldn’t have collected.

According to the senator, Maloney told Schumer “there are algorithms” that calculate the controversial fees, which restaurants say can range between $5 and $9 for a single phone call.

“I said, ‘Well, you can’t blame the customer or the restaurant for your algorithms,’” Schumer told The Post.

Congress has no specific regulatory authority over Grubhub or other food-delivery companies, but Schumer said that he could recommend an investigation by the Federal Trade Commission or introduce laws that could limit its current trade practices.

“He said he wanted to do this as quickly as possible and I hope to have another chat with him in the next week or two,” Schumer said of the Grubhub boss. “The first step would be to try to get them to fix it themselves. That’s the quickest and best if they really do it.”

Grubhub hasn’t yet agreed on how much it will refund restaurant owners, according to a person familiar with the discussions.

Schumer is likewise demanding transparency from Maloney into Grubhub’s contracts with restaurants, as well as allegations reported by The Post that Grubhub has set up tens of thousands of we sites to take orders for restaurants — competing with the restaurants’ own sites and tacking on fees in the process.

“Charging restaurants when they didn’t make the service, and these fake websites, which claim to be from the restaurant — but are not — are wrong,” Schumer said.

GrubHub says it set up the web sites to help its restaurant clients and gets permission to do so from its contracts.

Last year, Grubhub made about $30 million from phone orders, Kevin Kearns, a senior vice president at the company, said at last month’s city council hearing.

It’s unclear how much of Grubhub’s revenue comes from the sham orders and whether they have been higher in previous years.

Brendan Lewis, a Grubhub spokesman, said “there would be no ‘changing’ of our algorithm” — because that would be “inferring there is something wrong that needs to be fixed.”

Lewis confirmed that Maloney spoke with Schumer but denied that the pair were discussing expanding refunds being doled out to restaurants.

“Among the topics discussed were correcting misperceptions in the press about our operating model, how best to address the issues raised by the senator, and our commitment to providing restaurants with the tools and transparency to help build their business, and diners with fair and transparent pricing,” Lewis said.