Citigroup is preparing to issue $330 million in refunds after the bank discovered it had overcharged nearly two million credit card accounts on their annual interest rates, a spokeswoman said on Friday.

The bank, which has about 150 million credit card accounts, said it caught the error in a routine internal review mandated under federal law. Citigroup said it is had notified regulators about the mistake.

“We sincerely apologize to our customers and are taking every action to provide refunds as quickly as possible,” the bank spokeswoman, Elizabeth Fogarty, said in a statement.

Citigroup disclosed the error in its annual report, filed Friday with the Securities and Exchange Commission. The bank said it had discovered “methodological issues” in its calculations of some customers’ annual interest rates.