Whenever any real property has been heretofore or shall be hereafter purchased by any county, city, borough, incorporated town, school district, poor district, or institution district, to be called herein municipality, for nonpayment of taxes or municipal claims under any act of Assembly authorizing such sale, the municipality purchasing said property, or any municipality having an interest therein, may, subject to the approval of the court of common pleas, upon petition, agree with the former owner of such property or his heirs, devisees, or any one or more of them, or with anyone entitled to redeem such property, to accept in compromise or reduction of the amount of the taxes and municipal claims, penalties, interest, and costs due, any sum less than the whole of such amount so due, whereupon the municipality or municipalities having an interest therein, or the person with whom such agreement is made, may petition the common pleas court for confirmation of said agreement.
72 P.S. § 5878a