Plaintiff and defendant are foreign corporations. The complaint alleges that at the city and county and State of Hew York, plaintiff deposited with defendant, money, checks and drafts, amounting to the sum of $1,230.60, at specified dates, and thereupon, at said place, the defendant promised to return and repay the same to the plaintiff, with interest, upon demand. Defendant demurs upon the ground that the court has not jurisdiction of the person of the defendant, nor of the subject of the action and that the complaint does not state facts sufficient to constitute a cause of action. Both parties being foreign corporations, section 1780 of the Code of Civil Procedure applies. Appellant concedes that unless its complaint comes within subdivision 1 thereof the demurrer was properly sustained. That provision of law is as follows: “ Section 1780. An action against a. foreign corporation may be maintained by another foreign corporation * * * in one of the following cases only:
“ 1. Where the action is brought to recover damages for the breach of a contract, made within the State.”
Plaintiff claims that the allegation of a deposit of money made with the defendant within the State, which defendant within the State promised to return and repay with interest upon demand, sets forth an action to recover damages for the breach of a contract made within the State. Defendant claims that what is alleged does not constitute an action for damages for the breach of a contract, but is an action for money had and received and that such an action is not an action upon a contract. It is quite true that there are cases where the action for money had and received will lie when there is no meeting of the minds, where the obligation to repay is one of law merely, as where one has obtained money from another through the medium of oppression, imposition, extortion or deceit or by the commission of a trespass. Such money may be recovered back, for the law implies a promise from the wrongdoer to restore it to the rightful owner, though this is the very opposite of his intention. Implied or constructive contracts of this nature are similar to the constructive trusts of *819courts of equity, and in fact are not contracts at all. They are called quasi contracts because without being contracts they produce obligations in the same manner as contracts. People ex rel. Dusenbury v. Speir, 77 N. Y. 150.
Rut such is not this case. Here it is alleged that plaintiff deposited the money with defendant and thereupon the defendant promised to return and repay the same to the plaintiff, with interest, upon demand. That is the allegation of facts constituting a contract. It being also alleged that the deposit and the promise to repay, that is the malting of the contract, took place within the city, county and State of Rew York, the statute is satisfied and the court had jurisdiction.
Judgment reversed. Demurrer overruled, with costs, with leave to defendant to withdraw demurrer and answer over within ten days and upon payment of costs.
Freedman, P. J., and Greenbaum, J., concur.
Judgment reversed. Demurrer overruled, with costs, with leave to defendant to withdraw demurrer and answer over within ten days upon payment of costs.