SHANGHAI — China’s biggest online payment company offers its hundreds of millions of users a breakdown on their spending each year, showing everything from their environmental impact to their ranking among shoppers in their area. Many spenders — not shy, and occasionally even a bit boastful about their personal finances — in turn share the details on social media.

This year, the marketing stunt has run into a problem: China’s growing sense of personal privacy.

Ant Financial, an affiliate of the e-commerce giant Alibaba Group, apologized to users on Thursday after prompting an outcry by automatically enrolling in its social credit program those who wanted to see the breakdown. The program, called Sesame Credit, tracks personal relationships and behavior patterns to help determine lending decisions.

That Sesame Credit program is part of a broader push in China to track how people go about their day, one that could feed into the Chinese government’s ambitious — and, some people would say, Orwellian — effort to use technology to keep a closer watch on its citizens.

The episode was a rare, public rebuttal of a prevailing trend in China. The country’s largest internet companies, and the government itself, have gathered ever more data on internet users. While Chinese culture does not emphasize personal privacy and Chinese internet users have grown accustomed to surveillance and censorship, the anger represents a nascent, but growing, demand for increased privacy and data protections online.