If any recognizance shall be forfeited in any case in which, if the recognizor had been convicted, any sum might have been due to the complainant, or any person or corporation, the court in which the amount of the recognizance is, in whole or part, recovered, shall ascertain the just sum and costs, if any, which are due from the recognizor to the complainant, person, or corporation and grant a certificate for the amount, which, upon being audited by the state controller, shall be paid, upon his or her warrant for the amount upon the general treasurer.
R.I. Gen. Laws § 12-21-22