The 2nd U.S. Circuit Court of Appeals in Manhattan said Capital One’s overdraft fee rules were ambiguous, and a lower court judge was wrong to dismiss a breach of contract claim. It also revived a claim under a New York state consumer protection law.

Capital One and a lawyer for the McLean, Virginia-based company did not immediately respond to requests for comment.

“We’re pleased with the outcome,” said Matthew Wessler, a lawyer for the plaintiff Tawanna Roberts, a Capital One customer in the New York City borough of the Bronx. “Capital One illegally extracted overdraft fees for purchases that were made when consumers had enough funds in their accounts.”

Banks impose overdraft fees, typically $35, when they pay merchants for purchases by customers who lack sufficient funds in their accounts. The Consumer Financial Protection Bureau has said U.S. overdraft and bounced check fees totaled about $15 billion in 2016.

Roberts accused Capital One of illegally imposing overdraft fees when it settled transactions, the time it paid merchants, instead of when it authorized transactions at the cash register.

To illustrate, if a customer with $100 in her account made five $10 purchases and then made a $100 purchase, she would face only one overdraft fee if the transactions were settled in order, but five fees if the $100 purchase were settled first.

Capital One told customers it had sole discretion to “elect to pay checks and other items drawn on your deposit account or to permit automatic bill payments and withdrawals against your account for an amount in excess of your available balance (an ‘Overdraft’).”

The three-judge appeals court found it “equally reasonable” to understand the term “overdraft” as referring to Capital One’s decision to make a payment, at the time of authorization, or the payment itself, at the time of settlement.

It returned the case to U.S. District Judge Lorna Schofield in Manhattan for further proceedings. The appeals court upheld Schofield’s dismissal of three other claims.

The case is Roberts v. Capital One NA, 2nd U.S. Circuit Court of Appeals, No. 17-1762. (Reporting by Jonathan Stempel in New York; editing by Grant McCool)