The appellant sued the respondent county to recover back money paid under circumstances narrated in the complaint, and which will be noticed hereinafter. The county demurred on the ground that the complaint did not state facts sufficient to constitute a cause of action. The demurrer was sustained, and the plaintiff appealed. The facts alleged in the complaint, and upon which this controversy is presented, are these: *247In 1881 the board of county commissioners of tbe said Hughes county represented to tbe public, and particularly to tbe appellant, and bis assignor, that said county bad tbe right to and might lawfully sell and let to said appellant and bis assignor tbe exclusive privilege of maintaining and operating a ferry across tbe Missouri river at or near tbe city of Pierre for a term of years; that, at tbe request of said board, appellant and bis assignor, fully believing ¿and relying upon tbe representations so made, bid and offered to- said respondent county a large sum of money for such exclusive ferry privilege,, which bid or offer tbe said county accepted, and then and there undertook, to, sell and grant to appellant and bis assignor such exclusive privilege for a stated term, for which appellant and bis said assignor paid said respondent county tbe sum of $1,800; that afterwards by assignment this appellant became tbe sole owner of any and all rights under said grant from, or contract with, tbe respondent county, including tbe right to bring this action; that before its commencement appellant duly demanded tbe return to him, and tbe repayment of, the money so paid;, which said county refused. These are tbe historic facts, to which is added in tbe complaint tbe further allegation that tbe respondent county did-not own, nor bad it any right or power to grant to appellant, such exclusive ferry privilege, in consideration of which it so received and keeps tbe money paid by appellant. - It is not alleged that tbe respondent county did anything to binder or obstruct appellant in tbe enjoyment of tbe privilege so bargained for, or failed to do anything required of it by tbe terms of tbe grant, except that it did not own, and Gould not, and consequently did not, convey, tbe privilege which it bad thus assumed to own and convey. More briefly stated, tbe plaintiff’s cause of action is that be paid tbe defendant county money for a privilege which, under tbe law, it could not control or dispose of; that thus tbe consideration failed, — -and this action is to recover back tbe money so paid, and for general damages. Tbe plaintiff’s claim, as set out in bis complaint and supported by an able and elaborate argument, is that section 55 of chapter 29, Pol. Code, being section 1362. Comp. Laws, which in terms authorized tbe board of county commissioners to grant a lease of ferry privileges as therein provided, and *248under which the grant in question was undertaken to he made, was nugatory and void, for reasons which will he more particularly noticed later.
We have been a little perplexed to know just how we ought to treat this case. Outside the record, this court cannot help knowing that this same question between these same parties was passed upon and judicially decided by the territorial supreme court, the predecessor of this court, for it is fully reported in 6 Dak. 102, 50 N. W. Rep. 720, where the pleadings are very fully reproduced. If this former judgment had been pleaded, or even if this court were at liberty to take judicial notice of the records in that case, we do not readily see how we could avoid considering the dominant question in this case as res judicata; but the defendant, by demurring to the sufficiency of the complaint instead of pleading the former judgment, consents, we think, to a reagitation of this question as an original one in this court, though, in the view we feel obliged to take of this case, we do not find it'necessary to reexamine such question. The right' or authority of the countv of Hughes to rent or lease the ferry privilege, as it is alleged was undertaken, is challenged by the plaintiff upon the ground that neither the county nor the territory owned or could control such privilege, but that it belonged to the United States, and that congress alone had the power of disposing of the same; and that said section 1362, Comp. Laws, under which the county assumed to act, was invalid and void, because not only unauthorized by congress, but in violation of section 1889 of the organic act, which prohibited the territory from granting private charters or special privileges; and upon the further ground that no part of the Missouri river over which this ferry privilege was to extend was within the territorial limits of Hughes county, but that it was wholly within Indian country, and so under the exclusive jurisdiction of congress.
In our treatment of this case we shall assume that plaintiff’s contention is plainly correct, and that the defendant county had no authority to grant the ferry privilege as it undertook to do. because the law forbade it. This is the only theory upon which it is or can be contended that the complaint states a cause of action, *249for, if the county could legally convey an exclusive ferry privilege, it is not claimed hut that it did so in this case, and then there would be no failure of consideration, for the plaintiff would have gotten just what he contracted for. It is not claimed that the county was guilty of any fraud in the matter, or possessed any advantage over the plaintiff in knowing the law or the rights of the parties. It is entirely consistent with the allegations of the complaint, and it is undoubtedly true as a fact, that when the transaction occurred both parties understood that the county might legally dispose of the privilege. The contract was made and the money paid with that understanding on both sides, but it now turns out, as we are assuming, in accordance with the plaintiff’s contention, that the county did not and could not under, the law control or dispose of any such right. Upon these premises each party to this controversy urges a different legal theory, leading to'directly- opposite results <as to -the-rights-of die-parties. ' Appellant contends that this ferry privilege was a franchise; that a franchise is an incorporeal chattel; that in ceding it to appellant the respondent county impliedly warranted its title, and, the title failing, the consideration paid for it may be recovered back. Appellant’s understanding and definition of a “franchise” is undoubtedly correct, — a privilege emanating from the sovereign. In this case it purported to come from and be authorized by the territory. This would be the proper source of a franchise which the territory had the power to confer, but how if the territory itself possessed no such power? Nothing could emanate from the territory that was not there. The state may temporarily surrender to another a part of its sovereign power, or the right to exercise it, and that is a. franchise,-,but, it cannot surrender or delegate to another a right or authority it never had. Even though it assumed such power, it could not thereby creaté a franchise. Such is the doctrine of State v. Scougal, 3 S. D. If the territory had no right to grant this privilege to plaintiff, or authorize Hughes-county to do so, as appellant contends, it was because the law itself was against it and did not allow it. It was not because either the territory or the county had failed to do or have something done which would or might have qualified it to make such grant, nor because *250it had once possessed, but had already disposed of, such right. It being the law that neither the territory nor the county had any right to or could confer this privilege, both parties to this controversy are presumed to have known it, and so to have known equally well that the nominal subject of the grant or franchise had no legal existence; in other words, both knew that the county did not, because it could not, grant the privilege to plaintiff, and consequently that plaintiff took nothing by the pretended grant or lease of the ferry privilege. Plaintiff, however, alleges in his complaint that as a matter of fact he did rely upon and believe to be true the representations of defendant county that it possessed and had the right to let and sell the said ferry privilege. This, construed with the subsequent allegations of the complaint upon which the cause of action rests,,that it never did have such right, is equivalent to saying that he was led into the transaction by and acted upon a wrong understanding of the law upon the subject, and the legal rights of the parties thereto. No misunderstanding of facts or conditions being alleged, — and this respondent contends is the case presented by this record, — we do not see any escape from this view of the case. If this conclusion is correct, little is left but to apply the well-established rule that, in the absence of fraud or undue advantage, money voluntarily paid under a mistake of law cannot be recovered. Conceding that it is, correct in this case to say that there was a failure of the consideration for which plaintiff paid his money, still plaintiff- made the payment with full knowledge, actual or imputed, that the consideration would and must fail for the unavoidable reason that it had and could have no legal existence. “While it is true that a failure of consideration is a good ground for the recovery of the money paid, it is a familiar and well-settled principle of law that when a person, with full knowledge of all the circumstances, pays money voluntarily, and without compulsion or duress of person or goods, he shall not afterwards recover back the money so paid.” 1 Pars. Cont. 466. By another standard law writer the same thought is thus expressed: “The performance of a void contract may produce consequences not void; as if one voluntarily and with full knowledge of the facts pays money on it, he cannot recover the *251money back.” Bish. Cont. § 615. This doctrine is cardinal, and has often been applied to cases which in principle seem undistinguishable from this. In Kraft v. City of Keokuk, 14 Iowa, 86, the plaintiff applied to and received from the defendant city a license to sell intoxicating liquors under a state law authorizing the city to grant such license. Afterwards the supreme court held the state law unconstitutional, and the plaintiff brought his action against the city to recover the amount he had paid for the license, on the ground, as here, that he got nothing for his money, the pretended license being unauthorized and void. The court said: “The claim is based upon no charge of fraud, duress, deceit, or even mistake of fact, but is founded alone upon the idea of a mistake in law, unsupported by any principle of conscience, equity, or morality; in other words, that the plaintiff was ignorant that the act of the legislature referred to was inoperative and void when he paid to the city of Keokuk the $200 aforesaid, for the privilege of vending intoxicating liquors for the term of six months. The law does not permit him to allege this ignorance, and make it the foundation of his right to recover back the money.” No different principle or rule of law could have been applied to the case if the license had pretended to secure to him the exclusive privilege of selling liquors in the city. The case did not turn upon the character of the privilege for which the money was paid, whether it was a franchise, an exclusive privilege, or simply a license, but recovery was refused upon the ground that he paid his money voluntarily, with his eyes open, and with as good opportunity as the city had to know what the law was, and consequently whether the privilege was a legal and substantial right or not.
In Mays v. Cincinnati, 1 Ohio St. 268, the plaintiff had, in pursuance of ordinances of the city, petitioned the city council and obtained licenses to sell produce in the markets of the city, and had paid the price agreed upon therefor. These ordinances were held invalid for want of power in the city to make them, — the same objection as is urged against the territorial law which authorized the granting of this ferry privilege. The plaintiff brought his action to recover what he had paid for the void licenses. The court held that he could not recover, as the payments were voluntary, *252though, made under a misunderstanding of what the law was, and consequently of what rights he secured thereunder. The case of Railroad Co. v. Cincinnati, (Super. Ct. Cin.) 23 Wkly. Cin. Law Bul. 68, was where the plaintiff sued the city to- recover back money paid to it to enable it to appropriate certain lands for opening a street. Plaintiff alleged that the city agreed to make an assessment on lands benefited, and to certify the assessment to plaintiff; that the city used the money and took the land, but refused to do further, as it had agreed. It was held that plaintiff could not recover; that the city had agreed to do what it had no legal power or right to do, of which plaintiff was charged with knowledge; and that, the payment being voluntarily made by plaintiff with knowledge of the facts, it could not recover. In Brumagim v. Tillinghast, 8 Cal. 269, plaintiff sought to recover of defendant, who was, treasurer of the city and county of San Francisco, money paid for stamps to put on bills of lading for transportation of gold and silver, on the ground that the law which imposed the tax, and authorized the issuance and sale of the stamps, was void, as in violation of the United States constitution. The court held (Field C. J., delivering the opinion) that the law was unconstitutional and void, not that plaintiff could not recover, because the purchase of stamps.and payment for them was voluntary. Says the opinion: “The rule is at this day well settled that moneys voluntarily paid upon a claim of right, with full knowledge of all the facts, cannot be recovered back merely because the party at the time of payment was ignorant of or mistook the law as to his,liability.” Johnson v. McGinness, 1 Or. 292, was.upon the following facts: Defendant had settled upon a certain section of land as a claimant under an act of congress. . He afterwards sold a part of the land, to which he supposed himself entitled under the law, to the plaintiff, and received therefor $1,200. .Plaintiff purchased, knowing all the facts, but both honestly supposed that, under the law, plaintiff had a right' to sell, but both were mistaken as to the law. Defendant had no right to sell. The court said: “In relation to the facts there was no fraud, deceit, misrepresentation, or misunderstanding, but in relation to the law applicable to those facts the parties were mutually mistaken. Money so paid cannot be recov*253ered back.” Baker v. City of Fairbury, (Neb.) 50 N. W. 950, was a case where plaintiff had obtained from the city a license for which he paid the city $500,. besides $500 occupation tax. He sought to recover the amount of the tax on the ground that there was no ordinance authorizing the same, and that the city had no legal right to impose or receive it. The court said that, as plaintiff had voluntarily made the payment to the city, he could not recover it back, and declined to examine the question as to the legal right of the city to collect the tax.- To these might be added almost an infinite number of cases holding the same doctrine, as Cook v. City of Boston, 9 Allen, 393; Painter v. Polk Co., (Iowa) 47 N. W. Rep. 65; City of Houston v. Feizer, (Tex. Sup.) 13 S. W. Rep. 266; Phillips v. Jefferson Co., 5 Kan. 412; Silliman v. Wing, 7 Hill, 159; De Graff v. County of Ramsey, 46 Minn. 319, 48 N. W. Rep. 1135; Valley Ry. Co. v. Lake Erie Iron Co., 46 Ohio St. 44, 18 N. E. Rep. 486.
Appellant, however, insists that this is. not such a case of voluntary payment as cannot be recovered, for the reason that it was not made with knowledge of the facts, and was not made in discharge of a claimed obligation. He says. it was not -made with knowledge of, but in ignorance of, the fact that the law under which it was paid was void. The knowledge of the law with which every man is charged includes a knowledge of the constituent facts which make the laws. That the legislature enacted a certain law is a fact,, but a knowledge of, the law imputed to every man comprises a knowledge of that fact. That a certain law is valid or void is another fact, but every man is presumed to know whether it is valid or void, else he could not know the law. To allow a man to recall- an act deliberately done, on the ground that he did not know the fact that a certain law was in existence, or the fact that such law had been or would be held unconstitutional, would find no support in reason or authority. The facts of which a payor must have knowledge, in order to make his payment irrecoverable, are not facts as to the existence or validity or meaning of the law, for all these he is presumed to know, but the facts, events, and circumstances which relate to the persons and transactions involved. Nor do we think the-fact that this payment was *254not made in discharge of some claim or tax that was being pressed against appellant takes it out of the class of voluntary payments. Suppose in this case the preliminary facts to have been that plaintiff was operating a ferry at this point, and the respondent county had objected, claiming that it had the exclusive control of such ferry privilege, and had under the assertion of such legal right required the plaintiff either to abandon his ferry or pay for the privilege; and then the parties had agreed upon the same terms as stated in the complaint, and plaintiff had made the same payment. Could plaintiff afterwards recover such payment, on the ground that the county had no legal right to require it? We think the foregoing cases would be authorities against it, and yet we do not see in what respect such supposed case would differ from some of the cited cases, nor what legal principle would allow a recovery in this case, and not in such supposed case. In each case the money was paid under the same full knowledge of the facts. It was paid for the same purpose, to wit, as the consideration for a privilege which the grantor claimed the legal right to confer. In each case it was paid voluntarily, and without fraud or unfair advantage; and in each case the only ground for recovery would be the same, the fact that the grantor had no legal right to grant or convey the pretended privilege.
Appellant’s contention seems to- be that, no matter what the law may be, if the county takes his money for a pretended franchise or an exclusive privilege to do a certain thing, there is an implied warranty that it has a legal right to grant such franchise or privilege, and if it has no such right the money so paid may be recovered back. Suppose, then, in defiance of the constitution, the state legislature should enact a law authorizing counties to let to the highest and best bidder the exclusive privilege of selling intoxicating liquors as a beverage within its limits, as the territorial legislature, in defiance of the organic law, as claimed by appellant, authorized Hughes county to sell this exclusive ferry privilege, and under the former law the plaintiff had bid for such privilege, and paid therefor the price so bid and agreed upon, under circumstances precisely like those under which this ferry privilege was contracted and paid for. Could such payment be recovered *255on the ground that the county had no right to- make such contract, but that when made plaintifll did not know that the law so authorizing counties to sell such privilege was unconstitutional? We think the answer to such a claim would be that plaintiff knew, or ought to have known, that under the constitution of the state, notwithstanding the act of the legislature, the county could not legally grant such privilege. The inference would be that the plaintiff, knowing the law, was willing to take his chances on making the privilege, such as it was, worth to him what he was paying for it.
. 'Put finally appellant insists that he should not be and is not chargeable with a knowledge that the law authorizing the leasing of this ferry privilege, and under whieh he made-Ms- contract,' was unconstitutional and void; that he was only chargeable with knowing what the law appeared to-be on the statute book. We do not think such distinction is maintainable. It is not recognized in any authority to which we are referred^ and certainly several of the cases cited supra are directly against it. This maxim- of the law has a broader and deeper, meaning than that every man is supposed to know the letter of the law. It goes further, and charges him with a knowledge of his legal rights, whether depending upon the constitution, the statutes, or the decisions of the courts. We think the demurrer was properly sustained, and the judgment of the circuit court is affirmed.
All the judges concurring.