Square (SQ 2.42%) estimates that by 2025, worldwide credit and debit card payment volume will reach $45 trillion annually. With the world becoming more digital every day -- and with 85% of global transactions still being made in cash -- this colossal market should only continue to grow for decades.

Square and Mastercard (MA -1.22%) are two businesses that are poised to profit handsomely from this megatrend. But which is the better buy today?

A person holding a dollar bill in one hand and a credit card in another.

As the world shifts away from cash and toward digital transactions, Mastercard and Square stand to benefit. Image source: Getty Images.

Financial fortitude

Let's take a look at some key metrics to see how these payment leaders stack up in regards to financial strength.

Metric

Square

Mastercard

Revenue

$2.21 billion

$12.50 billion

Operating income

($54.21 million)

$6.62 billion

Net income

($62.81 million)

$3.92 billion

Operating cash flow

$127.71 million

$5.56 billion

Free cash flow

$101.61 million

$5.13 billion

Cash and investments

$866.05 million

$7.78 billion

Debt

$358.57 million

$5.42 billion

Data source: Morningstar Company Filings.

Mastercard is a financial titan, with profit and cash flow that dwarf those of Square. And while Square is on solid financial footing with more than $500 million in net cash on its balance sheet, Mastercard's net cash currently checks in at more than $2.3 billion. Thus, this matchup is rather one-sided in regards to financial fortitude, with Mastercard the clear leader.

Advantage: Mastercard

Growth

Mastercard may be the more financially sound business at this point in time, but Square is growing much faster.

SQ Revenue (TTM) Chart

SQ Revenue (TTM) data by YCharts

Wall Street expects Square to grow its revenue by more than 33% in 2018 and 28% in 2019,  while Mastercard's sales are anticipated to rise by about 16% and 12% during that same time. Moreover, analysts estimate that Square will increase its earnings per share at an incredible 87% annually over the next five years. Mastercard, meanwhile, is expected to grow its EPS by about 20% annually over the next half-decade.

With its recent past -- and, more importantly, expected future -- growth exceeding that of its larger rival, Square has the edge here.

Advantage: Square

Valuation

No better-buy discussion should take place without a look at valuation. Let's now check out some key value metrics for Square and MasterCard, including price-to-sales, price-to-earnings (P/E), and price-to-earnings-to-growth (PEG) ratios.

Metric

Square

Mastercard

P/S

7.93

14.79

Trailing P/E

N/A

48.17

Forward P/E

60.23

24.94

PEG

1.20

1.44

Data source: Yahoo! Finance.

Mastercard's stock is more expensive on a price-to-sales basis, which is to be expected since it's the far more profitable business. On a forward P/E basis, however, Square is the much more expensive stock. But what I find most interesting is that Square's PEG ratio -- which factors in its significantly higher expected EPS growth rate -- is considerably lower than that of Mastercard. And so, rather surprisingly, I'm going to give Square the edge in terms of current valuation.

Advantage: Square 

The better buy is...

Mastercard and Square are both great options if you're looking for a way to profit from the surging growth of electronic payments. But with its stronger growth prospects and more attractively valued stock, Square is the better buy today.