At the onset of the pandemic, PayPal Holdings (PYPL 2.90%) reported turbocharged growth as business closures and social distancing drove consumers online. But its momentum faded as high inflation stunted discretionary spending, so much so that management nixed its medium-term financial targets.

Many investors interpreted that as a sell signal. PayPal stock had already started falling in response to economic uncertainty, but the sell-off accelerated when the company revised its outlook. That downward pressure has never really abated as PayPal has seen its share price slip 14% year to date, despite strong gains across the S&P 500, and the stock now trades 80% below its record high.

Many Wall Street analysts see that as an opportunity. PayPal has a consensus buy rating, and its median 12-month price target of $69.83 implies 14% upside from the current share price. But Morningstar analyst Brett Horn is especially bullish -- his price target of $135 per share implies 120% upside for PayPal shareholders.

With that in mind, the S&P 500 is less than 2% below a new record high (and a new bull market), a milestone that typically signals a period of sizable gains across the stock market. Is now a good time to invest in PayPal?

PayPal reported solid financial results in the third quarter

PayPal beat consensus estimates on the top and bottom lines in the third quarter. Revenue rose 8% to $7.4 billion on double-digit increases in transactions and payment volume. Non-GAAP net income jumped 20% to $1.30 per diluted share as the company continued to prioritize cost controls and repurchase stock. But the new CEO Alex Chriss sees room for improvement.

"I believe our cost base and complex structure is slowing us down," he said on the earnings call in November. "We have opportunities to accelerate our revenue growth while reducing our expenses." Chriss also enumerated three areas where the company will focus investments: (1) digital wallets for consumers, (2) branded PayPal checkout solutions for small businesses, and (3) unbranded checkout solutions like Braintree for large enterprises.

PayPal is the market leader in online payment processing

PayPal benefits from a data advantage arising from its two-sided network. Specifically, most processors form relationships with merchants, but PayPal offers financial products to merchants and consumers, meaning it has a deeper understanding of consumer preferences and purchase habits. PayPal applies artificial intelligence (AI) to that information to surface shopper insights, boost approval rates, and prevent fraud for merchants.

Chriss explained that advantage on the most recent earnings call:

Our machine learning capabilities combine hundreds of risk and fraud models with dozens of real-time analytics engines and petabytes of payments data to generate insights by learning users' behaviors, relationships, interests, and spending habits. This scale gives us a very unique advantage in the market. Our ability to create meaningful profiles with the help of AI is exceptionally promising.

The upshot of that unique advantage is that PayPal is the most accepted digital wallet in North America and Europe, and it dominates the online payment processing space with more than 40% market share. For context, PayPal holds nearly twice as much market share as its closest competitor, Stripe.

That hints at high-single-digit sales growth (at a minimum) for years to come, simply because PayPal is a critical part of global e-commerce infrastructure, and online retail sales are projected to increase 8% annually through 2030. But that estimate leaves room for upside if PayPal takes share in e-commerce or gains traction in physical retail.

On that note, the company recently announced that U.S. consumers can add PayPal and Venmo credit and debit cards to their Apple Wallets and use them anywhere Apple Pay is accepted. That partnership could help PayPal gain share at physical points of sales because Apple Pay is the most popular in-store mobile payment option among U.S. consumers.

PayPal stock looks downright cheap at its current price

Brett Horn of Morningstar expects PayPal to grow revenue at 10% annually over the next decade. That estimate is reasonable given the company's strong presence in online payment processing and its commitment to more effective innovation across key product categories. In that light, its current valuation of 2.4 times sales looks cheap, especially when compared to the three-year average of 6.9 times sales.

That creates an attractive buying opportunity for patient investors, especially with the S&P 500 approaching bull market territory. But the key word is patient. There is no guarantee that shareholders will make money over the next year, and the odds of triple-digit returns are remote at best. PayPal stock is best viewed as a long-term investment.