— It is claimed by appellant that as between themselves the plaintiff by virtue of the agreement in question became the surety of defendant, and therefore that, before the plaintiff can recover, he must show that he has paid the interest and taxes to which the agreement refers. The cases of Moses v. Clerk of Dallas County, 12 Iowa, 139, and Wood v. Smith, 51 Iowa, 161, are relied upon as sustaining this claim. The petition shows that the property sold by plaintiff was paid for in land. It is not shown that the contract in controversy was any part of the agreement of exchange. On the contrary, it appears to have been an independent transaction. The consideration for it was not the sale of property, but the making and delivery of the note of plaintiff for the amount of the taxes and interest. It is *227not, therefore, the case of one who buys mortgaged realty, and, as a part of the price to be paid, agrees to discharge the mortgage debt. It is well settled that where one person makes a promise to another for the benefit of a third, the party to be benefited may maintain an action on the promise. McHose v. Dutton, 55 Iowa, 730; Lawrence v. Fox, 20 N. Y. 268. “ But it is not every promise made by one to another, from the performance of which a benefit may ensue to a third, which gives a right of action to such third person, he being neither privy to the contract nor to the consideration.” Simson v. Brown, 68 N. Y. 361; Garnsey v. Rogers, 47 N. Y. 240. To enable a third party to sue upon such a contract, it must have been made for his benefit; and if its primary object was to subserve the interests of one or both of the parties to the contract, they alone can maintain an action thereon for its breach. In this case there was no subrogation. The parties entitled to the interest and taxes were not parties to the agreement, and have not assented to it. It is not shown that they were benefited by it, nor that they have any interest in it. The petition shows quite clearly that the agreement was for the benefit of plaintiff. It required the discharge of plaintiff’s obligations by defendant, and he received the note, and afterwards the money, in consideration of his undertaking. Instead of carrying it out, he refuses to do so, while retaining the money. His only defense seems to be that the plaintiff has not yet discharged these obligations, and, since they are liens on the real estate he sold, they may yet be enforced against such realty. But we are not required to indulge in such a presumption. By means of the agreement, and defend- • ant’s failure to perform it, plaintiff has lost his money, while his relation to the debts is unchanged. His damage is evidently the amount of the obligations in question, with interest. We conclude that the demurrer was properly overruled. The judgment of the district court is therefore
Affirmed.