AT&T has agreed to pay $105 million to settle a case with the government over alleged bill cramming that cost consumers tens of millions of dollars. It’s the largest-ever settlement over wireless bill cramming.

$80 million of the settlement will cover customer refunds, which will be distributed by the Federal Trade Commission. Another $20 million will be paid in penalties and fees to states attorneys general, and $5 million in penalties will head to the Federal Communications Commission, according to today’s announcement.

The FTC has set up a website where consumers can seek refunds until May 1, 2015. “Current and former AT&T customers who paid for unauthorized third-party charges after January 1, 2009 may apply for refunds,” the site says. Customers can fill out an online form or request a refund by mail.

Customers were charged without their permission “for third-party services like ringtones, wallpapers, and text message subscriptions for horoscopes, flirting tips, and celebrity gossip,” the FTC said. AT&T passed these charges along to consumers and took 35 to 40 percent commissions despite ample evidence that the charges were fraudulent, the FTC said. The charges were typically for $9.99 per month.

"In 2012, Defendant earned $108 million from charges for Third-Party Subscriptions, and in 2013, $161 million for such charges, many of which were unauthorized," the FTC wrote in a court complaint. "AT&T’s practices have caused consumers millions of dollars of injury."

In July, the FTC sued T-Mobile US over similar cramming allegations after a joint investigation with the FCC.

“Stay tuned about the other wireless providers,” FCC Chairman Tom Wheeler said in a press conference today.

AT&T has stopped charging customers for so-called premium text message services, the company said in a statement sent to media.

“In the past, our wireless customers could purchase services like ringtones from other companies using Premium Short Messaging Services (PSMS) and we would put those charges on their bills. Other wireless carriers did the same,” an AT&T spokesperson said. “While we had rigorous protections in place to guard consumers against unauthorized billing from these companies, last year we discontinued third-party billing for PSMS services. Today, we reached a broad settlement to resolve claims that some of our wireless customers were billed for charges from third-parties that the customers did not authorize. This settlement gives our customers who believe they were wrongfully billed for PSMS services the ability to get a refund.”

The government says AT&T’s attempts to prevent fraudulent charges weren’t so rigorous.

“Defendant has continued to charge consumers for Third-Party Subscriptions even after large numbers of consumers complained about unauthorized charges and the refund rate for the subscriptions were high—in some cases as high as 40 percent,” the FTC complaint said. “Further, Defendant has continued to charge consumers for Third-Party Subscriptions even after industry auditor alerts, law enforcement and other legal actions, and news articles indicated that the third-party merchants were not obtaining valid authorization from consumers for the charges.”

AT&T did issue refunds to some customers, but these were limited.

“AT&T’s policy prior to October 2011 was to offer a one-time refund of up to three months for those consumers who contacted Defendant’s customer care center to complain about unauthorized third-party charges; in October 2011, AT&T notified its third-party merchants that it was changing its refund policy to ‘help lower refunds,’ and AT&T’s customer service representatives would be ‘blocked’ from offering more than a one-time two month refund,” the FTC wrote. “In numerous instances, AT&T has charged consumers for at least a year for third-party subscription services yet only offered a two month refund. Further, if a consumer previously had complained about an unauthorized third-party charge, AT&T instructed its customer care representatives not to offer any refund.”

AT&T continued working with third parties to charge customers even after learning that the charges were fraudulent, the FTC alleged. “Even when Defendant terminated a subscription from its network, only the subscription has been terminated, not the merchant who had created the terminated subscription,” the FTC wrote. “In numerous instances, a merchant who had one subscription terminated has continued to charge new and existing subscribers for other subscriptions and Defendant took no steps to ensure that consumers actually authorized the services that the merchant has alleged they signed up for.”