The following shall apply with regard to the return of payments made on an unlawful assessment:
(1) If, after a timely appeal, a court makes a final determination that a property was unlawfully assessed or that the amount assessed exceeded, to a substantial amount, the benefits received by the property assessed from the public improvement, a city that received money in payment of the assessment shall repay the money in an amount as ordered by the court.
(2) Within two years of receiving payment of an assessment, the city may repay the money voluntarily if the city determines that the assessment was made erroneously.
(3) Repayments to property owners pursuant to paragraph (1) or (2) shall include interest from the date of payment of the unlawful or erroneous assessment at the rate of interest that is provided for in 53 Pa.C.S. § 8426 (relating to interest on overpayment).