One helpful fact to remember during market downturns is that patience is an investor's best friend. That can be hard to keep in mind when the stock market is struggling, and this is the situation we're currently experiencing. But over the long term, market pullbacks always come with the opportunity to add shares of great companies on the dips. Having the grit to hold onto shares through thick and thin -- even when they're temporarily dropping -- will pay off eventually.

Let's look at two beaten-down stocks worth investing in today: Veeva Systems (VEEV -0.71%) and Adyen (ADYE.Y -15.43%). If you have $5,000 handy that you aren't saving for a rainy day, putting that money in these stocks could be a great move.

1. Veeva Systems

The most successful companies offer products or services that make life easier for their customers, and Veeva Systems does precisely that. This software-as-a-service (SaaS) specialist targets the life sciences industry. It offers a suite of tools that help its clients comply with the extensive regulations in this sector and get their products to market faster and more efficiently.

Multibillion-dollar companies like to save money, too, and that's why Veeva Systems' services are so essential to the everyday operations of many of the most prominent players in life sciences, including pharmaceutical and biotech giants such as Bristol-Myers Squibb, Novo Nordisk, Eli Lilly, AstraZeneca, and more.

Businessperson and physician shaking hands.

Image source: Getty Images.

One major strength of Veeva Systems' business is its high switching costs. The company's clients rely on its services daily, and switching to a competitor would be costly, time-consuming, and potentially disrupt the flow of operations. Veeva Systems routinely records high retention rates for its subscription services.

Veeva Systems generally reports robust financial results. During its fiscal 2022 -- which ended on Jan. 31 -- total revenue of $1.9 billion increased by 26% year over year. The company's net income grew by 12.5% year over year to $427.4 million. For its fiscal 2023, which will end on Jan. 31, 2023, Veeva Systems expects revenue between $2.160 billion and $2.170 billion.

At the midpoint, that would represent a year-over-year increase of about 17%.

Beyond the next fiscal year, one major reason why Veeva Systems could deliver solid returns is that there remain plenty of opportunities in the massive (and growing) $6.6 trillion life sciences industry. While there are plenty of SaaS companies around, Veeva Systems is the leader in its narrow niche of the market that specifically targets life sciences.

With a solid competitive edge based on switching costs and plenty of room to grow in the market, the company looks like a solid, long-term bet. True, the company's shares aren't cheap -- they currently trade at a forward price-to-earnings (P/E) ratio of 38 while the S&P 500's average forward P/E is about 19.

Veeva Systems may be volatile in the near term due to its rich valuation metrics, but for those who are in it for the long haul, the company looks set to be an excellent stock to hold through these challenging times. 

2. Adyen

Adyen is a fintech specialist based in the Netherlands. The company helps facilitate payment transactions by providing its clients with payment gateways, point-of-sale systems, payment processing, and risk-management services.

Multinational corporations often have to deal with multiple companies that offer these individual services from one region to another. Adyen makes accepting payments in many different parts of the world easier by combining all of these services into a single platform. The result? Flexible and reliable payment solutions that increase efficiency.

Adyen's services have become invaluable to many giant corporations, including Spotify, Uber, and many others. Last year, Adyen's revenue soared by 47% year over year to 1 billion euros ($1.08 billion), on the back of its processed volume increasing by 70% year over year to 516 billion euros ($556.22 billion). The company's net income came in at 469.7 million euros ($506.3 million), nearly 80% higher than the year-ago period.

Here are two reasons why Adyen has a bright future. First, the company arguably benefits from a solid moat -- namely, high switching costs. The ability to process payments reliably is integral to the day-to-day operations of any company. Given that Adyen offers an entire suite of otherwise fragmented services in one platform, its customers can't easily decide to jump ship.

Second, the industry in which Adyen operates is still on an upward path. According to some estimates, the digital-payments market will expand at a compound annual growth rate of 20.5% through 2030. Having built a solid position in this market, Adyen is well-positioned to be one of the beneficiaries of this continued switch toward online payments.

Adyen isn't a cheap stock either, sporting a forward P/E of 72. In my view, the company will justify its valuation in the long run (think five years or more). However, it will remain vulnerable in the short run. Invest accordingly.