Edith Windsor paid $363053 in taxes that she thought she did not owe. She later challenged the constitutionality of the law that prevented its refund. United States v. Windsor, 570 U.S. ___ (2013)
Abigail Fisher paid a $100 application fee to the University of Texas. She sued to get it back, challenging the constitutionality of the university's race-sensitive admissions process. Fisher v. University of Texas, 570 U.S. ___ (2013)
In Federal courts, a case can only become moot if "in no event will the status of [the plaintiff] now be affected by any view this Court might express on the merits of this controversy." DeFunis v. Odegaard
416 U.S. 312 (1974) That isn't a sufficient condition, but it's a necessary condition. In the case of a fee that has been paid, the court can always order the fee refunded if the law didn't (or can't) actually require that it be paid.