They’ve made billions of dollars helping sell everything from iPhones to hairdryers on China’s burgeoning online shopping platforms. Now, tech giants led by Alibaba Group Holding Ltd.’s finance affiliate are making money off the loans consumers use to buy those products.

Amid surging demand from cash-strapped Chinese millennials, companies such as Ant Financial -- controlled by Alibaba’s billionaire founder Jack Ma -- have been extending more consumer loans. The firms are then packaging the debt into complex financial products that they then sell on to investors, with Ant Financial selling at least 149 billion yuan ($23 billion) of the so-called asset-backed securities this year, according to data compiled by Bloomberg and local research firm China Securitization Analytics.

But the new practice is raising red flags for some analysts, who say there needs to be more transparency about how the securities, known as ABS, are created.