PayPal Holdings (PYPL -1.14%) is a digital payment behemoth enabling over 1 billion transactions a month. One of the top dogs in the war on cash, the company is a cash flow machine, on pace to generate $3.5 billion in free cash flow this year. Much of this cash is returned to investors via share repurchases -- $350 million in the third quarter alone. And its strong financial position provides opportunities to acquire other companies, like its recent $4 billion purchase of Honey. Many recent acquisitions are focused on giving the company a greater international presence and tapping other payment trends like peer-to-peer transactions.

PayPal has grown into its $120 billion market cap. That gives it a higher valuation than companies like Eli Lilly and Texas Instruments. But while those two companies were founded in 1876 and 1930, respectively, PayPal was founded just 30 years ago. After changing its name from Confinity, it had its IPO in 2002.

What would it have been like to invest in that PayPal IPO? Specifically, what would it have been like to invest $10,000 in PayPal back then? Let's find out.

Keyboard letters sit on top of stacks of coins to spell out IPO.

Image source: Getty Images.

PayPal, round one

PayPal went public in February 2002 with a price of $13 per share, giving the company a market cap of less than $1 billion. The IPO was considered a success as shares shot up over 50% in its first day of trading. If you invested $10,000 then, you got 769 shares.

PayPal's time as an independent public company was short-lived though, as it agreed to a merger with eBay (EBAY 0.31%) just six months later. The merger made sense at the time. Back in 2002, eBay had $1.2 billion in annual sales and was second only to Amazon's $4 billion.And PayPal was one of the only ways to process a digital payment. Folks were still mailing in checks back then (seriously). The merger gave eBay a competitive payments-solution advantage, and it gave PayPal greater visibility to eBay's huge customer base.

When PayPal merged with eBay, PayPal shareholders received 0.39 shares of eBay for every share of PayPal. So your 769 shares of PayPal turned into 300 eBay shares.

Over the years, eBay's stock had 2-for-1 splits in 2003 and 2005, which quickly increased your holdings to 1,200 eBay shares. The stock then went quiet with no splits or dividends for the next decade.

PayPal, round two

In 2015, under pressure from activist investors, eBay consented to make PayPal a separate company again. Shareholders were given one share of PayPal's new stock for every share of eBay they held. In other words, you got to keep your 1,200 eBay shares, but now you also owned 1,200 shares of PayPal.

Since the split, eBay's stock price has modestly increased, but PayPal's stock has been great.

EBAY Chart

EBAY data by YCharts.

But the good news for eBay shareholders is that the company instituted a dividend this year. It's been paid out three times now, most recently in September. 

The takeaway

So how much would you have if you invested $10,000 in PayPal's IPO? Your eBay shares would be worth nearly $42,000 and your PayPal shares would be worth over $123,000. That's more than a 16-bagger in just under 18 years. And you're receiving quarterly dividend checks of $168. Who wouldn't be happy with that?

But let's not overlook one important thing. Many pundits advised against investing in in PayPal's IPO, given the substantial risks it faced at the time. Wall Street was still scared of technology stocks after the dot-com crash of 2000. Furthermore, PayPal was facing a lawsuit from now-defunct competitor CertCo that threatened to shut down its business. And the State of Louisiana stoked regulatory fears, as it booted PayPal from doing business in the state without a license.

In hindsight, how could any of us have missed that PayPal was the leader in an emerging trend? As the world went online, it was necessary -- inevitable -- that financial transactions would also go digital. And PayPal was a clear leader in 2002. But investing isn't about hindsight. It's about developing the foresight to cut through the fear, headlines, and conventional wisdom and identify the companies changing the world.