Perhaps no two companies stand to benefit more from the shift of the global economy from cash to digital payments than Mastercard Inc. (NYSE:MA) and PayPal Holdings Inc. (NASDAQ:PYPL). Both companies' stocks have performed admirably while global commerce is making this monumental transition. In the trailing one- and three-year periods, shares of both have handily outperformed the S&P 500 index. (Full disclosure: My portfolio comprises positions in both companies north of 5% allocations.) So, which of these two companies makes for a better investment today? Let's take a closer look.

Two Post-It notes that each read "WIN".

Image source: Getty Images.

The case for PayPal

As e-commerce grows, so do mobile payments, which consists of making a purchase with a mobile device. This trend benefits no company more, perhaps, than PayPal. In the company's second quarter, mobile payment volume rose to $54 billion, a 49% increase year over year. Mobile payment volume now accounts for 39% of PayPal's total payment volume. What's responsible for PayPal's success in this growing category? Two words: One Touch.

One Touch is PayPal's platform that allows users to easily finish purchases started on any merchant's website, even when doing so from a small smartphone screen. In PayPal's Q2 conference call, CEO Dan Schulman explained:

When a customer who has opted into One Touch is creating or updating their user account with a merchant they can now choose to leverage their personal data securely stored within One Touch in order to auto-populate most of the required account information. Not only does this greatly simplify the registration process but it also secures a funding source for their new account with the merchant enabling the consumer to start shopping immediately. One Touch is the fastest adopted product in our history and it's now crossed 100 million consumers with 102 million consumers opted in and 9.5 million merchants offering One Touch.

Schulman went on to call PayPal's mobile results, due to One Touch, "game-changing." He's not the only one who likes it. A recent third-party survey found 52% of consumers make more online purchases when PayPal is offered as a payment method and a full third stated they would abandon an online purchase when PayPal is not offered as a checkout option.

PayPal's second quarter, built on the back of its mobile success, was another in a long line of standout performances. In the quarter, revenue grew to $3.86 billion, a 23% increase year over year, and adjusted EPS climbed to $0.58, a 28% jump year over year. Maybe even better than its strong revenue and earnings, however, was the rise in active users and their respective engagement with the platform. In Q2, PayPal's active user accounts went up 15% to 244 million. These users used the platform to make a purchase an average of 35.7 times over the past year, a 9% increase over 2017's second-quarter figure. This growth in its user base and engagement is growing PayPal's network effect, an effective moat against competition and further cementing the platform's dominant position in today's digital payment landscape.

The case for Mastercard

Mastercard's second quarter was a virtuoso performance for such a mature company. In the quarter, net revenue rose to $3.7 billion, a robust 20% increase year over year, and its adjusted earnings per share (EPS) grew to $1.66, an even more impressive 51% increase year over year. While some of the credit for that incredible bottom-line growth should definitely go to lower taxes and recent acquisitions, the company is also growing the good old-fashioned way: through organic growth, both from macro trends and taking market share from credit card rivals.

A man holding a tablet that reads "FINTECH".

Mastercard and PayPal are both using technology to disrupt traditional financial services. Image source: Getty Images.

Some of the macro trends propelling Mastercard are the rise of e-commerce and the lowered cost of card acceptance in international markets, where the historical use of cash is high. In this year's first quarter, U.S. e-commerce sales surged to $123.7 billion, a 16.4% increase year over year, according to the U.S. Census Bureau. In online transactions, consumers do not have the option to make a purchase using cash or personal checks. At an analyst conference  last year, Visa Inc.'s (NYSE:V) management stated the propensity to use a Visa-branded product was twice as high for an online purchase as one made at the point of sale. The same dynamic is at work for Mastercard in e-commerce.

Another secular force driving greater Mastercard adoption is the cheaper access merchants in emerging economies now have to card acceptance technology. Thanks to things such as mobile networks and QR codes, sellers no longer need expensive hardware and robust landline service to accept cards and digital payments at the point of sale. Earlier this year, Mastercard acquired South African start-up Oltio to enhance its security capabilities for mobile payments in emerging economic markets.

A growing global appetite for digital and electronic payments, however, is not the only reason to own shares of Mastercard. The company has also succeeded by bundling a unique and diverse collection of services it then uses as leverage to capture new businesses and banks as customers. Such services include data analytics, fraud prevention tools, and loyalty program management. These services are in Mastercard's earnings presentation as "other revenues." In Q2, other revenues grew to $785 million, a 13% increase year over year. More than just a growing stream of revenue, however, these services also deepen Mastercard's relationship with its banks, making them more reliable on the payment network and making it much less likely they would choose to leave for a competitor when their contracts expire.

Final verdict

The only objection I can see to owning either of these fine companies is their respective valuations. Based on adjusted earnings, PayPal sports a P/E ratio of 40.3 while Mastercard shares are just a tad cheaper at a shade under 36. However, due to their competitive positions and growth rates, I believe both companies easily meet Warren Buffett's definition of wonderful companies at fair prices.

So, which company do I believe makes a better investment today? I'd say buy equal positions in both and enjoy the benefits, as well as what I believe will be market-beating returns.

If forced to pick one, though, I would go with Mastercard. I believe its competitive position is a little more secure than PayPal's. I also think, however, that PayPal has a bit more upside. Truly, this choice is a win-win for investors.

Matthew Cochrane owns shares of Mastercard and PayPal Holdings. The Motley Fool owns shares of and recommends Mastercard and PayPal Holdings. The Motley Fool owns shares of Visa. The Motley Fool has a disclosure policy.