The Chinese tech giants are dropping major cash to rise to the top in the country’s mobile payment battle.

The scale: In 2017, $15.4 trillion worth of mobile payments were handled by third-party platforms in China—more than 40 times the amount processed in the US. Alipay, owned by Alibaba, handled nearly 54 percent of those payments, and WeChat Pay, owned by Tencent, processed around 39 percent.

The cost: Holding onto market share cost Ant Financial, an arm of Alibaba, a pretty penny. The discounts and rebates it provided to keep people on Alipay contributed to an uncommon quarterly loss. Despite such efforts, though, WeChat Pay is gaining ground—it’s been cutting more and more into AliPay’s customer base each year.

Why it matters: It’s all about the data. Sure, transaction fees are nice, but market dominance over mobile payments mean companies can amass data on the largest number of people possible. That can then be used to pitch consumers other products, like loans or investment funds.

America is lagging: The US is dragging its feet on mobile payment adoption. Plenty of people’s smartphones have the capability—think Apple and Google Pay—but not many stores or services have gotten with the program. Starbucks stands out as an exception, accounting for around 40 percent of all mobile payments in America.