Alibaba Group, which I discussed in a previous article, is one of the most eagerly anticipated IPOs of the year. The e-commerce giant, which controls roughly 80% of all e-commerce in China, handled 1.5 trillion yuan ($248 billion) in online transactions last year -- more than Amazon (AMZN -2.56%) and eBay (EBAY 0.88%) combined.

Yet as investors wait for Alibaba to finally go public, the company's primary rival in the business-to-consumer space, JD.com (Jingdong, formerly known as 360buy) could beat it to the punch and go public within a few weeks. Should you buy or avoid this underdog in China's booming e-commerce industry?

Source: Author's screenshot.

Is JD to Taobao what Amazon is to eBay?
JD.com primarily competes against Alibaba's Tmall, a business-to-consumer site similar to Amazon. Alibaba's largest site, Taobao, is a consumer-to-consumer business similar to eBay.

JD controls 17.5% of the business-to-consumer market in China, while Tmall controls 51%. JD reported $15.4 billion in gross merchandise value (GMV) from its business-to-consumer business last year.

Meanwhile, Alibaba's Taobao controls 95% of the consumer-to-consumer market. JD has a much smaller footprint in that market -- it only reported $5.3 billion in GMV from its consumer-to-consumer business in 2013. When we put those two halves together, JD's combined GMV of $21 billion pales in comparison to Alibaba's GMV of $248 billion.

It's all about the margins
Business-to-consumer businesses generally have slimmer margins since they ship products from fulfillment centers, while consumer-to-consumer businesses hand that responsibility over to the seller. That's why Amazon's operating margin comes in at 0.9%, compared to eBay's 21%.

JD is clearly struggling with the same operating margin problems as Amazon. In 2013, JD reported an operating loss of $96 million on revenues of $11.5 billion -- its third consecutive year of operating losses. Alibaba, by comparison, usually posts operating margins north of 50%.

JD is stuck in that rut because 85% of its top line comes from sales of consumer electronics. Consumer electronics tend to be sold at thin margins to convince customers to order products online instead of from brick-and-mortar retailers. We can see a similar battle in the U.S. between Amazon and Best Buy (NYSE: BBY), which have been tirelessly matching each other's prices with margin-crushing discounts.

More importantly, 70% of JD's revenue comes from sales of products from its own inventory. Whereas Amazon slowly converted itself into a business that helps people sell their own products, JD still does the heavy lifting by itself -- which means that its business resembles Best Buy's online business more than Amazon's.

The Tencent factor
JD's most notable strength is its partnership with Chinese Internet giant Tencent, the maker of WeChat, the second most popular mobile messaging platform in the world with 355 million monthly active users.

That partnership, which was announced in March, gives JD a headline slot on the WeChat app, giving it major advertising firepower against Alibaba. Under the deal, Tencent will also claim a 15% stake in JD, with an option to buy another 5% after its IPO. This isn't a simple advertising deal -- Tencent would profit handsomely from boosting JD's profile and helping it gain market share against Alibaba.

Over the past few years, WeChat has evolved into a full-featured mobile platform that allows users to play online games, make online payments, and book taxis. In other words, WeChat is a platform built from the ground up for mobile platforms. By comparison, Facebook, Google, and Yahoo! all needed to convert their desktop platforms to mobile devices.

Tencent's WeChat. Source: Google Play.

Alibaba recently reported that a fifth of its purchases came from mobile platforms -- up from 7.4% a year earlier. However, the partnership between Tencent and JD could throttle Alibaba's impressive mobile growth in the near future.

Is JD trying to cash in on the hype?
The buzz from Alibaba has clearly boosted interest in JD.com.

The IPO, which should be priced between $16 to $18, is already oversubscribed. JD intends to sell 93.7 million shares, raising up to $1.7 billion and debuting with a market cap of $24 billion. That's a much smaller offering than Alibaba, which intends to raise $20 billion and debut with a market cap of $150 billion.

Investors should recall that E-Commerce China Dangdang (DANG) was also called the "Chinese Amazon" when it went public in December 2010. Dangdang, like Amazon, is an online bookstore that evolved into a business-to-consumer site selling consumer electronics and household appliances.

However, shares of Dangdang have fallen 36% since its IPO. Its problems are similar to JD -- it sold too many low-margin, commoditized products. Dangdang currently has a 2% share of the business-to-consumer market.

The bottom line
In conclusion, investors should not confuse Alibaba and JD with each other. Alibaba's biggest challenge is convincing investors that it can maintain its current growth trajectory. JD needs to grow its margins, gain market share, and slowly convert itself into a sustainable consumer-to-consumer business to convince the market that it is a true threat to Alibaba.

Tencent's investment in JD is certainly encouraging, but investors should carefully compare JD to industry peers Alibaba and Dangdang before participating in this IPO.