That in all actions hereafter commenced, in which judgment is rendered against any insurance company as defined in K.S.A. 40-201, and including in addition thereto any fraternal benefit society and any reciprocal or interinsurance exchange on any policy or certificate of any type or kind of insurance, if it appear from the evidence that such company, society or exchange has refused without just cause or excuse to pay the full amount of such loss, the court in rendering such judgment shall allow the plaintiff a reasonable sum as an attorney's fee for services in such action, including proceeding upon appeal, to be recovered and collected as a part of the costs: Provided, however, That when a tender is made by such insurance company, society or exchange before the commencement of the action in which judgment is rendered and the amount recovered is not in excess of such tender no such costs shall be allowed.
K.S.A. 40-256