Wells Fargo & Co. won its appeal of an order that would have forced the bank to pay $203 million to California customers for its overdraft policies.

However, a three-judge panel for the U.S. District Court of Appeals in San Francisco also said in a decision Wednesday that the company did violate California state law and sent the case back to trial court. The lower court must now determine what relief Wells Fargo must pay.

A representative for the San Francisco-based company could not be immediately reached for comment.

Wells Fargo was sued over its policies for posting debit card transactions and assessing related overdraft fees.

The bank, according to the decision, began posting the transactions in high-to-low order in 2001. As a result, a customer with insufficient funds faced more potential overdrafts that would deplete their account more rapidly than they would if the bank had posted transactions in low-to-high or chronological order.

A federal court judge in California determined in 2010 that Wells Fargo made this move solely to maximizing the number of overdrafts it assessed on its customers. He said the policy was unfair and deceptive and designed to "squeeze as much as possible" from customers with overdrafts.

The judge issued an injunction that ordered the bank to cease the practice and also ordered $203 million in restitution.

Wells Fargo argued at the time that customers wanted and benefited from the policies and appealed the decision. The appeals court said in its ruling that federal law preempted part of the California statute on which the injunction was based. According the decision though, the federal law does not preempt California consumer law in regards to "fraudulent or misleading representations" concerning the postings.