delivered the opinion of the court.
This was an action to recover damages for the breach of a contract for the sale and delivery of a crop of wheat estimated at 14,000 bushels. The plaintiff was a Tennessee corporation engaged in operating a flour and feed mill at Union City, in that State. The defendant was a resident of Hickman, Kentucky, and extensively engaged in farming in that vicinity. They were the parties to the contract. It was made at Hickman and the wheat was to be delivered and paid -for there. . But the delivery was to be on board the cars of a common carrier, and the plaintiff intended to ship the wheat to its mill in Tennessee. A small part of the crop was delivered as agreed, but delivery of the rest was refused, although the plaintiff was prepared and expecting to receive and pay for it. A payment advanced on the crop more than covered what was delivered.' At the time for delivery wheat had come to-be worth several cents per bushel more than the price fixed by the contract. The action was brought in a state court in Kentucky.
The principal defense interposed — the only one which we have occasion to notice — was to the' effect that the plaintiff had not complied, as was the fact, with a statute of Kentucky (Ky. Stats. 1915, § 571) prescribing the conditions on which corporations of other States might do business in that State, and that the contract was therefore not enforceable. To this the plaintiff replied that the only business done by it in Kentucky consisted in purchasing *287wheat and other grain in that State for immediate shipment to its Tennessee mill and then shipping the same there; that the contract in question was made in the course of this business and with the purpose of forwarding the wheat to the mill as soon as it was delivered on board the cars; that this transaction was in interstate commerce and as to it the statute of Kentucky whose application was invoked by the defendant was invalid because in conflict with the commerce clause of the Constitution of the United States.
The cause was tried twice. On the first trial the plaintiff obtained a verdict and judgment, the court ruling .that the statute could not constitutionally be applied to the transaction in question. But the Court of Appeals of the State, while conceding the invalidity of the statute as respects transactions in interstate commerce, held the transaction in question was not in such commerce, declared the statute valid and properly enforceable as to that transaction and reversed the judgment with a direction for a new trial. That court proceeded on the theory that, as the contract was made in Kentucky, related to property then in that State and was to be wholly performed therein, the transaction was • strictly intrastate and not within the reach ,or protection of the commerce clause of the Constitution of the United States; — and this although the wheat was to be delivered oh board the cars of a public carrier and the plaintiff intended to ship it to Tennessee as soon as it was so delivered. 175 Ky. 774. On the second trial a verdict for the defendant was directed because the plaintiff had not complied with the statute. The jury conformed to the direction, judgment was entered on the verdict and that judgment was affirmed by the Court of Appeals on the authority of its former decision. 185 Ky. 386.
The case is here on a writ of error and our jurisdiction is challenged. The objection is not that we are without *288power to review the judgment, but that it can be reviewed only on a writ of certiorari. The controlling'statute is § 237 of the Judicial Code, as amended by the Act of September 6, 1916, c. 448, 39 Stat. 726. Besides confining our power of review in cases litigated in the state courts to those in which the decision of a federal question is involved, this jurisdictional section provides that the review in cases falling within certain classes may be on writ of error and in others on writ of certiorari, the distinguishing or dividing line being drawn according to the nature of the federal question and the way in which the state court decides it. Some cases may fall on both sides of the line, but with this we are not now concerned. Among those in which the review may be on writ of error the section includes—
“ any suit . . . where is drawn in question the validity of a statute of, or an authority exercised under any State, on the ground of their being repugnant to the Constitution, treaties, or laws' of the United States, and the decision is in favor of their validity.”
Among those in which the review may be on writ o.f certiorari are—
“ any cause . . . where is drawn in question the validity of a statute of, or an authority exercised under any State, on the ground of their being repugnant to the Constitution, treaties, or laws of the United States, and the decision is against their validity ”; and .
“ any cause . ■. . where any title, right, privilege, or immunity is claimed under the Constitution, or any treaty or statute of, or commission held or authority exercised under the United States, and the decision is either in favor of or against the title, right, privilege, or immunity especially set up or claimed, by either party, under such Constitution, treaty, statute, commission, or authority.”
In the state court the plaintiff did not simply claim a right or immunity under the Constitution of the United *289States, but distinctly insisted that as to the transaction in question the Kentucky statute was void, and therefore unenforceable, because in conflict with the commerce clause of the Constitution. The court did not accede to the insistence, but applied and enforced the statute. Of course, that was an affirmation of its validity when so applied. Bridge Proprietors v. Hoboken Co., 1 Wall. 116, 144; McCullough v. Virginia, 172 U. S. 102, 116-117; General Oil Co. v. Crain, 209 U. S. 211, 228; Corn Products Refining Co. v. Eddy, 249 U. S. 427, 432. And see Western Union Telegraph Co. v. Kansas, 216 U. S. 1, 3, 27. The case is therefore of the class described in the first of the provisions which we have quoted from the jurisdictional section. That the statute was not claimed to be invalid in toto and for every purpose does not matter. A statute may be invalid as applied to one state of facts and yet valid as applied to another. Poindexter v. Greenhow, 114 U. S. 270, 295; St. Louis, Iron Mountain & Southern Ry. Co. v. Wynne, 224 U. S. 354; Kansas City Southern Ry. Co. v. Anderson, 233 U. S. 325. Besides, a litigant can be heard to question a statute’s validity only when and so far as it is being or is about to be applied to his disadvantage. Yazoo & Mississippi Valley R. R. Co. v. Jackson Vinegar Co., 226 U. S. 217; Jeffrey Manufacturing Co. v. Blagg, 235 U. S. 571, 576. Neither does it matter on what ground the court upheld and enforced the statute. The provisions quoted from the jurisdictional section show that in cases where the validity of a state statute is drawn in question because of alleged repugnance to the Constitution the mode of review depends on, the wayin which the state court resolves the question. If it be resolved in favor of the validity of the statute the review may be on a writ of error; and if it be resolved against the validity the review can only be on writ of certiorari. The provisions take no account of the particular grounds or reasons on which the decision is put.
*290It is loosely said in one of the briefs for the plaintiff that the “ sole question for decision ” is whether the contract was a part of interstate commerce; but we attach no importance to this, because it not only is said in the same brief that the plaintiff “maintained in the state court, and it maintains here, that the Kentucky statute, as construed and applied in this case by the state court, is unconstitutional under the commerce clause,” but much of that brief and of another is devoted to an effort to show the invalidity of the statute in that regard.
Our conclusion on the jurisdictional question is that, as the state court applied and enforced to the plaintiff’s disadvantage a state statute which the plaintiff seasonably insisted as so applied and enforced was repugnant to the Constitution and void, the case is rightly here on writ of error. Like rulings on like grounds will be found in Eureka Pipe Line Co. v. Hallanan, ante, 265, and United Fuel Gas Co. v. Hallanan, ante, 277.
The commerce clause of the Constitution, Art. I, § 8, cl. 3, expressly commits to Congress and impliedly withholds from the several States the power to regulate commerce among the latter. Such commerce is not confined to transportation from one State to another, but comprehends all commercial intercourse between different States and all the component parts of that intercourse. Where goods in one State are transported into another for purposes of sale the commerce does not end with the transportation, but embraces as well the sale of the goods after they reach their destination and while' they are in the original packages. Brown v. Maryland, 12 Wheat. 419, 446-447; American Steel & Wire Co. v. Speed, 192 U. S. 500, 519. On the same principle, where goods are purchased in one State for transportation to another the commerce includes the purchase, quite as much as it does the transportation. American Express Co. v. Iowa, 196 U. S. 133, 143. This has been recognized in many deci*291sions construing the commerce clause. Thus it was said in Welton v. Missouri, 91 U. S. 275, 280: “Commerce is a term of the largest import. It comprehends intercourse for the purposes of trade in any and all its forms, including the transportation, purchase, sale, and exchange of commodities.” In Kidd v. Pearson, 128 U. S. 1, 20, it was tersely said: “ Buying and selling and the transportation incidental thereto constitute commerce.” In United States v. E. C. Knight Co., 156 U. S. 1, 13, “ contracts to buy, sell, or exchange goods to be transported among the several States ” were declared “ part of interstate trade or commerce.” And in Addyston Pipe & Steel Co. v. United States, 175 U. S. 211, 241, the court referred to the prior decisions as establishing that “ interstate commerce consists of intercourse and traffic between the citizens or inhabitants of different States, and includes not only the transportation of persons and property and the navigation of public waters for 'that purpose, but also the purchase, sale and exchange of commodities.” In no case has the court made any distinction between buying and selling or between buying for transportation to another State and transporting for sale in another State. Quite to the contrary, the import of the decisions has been that if the transportation was incidental to buying or selling it was not material whether it came first or last.
A corporation of one State may go into another, without obtaining the leave or license of the latter, for all the legitimate purposes of such commerce - and any statute of the latter State which obstructs or lays a burden on the exercise of this privilege is void under the commerce clause. Crutcher v. Kentucky, 141 U. S. 47, 57; Western Union Telegraph Co. v. Kansas, 216 U. S. 1, 27; International Textbook Co. v. Pigg, 217 U. S. 91, 112; Sioux Remedy Co. v. Cope, 235 U. S. 197.
There is no controversy about the facts bearing on the character of the transaction in question. It had been the *292practice of the plaintiff to go into Kentucky to purchase grain to be transported to and used in its mill in Tennessee. On different occasions it had purchased from the defendant — at one time 13,000 bushels of corn. This contract was made in continuance of that practice, the plaintiff intending to forward the grain to its mill as soon as the delivery was made, In keeping with that purpose the delivery was to be on board the cars of a public carrier. Applying to these facts the principles before stated, we think the transaction was in interstate commerce. The state court, stressing the fact that the contract was made in Kentucky and was to be performed there, put aside the further facts that the delivery was to be on board the cars and that the plaintiff, in continuance 'of its prior practice, was purchasing the grain for shipment to its mill in Tennessee. We think the facts so neglected had a material bearing and should have been considered. They showed that what otherwise seemed an intrastate transaction was a part of interstate commerce. See Swift & Co. v. United States, 196 U. S. 375, 398; United States v. Reading Co., 226 U. S. 324, 367; Pennsylvania R. R. Co. v. Clark Brothers Coal Mining Co., 238 U. S. 456-468; Eureka Pipe Line Co. v. Hallanan, supra. The state court also attached some importance to the fact that after the grain was delivered on the cars the plaintiff might have changed its mind and have sold the grain at the place of delivery or have shipped it to another point in Kentucky. No doubt this was possible, but it also was improbable. With equal basis it could be said that a shipment of merchandise billed to a point beyond the State of its origin might be halted by the shipper in the exercise of the right of stoppage in transitu before it got out of that State. .The essential character of the transaction as otherwise fixed is not changed by a mere possibility of that sort. See United Fuel Gas Co. v. Hallanan, supra.
For these reasons we are of opinion that the transaction was a part of interstate commerce, in which the plaintiff *293lawfully could engage without any permission from the State of Kentucky, and that the statute in question, which concededly imposed burdensome conditions* was as to that transaction invalid because repugnant to the commerce clause.
Judgment reversed.