MAYÍFIELD, J.
— The case made on appeal is stated by appellant as follows: “The complaint as originally filed contained four counts, the last two of which were the common counts, and during the progress of the cause were stricken out by the plaintiff. Demurrers were sustained to the first and second counts, and plaintiff amended by filing additional counts numbered 5, 6, 7, 8, and 9, to which demurrers were likewise sustained. Plaintiff again amended its complaint by filing counts 10, 11, 12, and 13. Demurrers were sustained to counts 10 and 11, and overruled to counts 12 and 13. To counts 12 and 13 defendant pleaded the general issue and eight special pleas. After demurrers had been overruled to plea 3 and sustained to the balance of the special pleas, defendant filed special pleas, A, B, C, D, and E. Demurrers were overruled to pleas A, B, C and E, and sustained to plea D. The action of the court in sustaining demurrers to the first, second, fifth, sixth, seventh, eighth, ninth, tenth, and eleventh counts of the complaint, and in overruling demurrers to the special pleas 3, A, B. C, and E, constitute the only assignments of error.” While a contract is made the basis of the ac*283tion, the suit is not one claiming damages for a breach of the contract, or for compensation as for performance ; but is merely to recover money paid the defendant by plaintiff as overcharges for hauling logs under the contract made the basis of the suit. Therefore the complaint, to state a good cause of action, must show that the charges paid for freight were excessive or unreasonable. To show that the amount paid was greater than that contracted to be paid without more is not sufficient, when the action is to recover money paid as for excessive freight charges, and not as for breach of contract. The complaint mnst also show that the payments were necessary in order to induce the railroad company to do that which it was bound to do without the excessive payment, and for the refusal to do which an action on the case might have been maintained — that is, it must-be made to appear that the railroad company had breached its public duty as a common carrier in refusing to carry the logs at the contract price. A mere breach of contract is not sufficient to support this action to recover the money paid in excess of the contract price. It must be made to appear that the money was not paid voluntarily under a new contract made after a refusal on the part of the railroad company to carry under the first contract. In other words, the contract of shipment must be shown to be one authorized or provided by law, so that a- failure to perform it would be a breach of duty owing the public, and plaintiff, as one of the public, by the common carrier.
It is true, as has been well said by this court in an early case (M. & M. Ry. Co. v. Steiner, McGhee & Co., 6 Ala. 595), that common carriers, such as railroads and shippers, are in no sense on equal terms; that railroads have so expedited and cheapened transportation as to practically drive from the domain all competitors *284in transportation. The public is now left no discretion but to patronize them or to go out of business and suffer irreparable injury and loss. Railroads can and do establish rates and charges, and the public must of necessity pay, or forego the facilities and benefits which the railroads alone can furnish during this improved age of steam and electricity. For the shipper to object or protest would be an idle waste of words. He must pay the price demanded, or he is of necessity denied the right of transportation. This being the only and exclusive means of transportation, the shipper must accept it'or suffer great losses. The law, however, at-' tempts to afford a remedy, and if the carrier takes advantage of the shipper’s necessity, and demands unreasonable, exorbitant, or excessive charges, and the shipper is compelled to pay same in order to be served by this public service corporation, the carrier will be held liable to the shipper for the excess over and above reasonable charges, and will hold such excess for the use and benefit of the shipper, and it may in such case be recovered in an action for money had and received. See, also, Parker v. Great West. Ry. Co., 7 Man. & G. 283.
At common law common carriers were thus bound to accept and carry all who conformed to reasonable rules, and could lawfully charge or receive only a reasonable compensation therefor; but at .common law the carriers Avere not required to treat all persons or shippers alike —that is, to carry all for the same price. They could carry their friends or favorites at lower rates than they charged the public, provided, however, the rates charged the public were reasonable. The fact that the carriers charge some a less price than that charged the public is some evidence that the greater price is unreasonable or excessive, but it is not conclusive, so that the difference between the special and the general charges *285can be made the measure of damages in any case, unless it is shown that the special charge is the correct and reasonable price. — Cowden’s Case, 94 Cal. 470, 29 Pac. 873, 18 L. R. A. 221, 28 Am. St. Rep. 142; Schofield’s Gase, 54 Am. Rep. 863, note. At common law a common carrier was thus liable to an action at law for damages for failure or refusal to perform its duties to the public for a reasonable compensation, or to one to recover the money paid when the charges are excessive.— Lough v. Outerbridge, 143 N. Y. 271, 38 N. E. 292, 25 L. R. A. 674, 42 Am. St. Rep. 716. Without statutes regulating common carriers, they undertake generally, and not as a casual occupation, to carry and transport persons, or goods for the public, for a reasonable compensation, with or without a special agreement, and for all people indifferently, and, in the absence of a special agreement, are bound to treat all alike, in the sense that they cannot charge any one an excessive price. They could exact from no one under any circumstances more than was reasonable or just. — Root’s Case, 114 N. Y. 300, 21 N. E. 403, 4 L. R. A. 331, 11 Am. St. Rep. 643; 2 Kents Com. (3th Ed.) 598. At common law, however, carriers could make a discount in favor of particular customers or classes for special or justifiable reasons, and upon special conditions, without violating any of their duties to the public; but, if the conditions and circumstances were equal, the charges were required to be equal. The subject, duties and liabilities of common carriers is now, both in England and in the United States, largely regulated by statute. The English Parliament, the federal Congress, and the various state Legislatures have now provided for and regulated the business of carriers within their respective domains and according to their respective powers. To these statutes we must now look, and by them be governed, in determining *286the rights, duties, and liabilities of carriers and of shippers. The subject has been for a long time more or less regulated in this state by statutes — sometimes by local and special, and sometimes by general.
Discriminations and rebates by railroad common carriers have long been prohibited in this state — certainly since April 19, 1873. — Pamph. Acts 1872-73, p. 62. This act regulated the charges for transportation of freight upon railroads within this state, and among other things prohibited discriminations, and provided that the railroad company, for the transportation of local freight, might demand and receive not exceeding 50 per cent, more than the rate charged for transportation of the same freight over the wdiole line of its road. Stone; J., in construing this statute in the cases of State ex rel. Harrell v. Mobile & M. Ry. Co., 59 Ala. 321, and M. & M. Ry. Co. v. Sterner, et al., 61 Ala. 559, upheld the enactment, but pointed out hardships in its provisions, and recommended changes by the Legislature, remarking that the statute might be oppressive on the railroads, but that the remedy was. not wdth the court
The statutes of this state on this subject have often been changed, but they have ever since remained so that discriminations and rebates in freight rates have been prohibited, except in some specified cases mentioned in the statutes. Sections 3462 and 5551 of the Code of 1896, and section 245 of the Constitution, were in force in this state at the times of the making, and the breach of the contract complained of in this case.
These provisions are as follows.:
“3462 (1161). Rates on Freight to be Posted at Depot; Discrimination Unlawful. — Every person or corporation, owming or operating a railroad in this state, must publish, by posting at all the freight depots along the line of such railroad, the tariffs of rates for the *287transportation of freight thereon, showing the rates for each class, and including general and special rates; and from such tariffs no reduction shall be made in favor of any person which is not also made in favor of all other persons or corporations by change in such published rates. Special rates, if so published, may be given to any person or corporation to aid in the development of any industrial enterprise in this state.”
“5551 (4147). Reduction of Regular Rates by Railroads. — Any person or corporation operating a railroad, who makes, and any person who knowingly accepts, a lower transportation rate for person or freight than the published tariff, must, on conviction, be fined not less than ten, nor more than five hundred dollars.”
“245 (Const. 1901). No railroad company shall give or pay any rebate, or a bonus in the nature thereof, directly or indirectly, or do any act to mislead or deceive the public as to the real rates charged or received for freights or passage;' and any such payments shall be illegal and void, and these prohibitions shall be enforced by suitable penalties.”
In order for plaintiff to recover in an action like this, it must show that it was compelled to pay unreasonable or excessive charges for the shipment of its freight. The fact that it paid more than it had contracted to pay is not sufficient. It must appear that it was compelled to pay more than the railroad company was authorized to charge, or collect from it, and it must appear that the excessive amount was paid involuntarily .or as a condition precedent to getting its freight or having it shipped. Paying such amount after the freight was shipped and delivered merely because it was demanded by the shipper is not sufficient. It was necessary for the plaintiff in this case to show that the contract of shipment relied upon as the basis *288of this action was one that was provided for by the statutory and constitutional regulations above referred to, or that the second contract under which the logs were shipped was unreasonable or was in violation of the law. The mere fact that the rates fixed by the contract were in excess of those fixed by the first contract is not sufficient; and plaintiff must show that these excessive charges were paid involuntarily, as above pointed out. Each count of the complaint as to which demurrers were sustained was (to say the best for it) indefinite and uncertain, and, as the demurrers went to these specific defects, they were properly sustained.
Construing the averments most strongly against the pleader, it does not appear that the rates fixed by the first contract were those authorized by the statute, or that they were not in violation of the statutory or constitutional provisions referred to, or that the rates charged or collected were in excess of those authorized by law. Nor does it certainly appear that the excessive charges were paid involuntarily, or under such duress or necessity as would authorize the shipper to recover the charges so paid. None of the counts show that plaintiff and defendant had any rights under the law to enter into any special contract different from that accorded other shippers, nor does it show that the charges or rates collected were different from, or in excess of, those charged other shippers. This is clearly necessary to entitle plaintiff to recover in this action. A mere contractual right alone is not sufficient to support the action. There must be shown a breach of duty, as well as of contract, to support the action. As was said by Stone, J., quoting Tindall, C. J.: “The payments must be made in order to induce the railroad company to do that which they were bound to do without them, and for tbe refusal to do *289Which an action on the case might have been maintained.” — M. & M. Ry. Co. v. Steiner et al., 61 Ala. 559. The statutes and constitutional provisions of this state, above set out, are very similar in effect to those of the Interstate Commerce Commission of Congress which were construed by the Supreme Court of the United States in the Rebate Case, 209 U. S. 56, 28 Sup. Ct. 428, 52 L. Ed. 691, wherein, in speaking of the special contracts between shipper and common carrier, the court in substance and effect said: It appears from that case that in June, 1905, the packing houses entered into contracts with the Burlington Railroad for the shipment of its products at a certain rate, but in August, 1905, the Burlington adopted a newly published rate much higher than that accorded to the packing houses in the contracts. By still giving the packers the benefit of the old rates it was charged that the packing houses were being accorded a rebate. All shippers must he treated alike under the interstate commerce laws, and Congress does not intend that the railroads and some shippers may get around the principle by secret contracts. .That ivas the broad principle laid down by Justice Day in announcing the decision of the court. Justice Day dealt at length with the attempted defense that the contract was the legal rate at the time it ivas made, and that there is nothing in the law destroying the right of contract so essential to carrying on business of the packing house character, and said (pages 80-82 of 209 II. S., and page 435 of 28 Sup. St. [52 L. Eel. 681]) : “This contention loses sight of the central and controlling purpose of the law, which is to require all shippers to be treated alike, and but one rate to he charged for similar carriage of freight, and that the filed and published rate, equally known by and available to every shipper. * * * There is no provision excepting the special contracts from the operation of *290the law. There is no provision for the filing of contracts with shippers and no method of making them public defined in the statute. * * * The law is not limited to giving of equal rates by indirect and uncertain methods. It has provided establishing of one rate to be filed as provided. * * '"' Any other construction of the statute opens the door to the possibility of the very abuses of unequal rates which it was the design of the statute to prohibit and punish. It may be urged that this construction lenders impossible the making of contracts for the future delivery of such merchandise as the petitioner deals in, and that the instability of the rates introduces a factor of uncertainty, destructive of contract rights enjoyed in such property. Such considerations of inconvenience or hardship address themselves to the lawmaking branch of the government, not to the courts.”
Pleas 3 and A set up the fact that plaintiff had breached the contract relied upon as the basis of its claim, and had refused to be bound by its terms, and therefore could not and should not hold the defendant to it. These facts, if true (and on demurrer they must be so taken), constituted a good defense to each of the counts to which they were interposed. A party will not be allowed, and should not be allowed, to both affirm and disaffirm the same contract at the same time. One who elects to avoid the burdens of a contract will not be allowed to reap the benefits thereof. These pleas were therefore sufficient'. — 16 Cyc. 785-791; Levy v. Bloch, 88 Ala. 290, 6 South. 833.
Pleas B, C, and E each set up, in varying language, the same defense — that is, that the contract relied upon as the basis of the action, and declared on, was invalid under the statutes and laws of this state, above referred to — that to enforce it would be to violate the law, in *291'that it would be a discrimination by tbe defendant against tbe public and in favor of plaintiff. If this be true (and on demurrer they must be so treated), they each presented a good defense to any count of tbe complaint.
Justices SIMPSON, ANDERSON, McOLELLAN, and EVANS are of tbe opinion that count 2 stated a good cause of action, and ivas not subject to tbe demurrer thereto.
Chief Justice DOWDELL and Justice SAYRE concur in tbe views of tbe writer that count 2 ivas bad, as well as tbe other counts as to which demurrers were sustained.
All tbe justices concur in bolding that, if it ivas error to sustain a demurrer to count 2, this court cannot say from tbe record that it ivas error without injury.
It therefore follows that the judgment must be revers- and tbe cause remanded.
Reversed and remanded.
Simpson, Anderson, McClellan and Evans, JJ., concur. Dowdell, G. J., and Mayfield and Sayre, JJ., dissent.