Thanks to the remarkable performance of the so-called "Magnificent Seven" stocks, it seems like the major market indexes continue to hit fresh all-time highs with each passing day. Investors might struggle to find attractive buying opportunities when bullish sentiment prevails.

Not all companies have rallied amid market enthusiasm. Just look at PayPal (PYPL 2.90%). Shares of the digital payments pioneer are down 81% from their peak price. In 2023, they dipped 14%, as the Nasdaq Composite index surged 43%.

Despite its terrible performance, this beaten-down fintech stock might just be the best business to add to your portfolio in 2024. That's only if you believe one very important thing.

Bullish arguments

After taking a look at the stock chart, you would think PayPal is on the brink of bankruptcy. That's just not true. In fact, this remains a successful enterprise.

PayPal reported revenue of $29.8 billion and total payment volume (TPV) of $1.5 trillion in 2023. Both were up nicely from the prior year. Even better, the company generated $4.2 billion of free cash flow, allowing the leadership team to buy back $5 billion of shares during the past 12 months. These numbers aren't indicative of a business that's floundering.

From a competitive standpoint, PayPal is in a favorable position. It has hundreds of millions of active accounts, consisting of both consumers and merchants, that create its two-sided ecosystem. This has resulted in powerful network effects, where more users immediately make things more valuable for other stakeholders.

This setup of having relationships with both consumers and merchants also gives PayPal a data advantage. It's better able to detect fraud and boost authorization rates.

You wouldn't be alone if you're sitting there scratching your head at how the shares have fared. As of this writing, PayPal's stock sells at a dirt cheap forward price-to-earnings ratio of 11.4. That's a discount to the broader S&P 500, making this a smart stock to buy in 2024 and hold for the long term.

Where the uncertainty is

Before you rush to buy PayPal shares, there is a key factor that adds a lot of uncertainty to the mix. And that's the competition.

I pointed out network effects giving PayPal a strong position. But the payments industry is so hugee, lucrative, and crowded that investors must always think about the constant threat of disruption.

PayPal might be the most widely accepted digital wallet in North America and Europe, but Apple Pay and Alphabet's Google Pay are quickly ascending up the ranks. From my experience, I always use Apple Pay when it's available, either in-store or online. The tech titan controls a top mobile operating system, which helps it front-run competing payment services.

And on the merchant side, PayPal's Braintree is registering huge growth. But other services, like Adyen, Stripe, Block, JPMorgan Chase's WePay, and Shift4 Payments, to name a few, are vying to handle larger amounts of payment volume. They all can introduce compelling features to win business, while at the same time, drive take rates lower, which can negatively impact all parties.

Investors should only buy PayPal if they have confidence that the business can maintain or increase its competitive position in the payments industry. There's a very simple way to assess this. As long as PayPal can increase its TPV, it doesn't lose a lot of users, and these users transact more on the platform every year, then the company should reward investors over the long term.

Amid heightened macroeconomic uncertainty these last couple of years, these metrics have managed to trend in the right direction. This gives me confidence that the stock, thanks to its discount valuation, can be a winner.