It's been a tough year for PayPal (PYPL -0.32%) investors. The stock peaked late last year after riding the wave of pandemic-related digital payments adoption, but since then, it has slumped by 69%. As the tailwinds from the past couple of years died down, PayPal's management was forced to change gears, spooking investors and driving the stock downward.

Yet there was a slew of surprises and plenty to like in PayPal's second-quarter financial report released on Tuesday after the market closed. Which raises the question: Is PayPal stock a buy? Here's what investors need to know.

A sigh of relief

PayPal's second-quarter financial results weren't as bad as many feared, sparking something of a relief rally. Net revenue of $6.8 billion grew 9% year over year and was up 10%, excluding foreign currency headwinds. Excluding the ongoing transition away from eBay, revenue climbed 14%. This resulted in adjusted earnings per share (EPS) of $0.93, down from $1.15 in the prior-year quarter.

To give those numbers context, analysts' consensus estimates called for revenue of $6.8 billion and adjusted EPS of $0.87, so investors were pleased with the results.

Other metrics pointed to the continued strength of PayPal's underlying business. Total payment volume (TPV) rose 9% year over year, or 13%, excluding foreign currency headwinds, and total payment transactions climbed to 5.5 billion, up 16%. Finally, PayPal added roughly 400,000 net new active accounts (NNA), up 16% year over year, while the number of transactions per account during the trailing-12-month period increased to 48.7, up 12%.

This all shows that while PayPal's growth has shifted into a lower gear, it's still growing.

A startling revelation

After weeks of rumors and innuendo, PayPal confirmed that activist investor Elliott Investment Management had taken a sizable $2 billion stake in the company. In its financial release, PayPal included a statement from Elliott Investment's managing partner Jesse Cohn: 

As one of PayPal's largest investors, with an approximately $2 billion investment, Elliott strongly believes in the value proposition at PayPal. PayPal has an unmatched and industry-leading footprint across its payments businesses and a right to win over the near- and long-term.

PayPal also said it had entered into "an information-sharing agreement" with Elliott. The tone of the statement signaled that PayPal and the activist investor were making nice -- at least for now.

Reining in spending

That's not all. PayPal revealed that it had undertaken a "comprehensive operational review" to lower expenses and make the company more efficient. As a result, management identified roughly $900 million in cost savings for the current fiscal year. Perhaps more importantly, those savings balloon to at least $1.3 billion in 2023. PayPal said it would reinvest a portion of the proceeds in "high-conviction growth opportunities" while expanding its operating margin. 

PayPal also revealed that the board of directors had authorized a robust capital return program, including a new $15 billion share repurchase plan. PayPal has already completed $2.25 billion in buybacks so far this year, representing roughly 95% of the company's free cash flow, and expects repurchases to reach about $4 billion by the end of the year.

Is PayPal stock a buy?

This all leads us back to the original question: Is PayPal stock a buy?

There's no denying that e-commerce purchases have slipped as in-store shopping returned. Furthermore, the onset of the bear market made it clear that PayPal users -- particularly those at the lower end of the income spectrum -- were feeling the pinch of inflation, causing spending to fall and ultimately hurting its bottom line.

PayPal has already taken a number of steps to streamline its business, reignite growth, and ramp up cost-cutting. The company reacted to the current environment by focusing on increasing the engagement of its existing users, making them more valuable rather than chasing new, lower-yielding users. PayPal has also slowed hiring and reduced existing staffing levels.

Management appears to have taken many of the steps necessary to achieve these goals, and its efforts appear to be bearing fruit. PayPal raised its full-year outlook and is now guiding for adjusted EPS in a range of $3.87 and $3.97, up from its previous guidance of between $3.81 and $3.93.

Additionally, PayPal is currently trading at a historically low valuation, selling for less than four times forward sales -- near its all-time low.

If you believe, as I do, that digital payments will continue to gain ground, PayPal is well positioned to benefit from the trend and is the clear choice as the original -- and still dominant -- fintech platform. That, and its bargain basement price, makes PayPal stock a buy.