The insurer within a reasonable time after the effective date of cancellation shall return whatever gross unearned premiums or accrued dividends are payable under the insurance contract to the company, which financed the insurance contract, for the benefit of the insured. Whenever any funds are received by the company which are in excess of the amount due to the company, such an excess shall be remitted promptly to the insured or to his order or to the insurance agent for the account of the insured.