Quick search by citation:

26 U.S. Code § 3503 - Erroneous payments

Any tax paid under chapter 21 or 22 by a taxpayer with respect to any period with respect to which he is not liable to tax under such chapter shall be credited against the tax, if any, imposed by such other chapter upon the taxpayer, and the balance, if any, shall be refunded.

(Aug. 16, 1954, ch. 736, 68A Stat. 471.)