(2) A prisoner seeking to bring a civil action or appeal a judgment in a civil action or proceeding without prepayment of fees or security therefor, in addition to filing the affidavit filed under paragraph (1), shall submit a certified copy of the trust fund account statement (or institutional equivalent) for the prisoner for the 6-month period immediately preceding the filing of the complaint or notice of appeal, obtained from the appropriate official of each prison at which the prisoner is or was confined.
(3) An appeal may not be taken in forma pauperis if the trial court certifies in writing that it is not taken in good faith.
(B) the average monthly balance in the prisoner's account for the 6-month period immediately preceding the filing of the complaint or notice of appeal.
(3) In no event shall the filing fee collected exceed the amount of fees permitted by statute for the commencement of a civil action or an appeal of a civil action or criminal judgment.
(4) In no event shall a prisoner be prohibited from bringing a civil action or appealing a civil or criminal judgment for the reason that the prisoner has no assets and no means by which to pay the initial partial filing fee.
(d) The officers of the court shall issue and serve all process, and perform all duties in such cases. Witnesses shall attend as in other cases, and the same remedies shall be available as are provided for by law in other cases.
(e)
(2) Notwithstanding any filing fee, or any portion thereof, that may have been paid, the court shall dismiss the case at any time if the court determines that –
(B) the action or appeal –
(ii) fails to state a claim on which relief may be granted; or
(iii) seeks monetary relief against a defendant who is immune from such relief.
(2)
(B) The prisoner shall be required to make payments for costs under this subsection in the same manner as is provided for filing fees under subsection (a)(2).
(C) In no event shall the costs collected exceed the amount of the costs ordered by the court.
(h) As used in this section, the term "prisoner" means any person incarcerated or detained in any facility who is accused of, convicted of, sentenced for, or adjudicated delinquent for, violations of criminal law or the terms and conditions of parole, probation, pretrial release, or diversionary program.
(June 25, 1948, ch. 646, 62 Stat. 954 ; May 24, 1949, ch. 139, §98, 63 Stat. 104 ; Oct. 31, 1951, ch. 655, §51(b), (c), 65 Stat. 727 ; Pub. L. 86–320, Sept. 21, 1959, 73 Stat. 590 ; Pub. L. 96–82, §6, Oct. 10, 1979, 93 Stat. 645 ; Pub. L. 101–650, title III, §321, Dec. 1, 1990, 104 Stat. 5117 ; Pub. L. 104–134, title I, §101[(a)] [title VIII, §804(a), (c)–(e)], Apr. 26, 1996, 110 Stat. 1321 , 1321-73 to 1321-75; renumbered title I, Pub. L. 104–140, §1(a), May 2, 1996, 110 Stat. 1327 )