Credit card companies have been among the most durable during this recent bear market. The big four -- Visa, Mastercard, American Express (AXP -0.84%), and Discover Financial Services (DFS -2.60%), all outperformed the market last year.

But the latter two, American Express and Discover, are quite different from the other big two, Visa and Mastercard. That's because they operate closed-loop models, meaning they are issuers, lenders, and credit processors, all within their own networks. Both are great stocks, but let's take a closer look at each to see which is the better buy.

Key differences between American Express and Discover

While both Discover and American Express have closed-loop networks, there is a key difference in terms of how they generate revenue. American Express generates most of its revenue from fees, namely, discount fees. These are fees that merchants pay when a customer buys something with an American Express card. American Express charges much higher merchant, or swipe, fees than other credit card companies, and that's because it can by catering to a more affluent clientele and corporate clients. The merchants are typically those that offer higher-end products, and while they don't like paying higher fees, they do like the business that comes from American Express cardholders.

The other big chunk of revenue for American Express is annual fees. It charges customers higher annual fees because membership comes with perks and rewards.

Of American Express's $14.2 billion in revenue in the fourth quarter, $8.2 billion came from merchant fees, $1.6 billion came from annual fees, and $1.2 billion came from service fees. Just $3.9 billion -- about 27% -- was interest income. That's because the model calls for lower and sometimes no interest on balances.

Discover is quite the opposite in that most of its revenue comes from interest income. In that sense, Discover acts more like a bank or lender. In the fourth quarter, Discover generated $3.7 billion in revenue, with $3.1 billion of that -- or 83% -- coming from net interest income on the loans Discover provides to cardholders to make purchases.

Discount or interchange fees -- swipe fees -- account for much less because Discover charges lower fees than American Express, but also because Discover has a cash back rewards feature that pays the user out of those fees.

Both companies are coming off strong fourth quarters as Discover saw its loans increase 20% and its revenue climb 27% in the quarter year over year. American Express had a 17% year-over-year increase in revenue in the latest quarter and saw spending on its network increase 12% year over year to $413 billion. The results are impressive, given the headwinds of high inflation and a slowing economy, which persist in 2023.

Which is the better buy?

Both of these stocks are in a good place to continue growing in 2023 -- and beyond. Even though economic headwinds remain, with the possibility of a recession or economic downturn looming, both have models that will allow them to navigate any rough waters ahead.

DFS Chart.

DFS data by YCharts.

Discover will benefit from higher interest rates on its loans, so even if lending slows or dips slightly in a downturn, the higher rates should buoy interest income. American Express is less vulnerable to a downturn because of its affluent members and corporate users. In addition, American Express relies heavily on travel spending, and that should continue to surge as the nation exits the pandemic.

I'd recommend both of these stocks as buys right now. American Express is up 17% year to date, while Discover is up about 14%. Discover is the better value right now, trading at just 7 times earnings, while American Express has a price-to-earnings ratio of almost 18. Also, Discover has a slightly higher dividend, with a 2.2% yield and 12 straight years of annual increases.

Ultimately, I'd probably favor Discover of the two because it's cheap, has a good dividend, and is built to weather a downturn until the economy turns back north. But honestly, both are good stocks.