26 USC 7422 - Civil actions for refund

(a) No suit prior to filing claim for refund 
No suit or proceeding shall be maintained in any court for the recovery of any internal revenue tax alleged to have been erroneously or illegally assessed or collected, or of any penalty claimed to have been collected without authority, or of any sum alleged to have been excessive or in any manner wrongfully collected, until a claim for refund or credit has been duly filed with the Secretary, according to the provisions of law in that regard, and the regulations of the Secretary established in pursuance thereof.
(b) Protest or duress 
Such suit or proceeding may be maintained whether or not such tax, penalty, or sum has been paid under protest or duress.
(c) Suits against collection officer a bar 
A suit against any officer or employee of the United States (or former officer or employee) or his personal representative for the recovery of any internal revenue tax alleged to have been erroneously or illegally assessed or collected, or of any penalty claimed to have been collected without authority, or of any sum alleged to have been excessive or in any manner wrongfully collected shall be treated as if the United States had been a party to such suit in applying the doctrine of res judicata in all suits in respect of any internal revenue tax, and in all proceedings in the Tax Court and on review of decisions of the Tax Court.
(d) Credit treated as payment 
The credit of an overpayment of any tax in satisfaction of any tax liability shall, for the purpose of any suit for refund of such tax liability so satisfied, be deemed to be a payment in respect of such tax liability at the time such credit is allowed.
(e) Stay of proceedings 
If the Secretary prior to the hearing of a suit brought by a taxpayer in a district court or the United States Court of Federal Claims for the recovery of any income tax, estate tax, gift tax, or tax imposed by chapter 41, 42, 43, or 44 (or any penalty relating to such taxes) mails to the taxpayer a notice that a deficiency has been determined in respect of the tax which is the subject matter of taxpayers suit, the proceedings in taxpayers suit shall be stayed during the period of time in which the taxpayer may file a petition with the Tax Court for a redetermination of the asserted deficiency, and for 60 days thereafter. If the taxpayer files a petition with the Tax Court, the district court or the United States Court of Federal Claims, as the case may be, shall lose jurisdiction of taxpayers suit to whatever extent jurisdiction is acquired by the Tax Court of the subject matter of taxpayers suit for refund. If the taxpayer does not file a petition with the Tax Court for a redetermination of the asserted deficiency, the United States may counterclaim in the taxpayers suit, or intervene in the event of a suit as described in subsection (c) (relating to suits against officers or employees of the United States), within the period of the stay of proceedings notwithstanding that the time for such pleading may have otherwise expired. The taxpayer shall have the burden of proof with respect to the issues raised by such counterclaim or intervention of the United States except as to the issue of whether the taxpayer has been guilty of fraud with intent to evade tax. This subsection shall not apply to a suit by a taxpayer which, prior to the date of enactment of this title, is commenced, instituted, or pending in a district court or the United States Court of Federal Claims for the recovery of any income tax, estate tax, or gift tax (or any penalty relating to such taxes).
(f) Limitation on right of action for refund 

(1) General rule 
A suit or proceeding referred to in subsection (a) may be maintained only against the United States and not against any officer or employee of the United States (or former officer or employee) or his personal representative. Such suit or proceeding may be maintained against the United States notwithstanding the provisions of section 2502 of title 28 of the United States Code (relating to aliens privilege to sue) and notwithstanding the provisions of section 1502 of such title 28 (relating to certain treaty cases).
(2) Misjoinder and change of venue 
If a suit or proceeding brought in a United States district court against an officer or employee of the United States (or former officer or employee) or his personal representative is improperly brought solely by virtue of paragraph (1), the court shall order, upon such terms as are just, that the pleadings be amended to substitute the United States as a party for such officer or employee as of the time such action commenced, upon proper service of process on the United States. Such suit or proceeding shall upon request by the United States be transferred to the district or division where it should have been brought if such action initially had been brought against the United States.
(g) Special rules for certain excise taxes imposed by chapter 42 or 43 

(1) Right to bring actions 

(A) In general 
With respect to any taxable event, payment of the full amount of the first tier tax shall constitute sufficient payment in order to maintain an action under this section with respect to the second tier tax.
(B) Definitions 
For purposes of subparagraph (A), the terms taxable event, first tier tax, and second tier tax have the respective meanings given to such terms by section 4963.
(2) Limitation on suit for refund 
No suit may be maintained under this section for the credit or refund of any tax imposed under section 4941, 4942, 4943, 4944, 4945, 4951, 4952, 4955, 4958, 4971, or 4975 with respect to any act (or failure to act) giving rise to liability for tax under such sections, unless no other suit has been maintained for credit or refund of, and no petition has been filed in the Tax Court with respect to a deficiency in, any other tax imposed by such sections with respect to such act (or failure to act).
(3) Final determination of issues 
For purposes of this section, any suit for the credit or refund of any tax imposed under section 4941, 4942, 4943, 4944, 4945, 4951, 4952, 4955, 4958, 4971, or 4975 with respect to any act (or failure to act) giving rise to liability for tax under such sections, shall constitute a suit to determine all questions with respect to any other tax imposed with respect to such act (or failure to act) under such sections, and failure by the parties to such suit to bring any such question before the Court shall constitute a bar to such question.
(h) Special rule for actions with respect to partnership items 
No action may be brought for a refund attributable to partnership items (as defined in section 6231 (a)(3)) except as provided in section 6228 (b) or section 6230 (c).
(i) Special rule for actions with respect to tax shelter promoter and understatement penalties 
No action or proceeding may be brought in the United States Court of Federal Claims for any refund or credit of a penalty imposed by section 6700 (relating to penalty for promoting abusive tax shelters, etc.) or section 6701 (relating to penalties for aiding and abetting understatement of tax liability).
(j) Special rule for actions with respect to estates for which an election under section 6166 is made 

(1) In general 
The district courts of the United States and the United States Court of Federal Claims shall not fail to have jurisdiction over any action brought by the representative of an estate to which this subsection applies to determine the correct amount of the estate tax liability of such estate (or for any refund with respect thereto) solely because the full amount of such liability has not been paid by reason of an election under section 6166 with respect to such estate.
(2) Estates to which subsection applies 
This subsection shall apply to any estate if, as of the date the action is filed
(A) no portion of the installments payable under section 6166 have been accelerated;
(B) all such installments the due date for which is on or before the date the action is filed have been paid;
(C) there is no case pending in the Tax Court with respect to the tax imposed by section 2001 on the estate and, if a notice of deficiency under section 6212 with respect to such tax has been issued, the time for filing a petition with the Tax Court with respect to such notice has expired; and
(D) no proceeding for declaratory judgment under section 7479 is pending.
(3) Prohibition on collection of disallowed liability 
If the court redetermines under paragraph (1) the estate tax liability of an estate, no part of such liability which is disallowed by a decision of such court which has become final may be collected by the Secretary, and amounts paid in excess of the installments determined by the court as currently due and payable shall be refunded.
(k) Cross references 

(1) For provisions relating generally to claims for refund or credit, see chapter 65 (relating to abatements, credit, and refund) and chapter 66 (relating to limitations).
(2) For duty of United States attorneys to defend suits, see section 507 of Title 28 of the United States Code.
(3) For jurisdiction of United States district courts, see section 1346 of Title 28 of the United States Code.
(4) For payment by the Treasury of judgments against internal revenue officers or employees, upon certificate of probable cause, see section 2006 of Title 28 of the United States Code.