Investors are hoping that 2023 will be much friendlier to the stock market than what they have had to endure this year. However, that is by no means a guarantee. Several economic problems could carry into the new fiscal year, to say nothing of the fact that some experts are still predicting a recession.

Of course, perhaps the economy -- and equity markets -- will fully recover in 2023. Regardless of which scenario transpires, there are excellent stocks worth buying and holding onto. Let's consider two examples: Adyen (ADYE.Y 0.53%) and PayPal Holdings (PYPL 0.64%).

1. Adyen

Netherlands-based Adyen is a leading payment processing specialist. Although it operates in a competitive market, the fintech giant has become successful by offering businesses payment capabilities that cater to e-commerce and brick-and-mortar channels. The company also provides various other financial services, such as risk management, all on the same platform.

Adyen makes its money by charging transaction-related fees to its clients. That's a problem in today's economy. With challenging issues such as inflation, consumers are spending less money, businesses are running fewer transactions, and companies like Adyen are likely to be affected. But even with the economic slowdown, Adyen is performing well.

In the first half of the year, the company recorded 345.8 billion euros ($360.1 billion) in processed volume, representing a 60% year-over-year increase. Adyen's revenue of 608.5 million euros ($633.72) increased by 37% year over year, while its net income came in at 282.1 million euros ($293.8 million), an improvement of 38% compared to the year-ago period.

If Adyen can perform that well amid an economic slowdown, why are its shares substantially lagging the market over the past year? Perhaps one key reason behind its recent poor performance has been the company's valuation. Its price-to-sales (P/S) ratio stood around 16 a year ago, but it has now fallen to a more reasonable 5.9. 

That's still a bit high: The S&P 500's P/S ratio was 2.3 as of July.

Regardless, economic cycles will do little to hinder the company's long-term opportunities. In the first half of the year, Adyen generated a bit over 50% of its revenue from Europe. But the company's top line in North America grew more rapidly -- to the tune of 52% year over year compared to 30% in Europe.

Adyen's results can improve as its adoption increases in North America and other regions and as digital methods of payment continue to grow in popularity. The space will expand at a compound annual growth rate of 24.4% through 2026, according to some estimates. It likely won't reach a ceiling for decades either, given global growth trends in smartphone adoption and e-commerce.

Adyen's goal is to increase its revenue at a CAGR between the mid 20s and the low 30s in the medium term. Even with a struggling economy and a relatively dim outlook for 2023, Adyen's growth trajectory won't change substantially. That's why the company's shares are worth purchasing for next year and beyond, even at a slight premium

2. PayPal

The continuing digital payments revolution is also good for PayPal, one of the leading online wallets. The company has faced its share of issues this year, especially as its pandemic-related boom has cooled. PayPal is not growing its user base as fast as it did amid the outbreak's peak.

The company had 432 million total active accounts as of Sept. 30, an increase of 4% year over year; it added 2.9 million net new accounts (NNAs) in the third quarter. By comparison, in the third quarter of 2021, PayPal added a much more impressive 13.3 million NNAs. Going back further, the fintech specialist racked up 15.2 million NNAs in Q3 2020. Should investors worry about this decline? Not in my view.

The pandemic accelerated PayPal's adoption, and it isn't surprising that things slowed down once these dynamics subsided. Also, PayPal is processing billions of dollars' worth of transactions. In the third quarter, the company's total payment volume jumped by 9% year over year to $337 billion. PayPal is accepted by 80% of the 1,500 largest online retailers in the U.S. and Europe.

Note that the company reported a 76% adoption among these same retailers as of the end of the fiscal year 2021 -- well above that of any of its competitors -- which means it has increased by 4% since then. There is a crucial reason why PayPal can continue gaining traction among merchants, and that's the company's network effect.

More merchants plugged into its ecosystem attract more customers and vice versa, granting the fintech giant a potent competitive edge. Just like Adyen, PayPal will benefit from powerful long-term trends, including the growth of the e-commerce sector and cash displacement. Whether or not 2023 brings another economic meltdown that affects PayPal, it will do little to derail its long-term plan.

That's why investors should stick with PayPal in 2023 and beyond