Whole Foods said it will pay the New York City Department of Consumer Affairs $500,000 in a settlement of allegations that the organic foods giant mislabeled pricing for pre-packaged products.

"We agreed to $500,000 in order to put this issue behind us so that we can continue to focus our attention on providing our New York City customers with the highest level of quality and service," the retailer said in a statement.

The overpricing story, which broke this summer, went viral and hurt the retailer's earnings, executives have said. It also helped fuel what was one of the most challenging years in Whole Foods' history.

The issue also helped trigger plans for the retailer to form a new internal crisis team to handle such matters.

“After discovering repeated mislabeling of pre-packaged goods at Whole Foods last year, we are happy to have reached an agreement with Whole Foods that will help to ensure New Yorkers are better protected from overcharging,” said Julie Menin, commissioner of the New York City consumer affairs agency.

But even news of the settlement didn’t go without disagreement. Whole Foods said the New York city department “misrepresented” other details of the deal.

The agency said in its announcement that Whole Foods had agreed to conduct quarterly in-store audits of at least 50 products from ten different departments at all New York City stores to “help ensure products are accurately weighed and labeled.”

However, Whole Foods said that was already part of its protocol that would continue to remain in place. It also said its current program goes above and beyond the agency’s requirements.

Whole Foods worked closely with the agency “over the last several months to reach an agreement that is in the best interest of the City of New York and our stakeholders,” the retailer said. “Unfortunately, the (agency) has misrepresented this agreement. Whole Foods has had in place pre-existing pricing and weights/measures programs including a third party auditing and training program and a 100 percent pricing accuracy guarantee that gives customers a full refund on any item inadvertently mispriced.”

Whole Foods went on to say that originally the New York City consumer affairs agency had demanded a settlement payment of $1.5 million, but the terms were negotiated down to a quarter of that with the $500,000 deal.

The retailer also stipulated that the agency’s claims were limited to stores in that city and the issue was not systemic or intentional.

The “allegations were limited to New York City, and as our joint agreement states, there was no evidence of systemic or intentional misconduct by anyone in the Northeast region or the rest of the company,” Whole Foods said in its statement.

Traditional supermarkets, big-box stores and online retailers nationwide have stepped up their organic food offerings and chipped away at Whole Foods' dominance. Now, the retailer has created a nine-point turnaround plan aimed at making 2016 a better year.