California Revenue and Taxation Code Section 32416
CA Rev & Tax Code § 32416 (2017)
If judgment is rendered for the plaintiff, the amount of the judgment shall first be credited on any taxes due from the plaintiff, and the balance shall be refunded to the plaintiff.