The "war on cash" is in full swing, and companies in the cashless payment business stand to make a lot of money. Two of the most notable players in this industry are payment-processing giant Visa (NYSE:V) and fintech up-and-comer Square (NYSE:SQ). Here's a look at how these companies make their money, how they've been doing recently, and which one could be the best one to add to your portfolio now.

About the businesses: How do Visa and Square make their money?

There's obviously more to Visa's and Square's respective businesses than I can explain in just a few paragraphs, but here's a rundown of each company's general business model.

Employee accepting a credit card from customer's hand.

Image source: Getty Images.

Despite what many people believe, Visa doesn't actually issue any credit or debit cards itself. Rather, the company is a payment processor, serving as a middleman between consumers, merchants, and their respective banking institutions. For example, if you have a Visa credit card issued by Capital One, Visa facilitates the transfer of money between Capital One and the bank account of whatever merchant you buy something from.

For its services, Visa makes money in two main ways. First, it earns service revenue, also known as "swipe fees," whenever customers use their Visa cards to make a purchase. Visa also earns data-processing revenue, which is a small amount of money for every payment transfer, as well as for certain other transactions.

Square, on the other hand, has several business segments, but its core business is providing payment-processing hardware solutions to merchants. So, it's a very important distinction to make that Square isn't really a competitor to Visa. To the contrary, Square is opening credit card acceptance to a whole new demographic, which actually increases Visa's revenue.

In addition to its payment-processing hardware, from which Square earns a cut of its merchants' revenue, the company has a business-lending business (Square Capital), foodservice ordering platform (Caviar), and perhaps most exciting, a rapidly growing peer-to-peer payment app (Square Cash).

Visa: A time-tested profit machine with room to grow

With a market capitalization of over $250 billion versus Square's $23 billion, Visa is by far the larger of the two companies.

When it comes to credit cards, it's tough to make the case that Visa isn't the most recognizable name in the space. The company has been in business for 60 years, and its business is tremendously profitable. In fact, Visa earned more than $2.1 billion in profit during the second quarter alone on about $5.24 billion in revenue.

And, if you think that Visa's market opportunity has been maxed out, you may want to think again. The trend toward a cashless society (fueled by companies like Square, by the way) has facilitated some pretty impressive growth in recent history. Over the past year alone, Visa's payment volume is up by 11%, revenue is up by 15%, and there are now almost 3.3 billion Visa-branded credit and debit cards in existence, 4% more than a year ago.

Perhaps most significantly, Visa has a massive opportunity for international growth. In many countries around the world, especially in Asia and Latin America, credit cards are not nearly as universally accepted as they are in the U.S. In fact, Visa's international revenue grew by 16% last year and remains the company's biggest long-term opportunity.

Square: A massive market opportunity, but don't hold your breath for big profits

Even though it is relatively new and small by comparison, Square has a massive market opportunity and is growing at a rapid pace.

In its core payment hardware business, the current annual payment volume represents about 2%-3% of the estimated global card payment volume. Plus, about two-thirds of businesses around the world still don't accept card payments -- the majority of which are in Square's "small-to-mid-size" target market. Square's gross payment volume grew by 30% over the past year, and there's no reason to think this growth rate isn't sustainable for years to come.

In addition, Square has a big opportunity in consumer finance. Its Square Capital platform makes loans to small businesses, and although $390 million in second-quarter loan volume sounds impressive (and it is), only about 3% of Square's sellers took advantage of the platform.

Finally, Square Cash is perhaps the most exciting opportunity. The Cash App recently surpassed PayPal's Venmo for total downloads (33.5 million), and if the company can figure out how to leverage its roughly 7 million active Cash users into other revenue-generating financial products, it could drive tremendous revenue growth for decades.

One caveat: Square is not yet a profitable company, nor should investors expect massive earnings growth anytime soon. Square's management recognizes its prodigious growth opportunity, and (wisely) invests all of the company's profits back into the business.

Which is the better buy now?

To be perfectly clear, I don't think investors will go wrong with either of these stocks. Both have lots of room to grow and should be big winners in the "war on cash" as it plays out over the coming decades.

Having said that, I think Square represents the better long-term opportunity and it's difficult not to get excited about the enormity of the company's potential. I own Square in my portfolio, and may build my position even further, as I believe the company is still in the early innings of its growth story.

Matthew Frankel, CFP® owns shares of Square. The Motley Fool owns shares of and recommends PayPal Holdings and Square. The Motley Fool owns shares of Visa and has the following options: short September 2018 $80 calls on Square. The Motley Fool has a disclosure policy.