If any person or corporation knowingly contracts for or receives, directly or indirectly, by any device, subterfuge or other means, unlawful interest, discount or charges for or in connection with any loan of money, the obligor may, recover by means of an action or defense an amount equal to twice the total of all interest, discount and charges determined by the loan contract or paid by the obligor, whichever is greater, plus such reasonable attorney's fees and court costs as may be assessed by a court against the lender. The payments due and to become due including all interest, discount and charges included therein under the terms of the loan contract, shall be reduced by the amount which the obligor is thus entitled to recover. Recovery by means of a defense may be had at any time after the loan is transacted. Recovery by means of an action may be had at any time after the loan is transacted and prior to the expiration of 2 years after the earlier of (1) the date of the last scheduled payment of the loan after giving effect to all renewals or extensions thereof, if any, or (2) the date on which the total amount due under the terms of the loan contract is fully paid. A bona fide error in connection with a loan shall not be a violation under this section if the lender corrects the error within a reasonable time.
No person shall be liable under this Act for any act done or omitted in good faith in conformity with any rule, regulation, interpretation, or opinion issued by the Commissioner of Banks and Real Estate or the Department of Financial Institutions or any other department or agency of the State, notwithstanding that after such act or omission has occurred, such rule, regulation, interpretation, or opinion is amended, rescinded, or determined by judicial or other authority to be invalid for any reason.
815 ILCS 205/6