Britain has fined Vodafone a record £4.6m for "serious and sustained" customer failures.
These failures included not updating accounts when mobile phone users topped up their credit to make calls.
Vodafone, the world's second-largest mobile operator, also failed to act quickly enough to identify or address the problems, the regulator said, which stemmed from a move to a new billing system.
Some 10,452 of the mobile phone giant's pay-as-you-go customers collectively lost £150,000 over a 17-month period between the end of 2013 and April 2015.
Vodafone said it deeply regretted the system and process failures and had refunded the vast majority of the affected customers.
Ofcom's Lindsey Fussell said the failings were "serious and unacceptable" and the fines, which are the highest ever imposed by the regulator, sent a clear warning to all telecoms companies.
"Phone services are a vital part of people's lives, and we expect all customers to be treated fairly and in good faith," she said.
Vodafone said all but 30 customers had been fully refunded or re-credited, with an average refund of £14.35.
It said it also donated £100,000 to charity to ensure it did not profit from the 30 customers it could not track down.
"This has been an unhappy episode for all of us at Vodafone: we know we let our customers down," the company said. "We are determined to put everything right."
Vodafone said it was confident its customers were already beginning to see the benefits of its investment in its new systems.
Britain's regulators have stepped up the pressure in recent years to make sure customers are being protected.
Ofcom said in September that Sky, Britain's biggest pay-TV group, may have violated consumer rules by making it too difficult for customers to cancel or switch providers.