(a) Payment of Fees and Costs Required. A prisoner appealing a judgment in a civil action must pay in full the $505 fee required for commencement of the appeal. A prisoner who is unable to prepay this fee may apply to pay the fee in installments by filing with the Court of Appeals (1) an application to proceed without prepayment of fees; (2) a certified copy of the prisoner's trust fund account statement or institutional equivalent for the six-month period immediately preceding the filing of the notice of appeal, obtained from the appropriate official of each prison at which the prisoner is or was confined; and (3) a form consenting to the collection of fees from the prisoner's trust account.
(b) Effect of Prior Actions and Appeals. A prisoner who has, on three or more prior occasions, while incarcerated or detained in any facility, brought an action or appeal in a court of the United States that was dismissed on the grounds that it was frivolous, malicious, or failed to state a claim upon which relief could be granted, may not proceed on appeal without prepayment of fees unless the prisoner is under imminent danger of serious physical injury.