If, in an action brought on a contract, the court determines that a rate of interest has been contracted for greater than is authorized by AS 45.45.010 - 45.45.070, either directly or indirectly, in money, property, or other valuable thing, or that a gift or donation of money, property, or other valuable thing has been made or promised to be made to a lender or creditor, or to a person for the lender or creditor, directly or indirectly, by the borrower or debtor, or a person for the borrower or debtor, the design of which is to obtain for money so loaned, or for debts due or to become due, a rate of interest greater than that specified by AS 45.45.010 - 45.45.070, the rate of interest is usurious and works a forfeiture of the entire interest on the debt. The court shall give judgment for the amount due, without interest, on the sum loaned or the debt contracted, against the defendant and in favor of the plaintiff and against the plaintiff for costs of action, whether the action is contested or not.