Shares of GrubHub soared more than 25 percent on Wednesday, following a strong second-quarter earnings report and the company's announcement it would acquire mobile ordering and mobile payments platform LevelUp.

The gains pushed GrubHub's shares to an all-time high of $138.85 per share during regular trading.

The online food ordering company beat on earnings and revenue for the fourth consecutive quarter, according to FactSet. GrubHub surpassed $1 billion in quarterly gross food sales, up 39 percent year over year, and tallied 15.6 million active users in the quarter — a 70 percent increase from a year ago.

“There’s $200 billion annually in pickup and delivery spend just in the U.S. that’s migrating online,” GrubHub CEO and founder Matt Maloney said on CNBC’s “Power Lunch.”

“You are seeing tremendous growth in our sector and we’re the leader, and we created the whole category, and we continue to push the boundaries, now, so we’re in a great place to receive a significant amount of that offline-to-online transition,” he added.

Concurrently with its earnings report, GrubHub announced it would acquire LevelUp for $390 million cash.

"Earnings were a fantastic beat, but the majority of this move is LevelUp. It improves their competitive long-term positioning,“ Guggenheim Partners’ Matthew DiFrisco said.

Maloney said the company hopes LevelUp's restaurant-facing technology will help GrubHub "provide the most comprehensive solution for restaurants, powering everything from online demand generation to fulfillment for restaurants."

Whereas previous acquisitions, such as Eat24 in October 2017, were intended to help GrubHub scale, LevelUp is about strategic positioning and technological integration. Point of sale (POS) integration is LevelUp's core competency, which means LevelUp could help GrubHub push orders directly through restaurants' POS systems.

"The end game of this is that GrubHub would be the only POS partner, as opposed to sharing the delivery system” with others, such as Caviar, DoorDash and Uber Eats, DiFrisco said.

GrubHub also expects LevelUp, which offers a platform for managing ordering, payments and loyalty, to help accelerate and deepen the company's integration with national restaurant brands, including KFC, Taco Bell, Bareburger and Roti. GrubHub said LevelUp will also provide restaurants with customer relations management and analytics tools to help engage with and attract potential diners.

The potential acquisition is still subject to standard closing conditions, including a U.S. antitrust waiting period. The transaction is expected to be funded through cash on hand and existing credit.