Fears of a coming recession are getting worse. Once the inverted yield curve -- a reliable predictor of looming economic troubles -- reared its ugly head, much of the investment community went into panic mode. Of course, no one knows when the next recession will come, but it isn't a bad idea to start purchasing stocks that could come out of one mostly unscathed. One stock that rarely gets mentioned as a safe haven in case of an economic downturn is Shopify Inc (NYSE:SHOP). That is in part because the tech industry isn't necessarily the best place to look for recession-proof stocks. But it is also true that the e-commerce giant has yet to experience a full blown recession as a publicly traded company. Despite the firm trouncing average market returns in recent years, it is natural to wonder how Shopify would fare in a recession. 

Ecommerce shopping and trends for Shopify

IMAGE SOURCE: GETTY IMAGES

How Shopify generates revenues 

An understanding of how Shopify makes most of its money will be helpful here. The Ontario-based company breaks down its revenues into two segments: subscription solutions and merchant solutions. The former of these consists of the basic recurring services and license fees the company offers merchants on its platforms. Merchant solutions can be described as Shopify's point of sale system; it accounts for transaction and payment processing fees, but also shipping fees, and more. Year to date, subscription solutions and merchant solutions make up 43% and 57% of Shopify's revenues, respectively.

These facts and figures give us an indication of how the tech company would be affected by a recession.

Much of the firm's revenues come from recurring subscription plans. But many of Shopify's clients -- most of whom run small or medium-sized ventures -- could struggle to stay in business if serious economic troubles descend upon us. The company would struggle to attract enough new clients in such uncertain times to make up the difference. In other words, Shopify's subscription solutions revenue would probably decrease, or at least, its growth would decelerate noticeably. Further, the firm's gross merchandise volume (the dollar value of orders processed through its platform) would take a hit because of a decrease in consumer spending. According to Shopify:

The volume of GMV facilitated through our platform is an indicator of the success of our merchants and the strength of our platform. Our merchant solutions revenues are also directionally correlated with the level of GMV facilitated through our platform.

Clearly, if the tech company's GMV is negatively impacted, so will its merchant solutions revenue. 

Scary valuation metrics

There is yet another problem Shopify faces. The company's (perceived) future success is already factored into its stock price. Shopify currently trades at just above 350 times future earnings. 

Sure, sky-high valuation figures are somewhat typical of growth stocks, but even so, Shopify's valuation remains a bit unsettling. That's why some analysts have been warning us that a price correction is inevitable for the tech firm. Shopify has convinced enough investors to ignore these calls so far. However, if a recession hits, those looking for a greater sense of security could choose to put their money into companies that are already consistently profitable, a group that does not include Shopify. That coupled with its revenues decelerating would render its stock a lot less attractive. The result could be a significant drop in the company's share price. 

Does that mean Shopify is best avoided

Shopify's success in recent years is no fluke. Behind the company's impressive revenue growth is a brilliant strategy that is sustainable. The firm is looking to become the ultimate one-stop platform for small and medium-sized businesses looking to create an online presence. Shopify has already made significant headway in that direction, and while the company faces serious competition, it is also constantly looking for ways to grow even more. Let's not forget that e-commerce sales still account for a relatively small percentage of retail sales worldwide. As the industry continues to mature, few companies are in a better position to benefit than Shopify. Though the firm would probably struggle in a recession, this could create an excellent entry point for investors.