When any judgment or decree shall be obtained against a sheriff or collector, or his sureties, or their personal representatives, for or on account of the default or misconduct of any such deputy, and shall be paid in whole or in part by any defendant therein, he or his personal representative may, on motion, obtain a judgment or decree against such deputy and his sureties, and their personal representatives for the amount so paid, with interest thereon from the time of such payment, and five percent damages on such amount.