An e-commerce platform can be an excellent business. These middleman operators don't take on inventory risks like most retailers, making them efficient companies. Fee income from transactions and merchant subscriptions makes them unusually profitable, too.

Yet, Wall Street has moved away from the sector recently on fears about a recession potentially striking in 2023. Investors can look past those short-term concerns, though, as they shop for stocks that have been discounted due to the pessimism around tech stocks today.

With that goal in mind, let's compare two e-commerce platforms with different investing characteristics to see which fits better in your portfolio. Read on to see what matters when deciding between Shopify (SHOP -2.37%) and eBay (EBAY 0.31%) stocks.

The growth hangover

Both companies are enduring a growth hangover associated with the sudden shift in demand back toward physical retailing. Shopify and eBay, along with most e-commerce peers, decided over a year ago that pandemic-related sales spikes were here to stay. That reasonable conclusion turned out to be wrong, though, so these businesses are feeling a pinch today on sales growth and earnings.

eBay's revenue trends are less impressive, with sales volumes declining 5% in the third-quarter selling period that ended in late September. Shopify posted an 11% increase, in contrast. Shopify wins the growth matchup more broadly, too. The platform is attracting more merchants to its subscription services and processing more payments from their customers. Sales rose 22% last quarter, while eBay's revenue fell 2%.

eBay is safer

eBay pulls far ahead on profitability. The company generated $1.8 billion in operating income in the first three quarters of 2022, translating into an impressive 25% operating margin. Sure, that figure was down from the prior-year period of 29% of sales. But eBay is generating plenty of earnings.

EBAY Operating Margin (TTM) Chart.

EBAY Operating Margin (TTM) data by YCharts.

Shopify generated a $634 million loss in that period compared to a $254 million gain a year earlier, making it a riskier stock heading into what could be a period of weak e-commerce demand in 2023. Those losses might quickly moderate with help from cost cuts. Yet cautious investors will prefer eBay for its positive earnings and cash flow.

The price is right

Even following a stock price slump in 2022, Shopify is valued at a higher premium than eBay. You'd have to pay nearly 12 times sales for shares today, while eBay is valued at less than 3 times sales.

That gap only makes sense if you believe Shopify will quickly return to positive cash flow and rising profit margins while maintaining growth rates of 20% or better. That bullish scenario is possible, given the widening array of services that Shopify is offering its merchant partners. Its latest price hike could speed that move toward profitability -- assuming its customers don't balk at the increase. Look for more data on this point when Shopify announces fourth-quarter results in mid-February.

If you have a lower risk tolerance, though, eBay looks appealing for its stable business and gushing cash returns from stock buybacks and dividends. It may be some time before Shopify declares a steady dividend or has enough free cash flow to direct toward those repurchases.