Whenever any application to the Department of Motor Vehicles is accompanied by any fee as required by law and such application is refused or rejected, the fee shall be returned to the applicant.

Whenever the Department through error collects any fee not required to be paid under this chapter, the fee may be refunded on its own initiative and shall be refunded to the person paying the fee upon application therefor made within six months after the date of such payment.