Since going public in 2008, Visa (V -0.23%) has delivered stellar returns of 21.5% annually to its investors. Visa is a blue chip stock with a dominant position in the payment industry, giving it a robust economic moat.

However, its dominance has opened it up to criticism from regulators that want more competition in the market.

Visa has held up exceptionally well in recent years amid inflationary pressures and rising interest rates, and today, the stock is trading at an all-time high. With consumer debt on the rise, is now a good time to buy the stock? Let's find out.

Visa's widespread network is a huge advantage

Visa has an incredible competitive advantage as the largest payment network operator in the world. The company has had more than six decades to build up its merchant and customer base, giving it strong network effects.

It has gained the trust of its banking partners, and as its network expands, Visa can use those funds to reinvest in different payment verticals, scale up, improve security, and attract more business.

In 2022, the company processed $14.1 trillion in total transaction volume, well ahead of its next closest competitor, Mastercard, which processed $8.2 trillion. Smaller competitors like American Express and Discover processed $1.5 trillion and $258 billion in volume, respectively.

Credit card being read by a hand-held device.

Image source: Getty Images.

Visa earns fees every time it processes payments for merchants, with an average credit card processing fee of about 1% to 3%, with a portion of these fees going to its partner banks. The company also earns fees for data processing, authorization, clearing, and settlement services.

After accounting for client incentives of $12.3 billion (amounts paid to financial-institution clients for using its cards), Visa earned $32.7 billion in net revenue during its 2023 fiscal year ended Sept. 30.

A cash-generating machine

What makes Visa a compelling long-term investment opportunity is its growth potential. Management says its network can support an additional $185 trillion in new volume with its account-based payments platform, Visa Direct, and its commercial cross-border platform, Visa B2B Connect. The company has over 500 partners using Visa Direct, including some huge payment companies like Stripe, Fiserv, and Adyen.

All of this gives it a powerful network and competitive advantage -- evident in Visa's profit margins. During the past decade, margins have averaged an impressive 47%. Meanwhile, last year's free cash flow was just over $19 billion, providing plenty of cash flow to invest in its products, pay dividends, and buy back its shares.

V Profit Margin Chart

V profit margin data by YCharts.

Investors should keep an eye on these two things

Visa investors want to keep an eye on a couple of things. One is the growing consumer debt balances. Credit card debt in the U.S. is now $1.13 trillion. These growing balances, alongside the historically high interest rates on credit cards, could potentially weigh on consumer spending.

The good news for investors is that Visa doesn't have credit risk. The company doesn't hold credit card loans on its books. Instead, it partners with banks for its branded cards and earns fees while the partner banks hold on to loans and service that debt. So, while an uptick in defaults could weigh on consumer spending, Visa doesn't have to worry about credit risk and could ride out a recession better than some of its peers.

Another thing to watch for is growing competition and possible regulations that could affect the strength of its payment network. Regulators have put Visa and Mastercard in their sights, arguing that the companies have a duopoly on the payments market that should be broken up with more competition.

Those regulators have proposed the Credit Card Competition Act, which would require banks with more than $100 billion in assets to process electronic credit transactions on at least two networks, with one being other than Visa or Mastercard. As of Feb. 28, the Credit Card Competition Act hasn't passed Congress. However, this legislation is worth keeping tabs on for investors because it could put a dent in Visa's earnings.

Is Visa a buy?

Although the stock is near an all-time high, it trades at a reasonable valuation at 32.5 times earnings (P/E ratio) and 28.5 times forward earnings, both of which are slightly below its 10-year average P/E of 33.8.

V PE Ratio Chart

V PE ratio data by YCharts.

Visa has achieved excellent growth and has a solid competitive advantage in the payments market. While investors want to keep tabs on consumer health and possible legislation, the company should continue firing on all cylinders thanks to its strong network effects.

Its valuation is reasonable, and it should benefit from long-term growth trends in global payments, which is why I think it's a solid stock.