(1) Damages for breach by either party may be liquidated in the agreement but only at an amount which is reasonable in the light of the anticipated or actual harm caused by the breach, the difficulties of proof of loss, and the inconvenience or nonfeasibility of otherwise obtaining an adequate remedy. A term fixing unreasonably large liquidated damages is void as a penalty.(2) Where the seller justifiably withholds delivery of goods because of the buyer's breach, the buyer is entitled to restitution of any amount by which the sum of the buyer's payments exceeds: (a) The amount to which the seller is entitled by virtue of terms liquidating the seller's damages in accordance with sub. (1); or(b) In the absence of such terms, 20 percent of the value of the total performance for which the buyer is obligated under the contract or $500, whichever is smaller.(3) The buyer's right to restitution under sub. (2) is subject to offset to the extent that the seller establishes: (a) A right to recover damages under this chapter other than sub. (1); and(b) The amount or value of any benefits received by the buyer directly or indirectly by reason of the contract.(4) Where a seller has received payment in goods their reasonable value or the proceeds of their resale shall be treated as payments for the purpose of sub. (2); but if the seller has notice of the buyer's breach before reselling goods received in part performance, the seller's resale is subject to the conditions laid down in s. 402.706 on resale by an aggrieved seller.1991 a. 316; 2009 a. 177. The unreasonableness of liquidated damages is properly a matter of defense. The defendant could not raise the question of unreasonable liquidated damages by demurrer. Northwestern Motor Car, Inc. v. Pope, 51 Wis. 2d 292, 187 N.W.2d 200 (1971). If a stipulated damages clause is valid, mitigation of damages is not applicable to determine damages. Wassenaar v. Panos, 111 Wis. 2d 518, 331 N.W.2d 357 (1983). The test to determine whether a stipulated damages provision is enforceable is whether the clause is reasonable under the totality of the circumstances, and the party seeking to avoid enforcement bears the burden to show the clause is unreasonable. To determine reasonableness, a court considers the following factors: 1) whether the parties intended to provide for damages or for a penalty; 2) whether the injury caused by the breach would be difficult or incapable of accurate estimation at the time of entering into the contract; and 3) whether the stipulated damages are a reasonable forecast of the harm caused by the breach. Convenience Store Leasing & Management v. Annapurna Marketing, 2019 WI App 40, 388 Wis. 2d 353, 933 N.W.2d 110, 17-1505.