In any action against an unauthorized foreign or alien insurer upon a contract of insurance issued or delivered in this state to a resident of this state or to a corporation authorized to do business in this state, if the insurer has failed for thirty (30) days after demand prior to the commencement of the action to make payment in accordance with the terms of the contract, and it appears to the court that the refusal was vexatious and without reasonable cause, the court may allow to the plaintiff a reasonable attorney fee and include such fee in any judgment that may be rendered in the action. Such fee shall not exceed twelve and one-half percent (12 1/2%) of the amount which the court or jury finds the plaintiff is entitled to recover against the insurer, but in no event shall such fee be less than twenty-five dollars ($25). Failure of an insurer to defend any such action shall be deemed prima facie evidence that its failure to make payment was vexatious and without reasonable cause.
IC 27-4-4-5