The SodaStream International (NASDAQ:SODA) stock story is coming to a close.

The Israeli maker of DIY sparkling-water machines has agreed to sell itself to PepsiCo (NASDAQ:PEP) for $144 a share or $3.2 billion, bringing to an end SodaStream's wild ride on the public markets.

After debuting at $24.75 per share in 2010, the stock quickly ran up into the $70 range on big hopes for the company's takeover of the U.S. market. However, after brief success, the product seemed to turn into a fad as SodaStream overestimated demand during the 2013 holiday season, which led to a period of falling profits and revenue declines.

The share price fell into the teens as the company announced a turnaround strategy, banking its future on rebranding as a sparkling-water brand. Bucking the conventional wisdom on Wall Street, the strategy paid off, as SodaStream has consistently outpaced analyst estimates in recent years, with the stock up nearly 1,000% over the last three years.

Two glasses of cola sit on a table.

Image source: Getty Images.

Pepsi's buyout is just an 11% premium over SodaStream's closing price last Friday, but 32% higher than its 30-day volume-weighted average price. Talks were likely underway before SodaStream shares surged early this month on its second-quarter earnings report.

Pepsi said SodaStream would fit in well with its Performance with Purpose plan, which aims to sell more nutritious products and reduce its environmental footprint, and Pepsi's incoming CEO, Ramon Laguarta, said, "SodaStream is highly complementary and incremental to our business, adding to our growing water portfolio, while catalyzing our ability to offer personalized in-home beverage solutions around the world."

SodaStream CEO Daniel Birnbaum summed up the benefits of the deal, saying in a press release:

Today marks an important milestone in the SodaStream journey. It is validation of our mission to bring healthy, convenient and environmentally friendly beverage solutions to consumers around the world. We are honored to be chosen as PepsiCo's beachhead for at-home preparation to empower consumers around the world with additional choices. I am excited our team will have access to PepsiCo's vast capabilities and resources to take us to the next level. This is great news for our consumers, employees and retail partners worldwide.

SodaStream bulls have long talked about an acquisition as a potential endgame for the countertop-soda-maker company. In fact, Pepsi tested a partnership with SodaStream back in 2014, selling several different flavors of SodaStream syrups, and Starbucks was also rumored to be taking a stake in the soda maker back in 2014, though a deal never went through.

A deal back then seemed to make sense. SodaStream shares were flagging, and Coca-Cola had just acquired a stake in Keurig Green Mountain, with plans to launch its own at-home soda maker, creating a formidable rival. Keurig Green Mountain was since bought out by JAB Holding and is now part of Keurig Dr Pepper.

Today, however, a sale seems to make less sense for SodaStream shareholders.

The fizz goes flat

Before the Pepsi deal was announced, SodaStream stock had gained 120% over the past year, as the soda maker has become one of the best under-the-radar stocks on the market.  

Since the initial growth story went flat, Wall Street has widely ignored SodaStream's comeback as it has consistently smashed analyst estimates in recent quarters, a sign that the market keeps underestimating its growth potential.

In its second quarter, for example, SodaStream's revenue jumped 31% to $171.5 million, much better than estimates at $149.2 million, while earnings per share surged 82% to $1.14, crushing expectations at $0.71. 

Meanwhile, the company is executing on all of its business segments and strategic initiatives. Revenue grew by 32% or more in its three biggest regions -- Western Europe, Asia-Pacific, and the Americas. It saw strong growth in both starter kits and consumables, and sales of both flavors and CO2 cartridges were on the rise.

Gross margin improved 620 basis points to 59.3%, a sign of the company's operating leverage and the strength of the razor-blade model, and the company raised its full-year guidance significantly.

CEO Birnbaum called the quarter "the most successful in our company's history," and that was no exaggeration. Given the company's strong momentum and the market's chronic undervaluing of the stock, as a shareholder, I'm disappointed to see SodaStream selling out for just an 11% premium.

Companies generally agree to be acquired when growth has been stagnant or they are struggling with a transition, much in the way Whole Foods was when Amazon took it over. Companies with promising growth ahead of them, like SodaStream, on the other hand, tend to want to remain independent and grow their market value.

I have no doubt that Pepsi's marketing and distribution muscle will only make SodaStream bigger and more profitable, but that's only one more reason that the buyout price should have been higher.

Pepsi is getting a bargain here, as even at $144 a share, SodaStream is valued at a P/E of less than 30 based on next year's estimated earnings.

SodaStream investors may be pleased to see a pop in their portfolios today, but the long-term story likely would have been better had the company remained independent.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Jeremy Bowman owns shares of SodaStream and Starbucks. The Motley Fool owns shares of and recommends Amazon and Starbucks. The Motley Fool owns shares of SodaStream. The Motley Fool has a disclosure policy.