Unless otherwise stipulated, one-half of the fee in any case is a retainer and is due at any time unless the attorney, without sufficient cause, abandons the case before rendering service to that value. In cases where he has rendered such service but cannot render the balance of service due to the act of his client, providential cause, election to office, or removal out of the state, he is entitled to retain such amount or a due proportion thereof if collected, or if not collected, to bring an action to collect it. Where no special contract is made, the attorney may recover for the services actually rendered.