Apple has agreed to settle claims related to allegations that it colluded with other publishers to keep e-book prices artificially high, according to documents filed in a New York court on Monday.

In a letter to U.S. District Judge Denise Cote, Steve Berman, an attorney representing consumers and some U.S. states, said Apple and the plaintiffs reached an agreement in principle, the Wall Street Journal reported.

The exact terms of the deal have not been released and will require court approval. A Manhattan federal judge ordered both parties to file for court approval of the deal within a month, Bloomberg reported.

The settlement relates to charges filed two years ago by the Justice Department accusing the maker of the iPad and five major book publishers of conspiring to raise prices and undercut Amazon’s dominance in the e-book market. (Amazon’s founder, Jeff Bezos, owns The Washington Post.)

Under its agreement with the publishers, Apple got a 30 percent cut of all book sales. Last July, a federal judge found Apple guilty of conspiring with the publishers.

Many states filed suit seeking refunds for their residents. The nation’s five largest publishers, Hachette, HarperCollins, Macmillan, Penguin and Simon & Schuster, agreed to settle last December, but Apple refused. Under the publishers’ settlement, which covers e-books bought between April 1, 2010, and May 21, 2012, consumers are due a refund of $3.17 for New York Times bestsellers and 73 cents for other titles. (Minnesota residents negotiated separately and will get a slightly larger refund).

Apple was set to go to trial in July and faced $840 million in claims — three times the amount consumers claimed they were overcharged.

Apple did not immediately respond to a request for comment. The company will appeal Judge Cote’s ruling, according to papers filed with the court.

The case is In Re Electronic Books Antitrust Litigation, 11-md-2293, U.S. District Court, Southern District of New York (Manhattan).