It is settled in this Commonwealth that a banker gets the title to goods bought under such a commercial letter of credit as that now in question, Moors v. Drury, 186 Mass. 424, and cases there cited, and that that title is not lost by a delivery of the goods under such a trust receipt as that which we have here. Moors v. Wyman, 146 Mass. 60.
The delivery by Dutton and Company of the paper stock in question to the defendant created a sale by the plaintiffs to the defendant on the terms of the original contract between Dutton and Company and the defendant, as in Plunger Elevator Co. v. Day, 184 Mass. 130, and American Electrical Works v. New England Electric Railroad Construction Co. 186 Mass. 546.
The defendant paid to the plaintiffs more than the amount due under that contract when he paid the alleged freight in place of the true freight. And the money so paid is without question money paid under a mistake of fact.
*409These payments made by the defendant were in legal effect payments to the plaintiffs and not payments in legal effect to Dutton and Company made at their request to the plaintiffs, as was the case in Merchants’ Ins. Co. v. Abbott, 131 Mass. 397.
The defendant’s counsel has contended with much earnestness that this overpayment can be recovered back from the plaintiffs because Dutton and Company acted as their (the plaintiffs’) agents in selling the goods to him, and Dutton and Company’s fraud is for that reason in legal effect the fraud of the plaintiffs. However that may be in a case where the importer holding the goods of the banker under a trust receipt sells to a stranger, it is at least doubtful whether the importer acts as the agent of the banker in delivering goods which have been bought under a letter of credit issued to the importer to enable the importer to carry out a previous contract by which the importer was to import goods for his customer and the customer takes the goods in pursuance of that contract, knowing all the relations of the several parties.
We are however of opinion that the second ground is well taken on which the defendant contends that he is entitled to recover back from these plaintiffs the money paid by him under this mistake of fact. As we have said, the overpayments were made to the plaintiffs. The defendant has a right to have them back from the plaintiffs unless he has lost that right by the fact that the plaintiffs have settled their account with Dutton and Company, and have paid to them these and all other sums due to them.
It is settled in England that where money is received under a mistake of fact it is no defence that the money has been paid over to another unless the defendant who received the money was a mere agent of that other person, that is to say, unless the payment was in legal effect a payment to the other person. Newall v. Tomlinson, L. R. 6 C. P. 405. Continental Caoutchouc Co. v. Kleinwort, 8 Com. Cas. 277; S. C. on appeal, 9 Com. Cas. 240. See also in that connection Durrant v. Ecclesiastical Commissioners, 6 Q. B. D. 234. There are similar decisions in Rhode Island and Missouri; Phetteplace v. Bucklin, 18 R. I. 297; Koontz v. Central National Bank, 51 Mo. 275; and the law seems to be the same in New York; Kingston Bank v. Eltinge, 40 N. Y. 391; Corn *410Exchange Bank v. Nassau Bank, 91 N. Y. 74. The person who receives money under a mistake of fact must pay it back in spite of the fact that he has paid it over to one who would have been entitled to it had the money been what it was supposed to be and that payment over was made in ignorance of the mistake under which the money was paid, provided that, as between the person to whom the payment was made and the person to whom he paid it over, the person to whom the payment was made had a right, in case the state of the accounts between them required it, to keep the money in repayment of advances made, for example, to the other person. In such a case the windfall which came from receiving the money paid under a mistake of fact is, in part at least, his windfall, and he must give it back although in fact all paid over, because the state of accounts did not in fact give him a right to any of it. The test is the right to keep the money if the state of the account required it. The actual state of the account is of no consequence.
In the case at bar the money paid by the defendant to the plaintiffs was the money of the plaintiffs. It is not even money received as the money of Dutton and Company on which the plaintiffs had a lien, as was the case in Newall v. Tomlinson and Continental Caoutchouc Co. v. Kleinwort, ubi supra. All that Dutton and Company had was a contract right to the balance of account after the plaintiffs had been paid all due to them under the letters of credit.
For these reasons we are of opinion that the defendant has a right to recoup the $7,000 of previous overpayments.
We are also of opinion that the plaintiffs have no right to reimburse themselves for the payment of the $3,858.27. That was in legal effect a payment to Dutton and Company and not to the defendant, and comes within Merchants’ Ins. Co. v. Abbott, 131 Mass. 397.
Judgment for the defendant affirmed.