
    (November 6, 1918.)
    BETTILYON HOME BUILDERS COMPANY, a Corporation, Appellant, v. W. H. PHILBRICK and R. B. GREENWOOD, Partners Doing Business Under the Name and Style of PHILBRICK & GREENWOOD, Respondents.
    [175 Pac. 958.]
    Foreign 'Corporations — Eight to Sue — Doing Business Within the State.
    1.. Bev. Codes, see. 2792, refers to foreign corporations “doing business” in this state.
    2. A contract or agreement whieh cannot be sued upon or enforced in any court of this state by a foreign corporation under the prohibitions of Bev. Co&s, see. 2792, is ono growing out of the “doing of business” in this state, or one so connected therewith' as to be an element of such transaction.
    3. When a contract or agreement sued upon by a foreign corporation proves to be one which was made and performed outside of this state, the question as to whether it was doing other business within the state is not material.
    [As to what constitutes “doing business in the state” by foreign corporation, see note in Ann. Cas. 1912A, 553; Ann. Cas. 1913E, 1154.]
    APPEAL from the District Court of the Fifth Judicial District, for Power County. Hon. J. J. Guheen, Judge.
    Action on contract. From judgment of- nonsuit, plaintiff appeals.
    
      Reversed.
    
    
      T. Bailey Lee, for Appellant.'
    Our statute was never intended to affect contracts, the situs of which is without the state. (19 Cyc. 1276, 1310; Miller v. Williams, 27 Colo. 34, 59 Pac. 740; Security Go. v. Pam, Handle Nat. Bank, 93 Tex. 575, 57 S. W. 22; Gdidst)erry v. Carter, 100 Ya. 438, 41 S. E. 858; also 19 Cyc. 1279, sec. 4, citing the eases of People’s Bldg., Loam, & Sav. Assn. v. Berlin, 201 Pa. St. 1, 88 Am. St. 764, 50 Atl. 308; Eastern Bldg. etc. Assn. v. Bedford, 88 Fed. 7.)
    . It is the “coming into the state” that is interdicted. (Katz v. Herrick, 12 Ida. 1, 86 Pac. 873; Conumercial Bank v. Sherman, 28 Or. 573, 52 Am. St. 811, 812, and note, 43 Pac. 658.)
    O. R. Baum and W. G. Bissell, for Respondents.
    There is but one test to be applied, to determine whether or not a foreign corporation is doing business within the state, that is, Where is the transaction to be consummated ?
    The most familiar example is in the ease of the sale of goods, where the order is taken in a state having a constitutional provision similar to ours, and in which the order or contract is made by the agent and sent to the domicile of the corporation for consummation, and in such cases the court without exception have held that the situs of the contract is in the domicile of the corporation. (19 Cyc. 1277, and cases cited.)
    The entire business of a real estate broker consists in bringing the buyer and seller into contact. It is the only way a real estate dealer can do business. All this was done in Idaho; therefore this transaction comes under the constitutional and statutory prohibition. (Tarr v. Western Loan & Savings Co., 15 Ida. 741, 99 Pae. 1049, 21 L. R. A., N. S., 707; Morris-Boberts Co. v. Mariner, 24 Ida. 788, 135 Pac. 1166; Katz v. Herrick, 12 Ida. 1, 86 Pac. 873.)
   RICE, J.

The plaintiff alleged in the first cause of action that it was and is a corporation, organized and existing under the laws of Utah, with its principal office at Salt Lake City, and is engaged in a general real estate brokerage; that on or about May 25, 1914, the defendants, at Salt Lake City, Utah, hired and employed the plaintiff to secure for defendants a satisfactory buyer for certain hotel property situated in American Falls, in this state; that thereafter plaintiff secured a satisfactory buyer of said property in the person of one C. W. Thompson of St. Anthony in this state. In their answer defendants allege that if the plaintiff is a corporation, as alleged in the complaint, it has no legal capacity to sue in the courts of this state, for the reason that it had failed to comply with the laws thereof relating to foreign corporations. At the trial, after the plaintiff rested, a motion for nonsuit .was made and granted on the ground that the plaintiff, being a foreign corporation, had not complied with the laws of this state requiring the filing of articles of incorporation and the designation of an agent, at the time it made the contract and performed the services alleged in the complaint.

