Every officer or other person upon receiving any fees provided for by law, if required by the person paying them, shall make a particular account thereof in writing specifying for what they accrued or the officer or other person forfeits to the person treble the sum paid, to be recovered in a civil action.