If sufficient funds after such deductions are available, the superintendent or other official may with the consent of the defendant pay in whole or in part any of the debts of the defendant. Any balance shall be retained and paid to the defendant upon his discharge.
42 Pa.C.S. § 9755