Square (SQ 5.04%) and Mastercard (MA 1.33%) represent two very different ways to invest in the payments processing market. Square provides POS (point of sale) devices tethered to its cloud services, while Mastercard is a traditional credit card company that partners with banks and charges merchants swipe fees.

However, both stocks are widely considered growth plays on a cashless society. That's why shares of Square skyrocketed nearly 160% over the past 12 months as Mastercard shares advanced about 60%. But looking ahead, which payments processor is the better long-term buy?

A woman accesses payment services on a smartphone.

Image source: Getty Images.

How do Square and Mastercard make money?

Square sells three hardware devices -- Square Reader, a credit card-reading dongle for smartphones; Square Stand, which converts iPads into POS systems; and Square Register, a stand-alone POS system that doesn't require an iPad. All three products were aimed at disrupting the traditional POS system market.

Square tethers those devices to a growing ecosystem of services for managing payrolls, inventories, customer relationships, shopping data, deliveries, website design, and financing. These services are turning Square into a "one-stop shop" that helps smaller merchants digitize their businesses. Square also offers Square Cash, which eMarketer ranks as the third most popular peer-to-peer (P2P) payments app in America. Square recently added bitcoin transactions to the app, and partnered with Visa (V 0.65%) to launch a physical debit card for Square Cash users.

Mastercard owns the second-largest payment network in the world after Visa. It partners with banks and companies to issue credit cards, then charges merchants swipe fees for each transaction. That's a low-risk business model, since Mastercard's partners shoulder all the risk by handling lines of credit and collecting payments.

Mastercard also offers its partners integrated security products, loyalty and reward programs, consulting services, other mobile payment gateways, and other services. To capitalize on the rise of P2P payments, Mastercard integrated its network with Zelle and PayPal's (PYPL 1.96%) Venmo, the two most popular P2P payment platforms in America. PayPal also recently launched a Venmo Mastercard debit card to counter Square's Cash Card.

How fast are Square and Mastercard growing?

Square's adjusted revenue (which excludes transaction-based and bitcoin costs) rose 51% annually to $307 million last quarter, marking its strongest growth rate in two years. Its reported revenue rose 45% to $669 million, while its gross payment volume (GPV) jumped 31% to $17.8 billion. Wall Street expects Square's adjusted revenue to rise 48% for the full year.

Square Register.

Square Register. Image source: Square.

Mastercard's revenue rose 31% annually to $3.58 billion last quarter, which also marked its highest growth in years. Its switched transactions rose 17% annually, as cross-border transaction volume climbed 21% on a local currency basis.

Mastercard attributed that strength to economic growth across most of the world, higher retail spending, and new partnerships for private label cards. The company faces some unpredictable headwinds, with regulators and retailers demanding lower swipe fees, but analysts still expect its revenue to grow 20% this year.

Profitability, valuations, and dividends

Square isn't profitable on a GAAP basis. However, its adjusted EBITDA rose 33% annually to $66 million last quarter. Analysts expect Square's adjusted (non-GAAP) EPS -- which excludes certain transaction-based costs, stock-based compensation expenses, and other expenses -- to rise 70% this year. At $62, the stock trades at 135 times that estimate.

That makes it much pricier than Mastercard, which trades at about 31 times this year's non-GAAP earnings. Mastercard's GAAP EPS rose 41% annually last quarter, while its non-GAAP EPS -- which excludes currency impacts and other temporary expenses -- climbed 49%. Analysts expect its non-GAAP earnings to rise 39% this year.

Square has never paid a dividend, but Mastercard pays a forward yield of 0.5%. That yield won't attract any serious income investors, but it's a nice bonus for a growth stock.

The winner: Mastercard

Square and Mastercard are complementary plays on the payments market, since Square also processes Mastercard payments on its platform. Both stocks could rally much higher as cash-dependent markets migrate toward cards and digital payments. I personally own shares of Square, but I believe that Mastercard's better profitability, lower valuations, and dividend make it the better buy at current prices.