It is conceded that at the time the contract was entered into, and the services thereunder performed, the corporation had not complied with the provisions of Rev. Codes, sec. 2792. It is provided in this section that every corporation, not created under the laws of this state, must “before doing business in this state, ’ ’ comply with the provisions of the law with reference to filing certified copy of its articles of incorporation with certain designated officers, and the appointment of some person -in the county in which the principal place of business of such corporation in the state is conducted upon whom process may be served. It also contains the following provision: “No contract or agreement made in the name of, or for the use or benefit of, such corporation prior to the making of such filings as first herein provided, can be sued upon or enforced in any court of this state by such corporation.”

The section refers to corporations “doing business in this state.” This court has been called upon on several occasions to consider the question as to what transactions are included within the meaning of the expression ‘ ‘ doing business in this state.” (Katz v. Herrick, 12 Ida. 1, 86 Pac. 873; Belle City Mfg. Co. v. Frizzell, 11 Ida. 1, 81 Pac. 58; Toledo Computing Scale Co. v. Young, 16 Ida. 187, 101 Pac. 257; Bonham Nat. Bank v. Grimes Pass P. M. Co., 18 Ida. 629, 111 Pac. 1078; Foore v. Simon Piano Co., 18 Ida. 167, 108 Pac. 1038; Diamond, Bank v. Van Meter, 18 Ida. 243, 21 Ann. Cas. 1273, 108 Pac. 1042; Tarr v. Western Loan & Savings Co., 15 Ida. 741, 99 Pac. 1049, 21 L. R. A., N. S., 707; Donaldson v. Thousand Springs Co., 29 Ida. 735, 162 Pac. 334.)

There was testimony- introduced at the trial from which it might be inferred that the appellant had been “doing business within this state.” The evidence introduced, however, showed that the contract involved in this case was made at Salt Lake City in the state of Utah; also that the services for which appellant seeks compensation were performed in the state of Utah. It is true that the actual transaction resulting in the exchange of respondents’ property was consummated in this state, but under the issues in this case, as to the terms of employment between appellant and respondents, appellant’s compensation would be due upon securing a satisfactory buyer for respondent’s property.

Does the statute prevent a foreign corporation from obtaining redress in our courts in the case of a cause of action arising on a contract made and performed outside of the state, although it maj’- have been engaged otherwise in doing business in this state Í

We have not been referred by counsel to authorities where this precise question was under consideration. We quote as follows from the case of Bonham Nat. Bank v. Grimes Pass P. M. Co., supra.

‘ ‘ This case presents a new question with reference to a foreign corporation pleading compliance with the laws of this state in order to maintain an action in the courts of the state. We have heretofore held that where a plaintiff shows by its pleading that it is a foreign corporation, its complaint will be open to demurrer unless it further pleads a compliance with the constitution and laws of this state entitling it to do business in the state. (Valley Lumber etc. Co. v. Driessel, 13 Ida. 662, 13 Ann. Cas. 63, 93 Pac. 765, 15 L. R. A., N. S., 299; Valley Lumber etc. Co. v. Nickerson, 13 Ida. 682, 93 Pac. 24; Kiesel v. Bybee, 14 Ida. 670, 95 Pac. 20.) In those eases, however, the complaint alleged that the corporation was ‘doing business in this state.’ In the complaint in this case, no such allegation is to be found. The reason for the rule previously announced by this court would lead to the inevitable conclusion, however, that if the complaint shows that the plaintiff is a foreign corporation, it must then either show a compliance with the state laws entitling it to do business in this state, or show by the facts constituting its cause of action that the transaction sued on does not arise out of ‘doing business within this state.’ If, therefore, the contract sued upon shows upon its face, as in the first cause of action in this case, that it is a foreign contract, and that it did not arise out of domestic business or a domestic transaction the complaint is not demurrable on account of the failure of the plaintiff to show compliance with the state law.”

A fair construction of the statute leads to the conclusion that a contract or agreement which cannot be sued upon or enforced in any court of this state, under the prohibition of the statute quoted above, is one growing out of the “doing of business in this state,” or so connected therewith as to be an element of such transaction. When the contract or agreement sued upon.proves to be one which was made and performed outside of this state, the question as to whether the foreign corporation was doing other business within the state is not material.

The judgment is reversed. Costs awarded to appellant.

Budge, C. J., and Morgan, J., concur.  