The vending machine at Hiroshi Nishitani’s Tokyo ramen restaurant has been reliable for a decade. Customers feed it money, and it prints out their orders while he makes fresh noodles in the kitchen. The food is served within minutes once the customer delivers the order to the pair of cooks at the counter.

But the machine’s days are numbered. Japan is set to introduce a new set of bank notes this summer, something it does every 20 years or so to thwart counterfeiters. The machine, already too old to accept recent coin designs, won’t accept the new bills, Mr. Nishitani said.

“There’s nothing wrong with the vending machine,” he said, expressing frustration with the need to buy an expensive new unit compatible with the new notes.

All over Japan, restaurants, cafeterias, bathhouses and other businesses are facing a similar prospect. The country has 4.1 million vending machines, according to Nikkei Compass, a database for industry reports. Many of them will be obsolete once the new 1,000-, 5,000- and 10,000-yen bills roll out in July featuring hologram technology.

In Japan, where the work force is shrinking, the machines reduce the need for cashiers and servers. Among the most reliant on the machines are ramen shops, which serve one of the Japanese working class’s favorite, most affordable meals.