Imagine this: You are standing in line at a fast food restaurant, looking at the menu to decide what to order. You decide on a plain burger for $4. The queue finishes one order, so you move up, then notice your burger now costs $4.20. The line moves again, and now it's $4.40. There are still five more customers ahead of you. What do you do?

Fast-food chain Wendy's plans to start experimenting with surge pricing next year. In an earnings call earlier this month, Wendy's CEO Kirk Tanner told investors that the company will invest $20 million in digital menus that can change item prices based on real-time demand.

"Beginning as early as 2025, we will begin testing more enhanced features like dynamic pricing," Tanner said. "We are planning to invest approximately $20 million to roll out digital menu boards to all US company-operated restaurants by the end of 2025."

Follow up story: Wendy's says surge pricing reports were "misconstrued" after internet turns Frosty

While so-called surge pricing is well established in the ride-sharing sector now, it is relatively uncharted territory in fast food, and for good reason. Surge pricing works for Uber and Lyft because even though the rider knows that prices are higher at peak times, they still need that ride, so they bite the bullet and hit "Pay."

In a fast-food restaurant, people can make dynamic decisions as fast as the menu can dynamically change prices. Wendy's customers are more inclined to walk across the street to Burger King if they see the prices get jacked up while standing in line. It's a risky move, especially with $20 million in up-front costs.

A lot will hinge upon how much price fluctuation occurs. A few cents will not bother most people, but Customer B getting charged $0.75 more than Customer A is liable to grate on their nerves, and anything over a dollar is probably in the walkout range. Consumers are already annoyed that fast food prices have spiked in recent years, with some items slipping into the double digits in locales like New York and San Francisco.

Business software analytics firm Capterra conducted a survey showing that only 34 percent of consumers think dynamic pricing is reasonable for customers, while 54 percent call it price gouging. Most (51 percent) say they have stopped eating at their preferred establishment because of price hikes. Capterra says that anything more than a 10-percent price increase will drive most customers away or incentivize them to order during off-peak hours.

Undoubtedly, Wendy's bean counters already know this, which is why the pricing scheme will start experimentally. The company will likely see what it can get away with and dial in the pricing gradually to avoid too much business loss. However, consumers can be vindictive. Knowing that the company is considering dynamic pricing might be enough to spur regular customers to avoid Wendy's altogether.

Story update: Wendy's has released a statement denying its plans to introduce surge pricing, adding that the media misconstrued what Tanner and the company's slide presentation said. You can read the full story and context here.