delivered the opinion of the court.
The plaintiff in error, Smith, had a judgment against the defendant Keith, upon which an execution had been issued, and placed in the hands of an officer, for collection. Keith paid the money to Smith, and took his receipt for it; the constable nevertheless claimed commissions on the amount of the judgment, the same as if he had collected it himself. Keith refused to pay them, alledging as a reason therefor, that the constable was not entitled to commissions for money which he had not collected. Smith thought otherwise, and agreed with Keith, that if he would pay the amount of the commissions claimed by the constable, and it should turn out upon submitting the question to Judge Alexander, (at that time a practicing lawyer,) that he was not legally entitled to receive them, he would himself repay them to him. Upon this agreement, Keith paid the amount claimed, to the constable: the question as *117to the legality of the payment was afterwards submitted to Judge Alexander and determined'by him against the constable, whereupon Keith claimed of Smith the amount paid by him to the constable upon- the agreement between them, which Smith refused to pay, and this action is brought for its recovery.
It is contended that the agreement to refund, entered into by Smith with Keith, is nudum pactum,■ and as such cairnot be enforced by action. We think otherwise; the money was paid by Keith upon the agreement of Smith to refund it if there were no law by which the constable was entitled to it. - There most clearly is none; and (Smith’s contract to refund in such case is obligatory upon him, and is supported by a good consideration, viz, the payment of the money by Keith to the constable. We therefore affirm the judgment of the circuit court.