Tencent (TCEHY -0.44%) and JD.com (JD 0.36%) recently bought minority stakes in Better Life, a Chinese retail conglomerate that owns convenience stores, supermarkets, and department stores. Tencent acquired a 6% stake for 886.9 million RMB ($141 million), while JD took a 5% stake for 739.1 million RMB ($117 million).

This marks the second time Tencent and JD simultaneously invested in the same company. Last December, the two companies put a combined $863 million into Vipshop (NYSE: VIPS), the third largest e-commerce site in China.

This probably won't be the last time Tencent and JD team up on a major investment, either. The two companies are working together to counter Alibaba (BABA -1.14%), the 800-pound gorilla of China's e-commerce market.

A woman shopping at a mall.

Image source: Getty Images.

Understanding Tencent and JD's relationship

Tencent is the largest social media company in China, and the biggest video game publisher in the world. It owns WeChat, the most popular messaging app in China, and its gaming portfolio includes hit games like League of Legends, Clash of Clans, and Arena of Valor.

A shopping cart icon on a smartphone.

Image source: Getty Images.

JD is the second-largest e-commerce company in China. It controls 33% of the B2C (business-to-consumer) market, according to Analysys International Enfodesk, compared to a 51% share for Alibaba's Tmall. Vipshop, which popularized flash sales, controls just 3% of the market.

JD has grown its market share against Tmall over the past three years. That makes it a popular partner for any company that wants to counter Alibaba's growth. That's why Tencent bought a 15% stake in JD when it went public in 2014, and subsequently boosted that stake to nearly 20%.

Tencent merged the data of its WeChat users with JD's customer shopping histories last year. The partnership let WeChat users buy products from JD, while JD used the data to make product suggestions and help merchants promote their products. JD also granted customers discounts at partnered brick-and-mortar retailers when they used WeChat Pay.

Understanding Tencent's e-commerce strategy

WeChat, which hit 980 million worldwide monthly active users (MAUs) at the end of the third quarter, sits at the center of Tencent's e-commerce strategy. Over the past few years, Tencent expanded WeChat into an all-in-one "super app" that can be used to order food, purchase tickets, hail rides, find jobs, play games, and make mobile payments.

WeChat's mobile app.

WeChat's mobile app. Image source: iTunes.

An elusive piece of the puzzle is the e-commerce market, which is dominated by Alibaba. Tencent dabbled in this market by allowing brands to sell products through WeChat with either full stores or flash sale offerings. Several high-profile luxury brands -- including LVMH, Burberry, and Cartier -- tested out the platform last year.

Yet that move didn't really threaten Alibaba. Meanwhile, Alibaba expanded heavily into the brick-and-mortar market to assert its control over the offline and online retail markets while consolidating its ecosystem. This sparked an arms race between Tencent and Alibaba: the two companies have invested over $10 billion into brick-and-mortar stores since the beginning of 2017.

Tencent invested in companies like Yonghui Superstores, Helian Home, and mall operator Wanda Commercial. It also holds retail partnerships with Walmart and French retailer Carrefour. Alibaba's investments include Suning.com, Intime Retail, Sanjiang Shopping Club, Lianhua Supermarket, Wanda Film, and home improvement retailer Easyhome.

Tencent's WeChat Pay and Alibaba's Alipay, which is operated by its affiliate Ant Financial, are the key weapons in this battle. Once Tencent and Alibaba invest in these brick-and-mortar retailers, they'll favor their backer's mobile payment platform over other payment types -- which could tip the scales in either company's favor.

So how will Better Life help Tencent and JD?

Better Life operates over 400 stores across the Hunan, Jiangxi, Sichuan, Chongqing, Guangxi, and Yunnan provinces, and it pulls together its retail channels on its "Smart Monkey" e-commerce and online-to-offline (O2O) platform.

Tencent will likely tether Better Life to its ecosystem in the same way it did with Walmart (another major investor in JD): by sharing its customer data with WeChat, promoting WeChat Pay, and integrating its e-commerce platform with JD.com.

This move won't devastate Alibaba, but it will likely force Alibaba to retaliate with additional investments in brick-and-mortar retailers. Northeast Securities analyst Luo Xianfei recently told the South China Morning Post that "most of China's retail giants, either foreign or domestic, have all chosen sides with either Alibaba or Tencent," but that a clear winner has yet to emerge.