Apple has agreed to pay out $400 million to e-book customers -- but there are conditions. AFP PHOTO / Kimihiro HOSHINO

Apple has agreed to pay e-book customers $400 million to settle a class-action lawsuit over its e-book pricing practices. But don't get too excited. Your Apple payday is not coming quite yet. The company is only going to pay under certain conditions.

The deal, struck with 33 state attorneys general, was prompted by the Justice Department's antitrust suit against Apple, which claimed the firm illegally colluded with book publishers to raise e-book prices. A year ago,  U.S. District Court judge Denise Cote sided with the Justice Department

All of the publishers named in the original suit have since settled with the DOJ, and have paid more than $166 million in settlement funds to consumers. But Apple refused to settle and has appealed the decision. In fact, the Cupertino company said it's willing to take its case all the way to the Supreme Court.

That's because Apple doesn't think it's done anything wrong. In court, the company's lawyers have argued that Apple was acting for the good of the industry, framing its pricing strategy as a response to Amazon's dominance in the e-book market. News of the settlement comes as Amazon is embroiled in an ongoing fight over how to split the revenues from digital books with one of the five publishers named in the suit, Hachette Book Group -- showing that the industry still doesn't know how to deal with Amazon (whose chief executive Jeffrey P. Bezos owns The Washington Post).

In a statement, Apple reaffirmed that it did "nothing wrong and we believe a fair assessment of the facts will show it."

The outcome of Apple's appeal has a huge effect on what the possible payout will be. If the court of appeals sends the case back to Cote, Apple has agreed to pay $50 million to settle its damages claim.

And if the appeals court reverses the decision?

On that point, Apple was very clear.

"If we are vindicated by the appeals court, no settlement will be paid," the company's statement said.