Revenue and Taxation Code § 50148
ARTICLE 2. Suit for Refund
If a judgment made pursuant to Section 50145 is rendered for the plaintiff, the amount of the judgment shall first be credited on any fees due from the plaintiff, and the balance shall be refunded to the plaintiff.