This bill in equity was brought by a receiver, appointed by the Superior Court, in the name and behalf of the Union Mutual Casualty Insurance Corporation (herein referred to as the plaintiff or the plaintiff corporation), a corporation organized under the laws of the State of New York which had been engaged in this Commonwealth in the business of issuing policies of liability insurance on the mutual plan ■— particularly to owners of motor vehicles — to obtain an accounting by the defendant Insurance Budget Plan, Inc. (herein referred to as the defendant), a corporation organized under the laws of this Commonwealth, for premiums on insurance policies written by the defendant for the plaintiff corporation. The defendant filed an answer containing a counterclaim. The case was referred to a master who made a report. An interlocutory decree *64was entered, sustaining an exception of the plaintiff thereto and confirming the report as so modified. Thereafter a final decree was entered dismissing the counterclaim of the defendant, adjudging that the defendant owed the plaintiff the sum of $6,166.77, and providing for payment thereof and for costs. The defendant appealed from the interlocutory decree confirming the master’s report and both the plaintiff and the defendant appealed from the final decree.
The case involves the interpretation of a so called agency agreement between the plaintiff and the defendant, made October 22, 1930, and the rights of the parties thereto in the events which have happened. By this agreement the defendant was to procure applications for insurance in the plaintiff corporation and collect premiums thereon and was to receive commissions of fixed percentages "on the net premiums (i.e., the gross premiums paid to Company [the plaintiff] less premiums returned to the insured) paid to the Company on all policies of insurance procured by or through the Agent under this Agreement.” The agreement in paragraphs 5, 6 and 8, provided: “5. The Agent [the defendant] shall keep in books or records, the form of which shall be approved by the Company, an accurate account of all policies written or renewed for the Company and shall render to the Company at such times as may be required by the Company a statement of the business written and the amounts due the Company thereon, and the amounts due the Company thereon are to be remitted by the Agent whether received by him or not, as follows: On the 20th of the month following the date of issuance for all annual policies written; on extended payment policies secured by notes effective January 1st, 1931, thirty (30%) per cent of the annual premium is to be paid on January 10th; 20% on March 10th; 20% on May 10th; 20% on July 10th and 10% on September 10th, with similar arrangements on extended payment policies issued after January 1st, 1931, in accordance with the further instructions of the Company. 6. The Company reserves the right during the term of this contract, or in the event of its cancellation, without releasing the Agent in any way, to make collections *65of any premiums not remitted and paid to the Company in accordance with the conditions imposed in the preceding paragraph. When such collections are made by the Company, the commissions due the Agent shall be computed on the actual amount collected less the cost of making the collections. ... 8. The monies and other properties received by the Agent for and on behalf of the Company shall be held by the Agent in a fiduciary capacity and shall not be used by the Agent for any purpose whatsoever except for transmittal to the Company, and the Agent shall be liable to the Company for all such monies and properties received by the Agent, its employees and representatives.” The agreement provided also that the defendant should “make a short rate or pro rata charge and collect for the earned portions of policies returned for cancellation or recalled, as the case may be” and that “Commissions shall accrue only on such net premiums as are actually paid to the Company, and shall be payable on the date of the payment of such net premiums.”
The defendant did some business on “open accounts.” In doing this business it charged to the insured or to the defendant’s agents procuring the business the full amount of the annual premiums. But the principal part of the defendant’s business consisted of “financing automobile insurance accounts.” In doing this business the defendant took from the insured under each policy “a note for the full amount of the premium from the date of the policy to be effective to the end of the calendar year plus a finance charge of 10%.” Provisions ordinarily were made for an initial payment and for eight equal monthly instalment payments of the balance of the premium and the charge for financing. And the note contained a power of attorney to the payee or any holder thereof on default by the maker to cancel the policy and to collect any return premium or dividend, an assignment to the payee or any holder of the note, unless and until the obligation of the maker thereof was discharged by full payment, of the right of the maker to cancel the insurance and his right to any return premium or dividend, and an authorization to the payee to *66“replace this insurance in any other insurance company at his discretion.” Compare Chamberlain v. Employers’ Liability Assurance Corp. Ltd. 289 Mass. 412. All the insurance policies written by the defendant for the plaintiff corporation “included as a major part of the coverage the compulsory Massachusetts Automobile Liability Insurance.” On or about February 21, 1931, the commissioner of insurance of the Commonwealth “notified the plaintiff that its surplus was not properly kept and stated that the plaintiff should withdraw from the Commonwealth” or the commissioner would institute proceedings “to eject the plaintiff from said Commonwealth.” On or about March 11, 1931, as of March 16, 1931, the plaintiff, by reason of this request of the commissioner, withdrew from the Commonwealth. All insurance policies written by the defendant for the plaintiff under the agency agreement were cancelled as of March 16, 1931. On May 26, 1931, the plaintiff corporation was dissolved by decree of the Supreme Court of the State of New York, on grounds which do not appear specifically in the master’s report, and all its assets and affairs were transferred to the superintendent of insurance of that State. On July 30, 1931, the receiver in this Commonwealth was appointed.
The premiums on policies of insurance written by the defendant for the plaintiff before March 11, 1931, for the periods from the dates the insurance attached to the end of the year 1931 amounted to $88,000 (including $13,000 on “open accounts” and $75,000 on “financed accounts”), and the commissions on this amount would have been $15,900. The premiums prorated to March 16, 1931, would have amounted to $14,000 and the commissions on this amount would have been $3,000. The defendant, so far as it was able, as of March 16, 1931, replaced in other companies insurance formerly with the plaintiff, but in many instances of “financed accounts” the persons insured refused to permit the defendant so to replace insurance. The full premiums on policies not replaced amounted to $35,000. After such replacement of insurance the defendant retained the notes above referred to and applied *67the amounts collected thereon and on “open accounts” to the payment of premiums on insurance replaced by it. The defendant collected $13,000 — the full amount of the premiums — on “open accounts.” It agreed before the master for the purposes of this case that the aggregate amount of premiums collected by it was $50,000. And the defendant turned over to counsel for the plaintiff at the request of the plaintiff accounts to the amount of $2,727 upon which $197 was collected by such counsel. Some of the policies not replaced may have been cancelled for failure to pay instalments to the defendant on notes or for violation of the automobile laws. But the master was unable to find the extent to which such policies were so cancelled.
The amount adjudged by the final decree to be due from the defendant to the plaintiff was the amount of premiums prorated to March 16, 1931, treated as “earned premiums,” less deductions for amounts paid by the defendant to the plaintiff, or collected directly by the plaintiff, and for- the defendant’s commissions computed on the basis of such earned premiums. The defendant contends that it does not owe to the plaintiff more than the amount of the earned premiums, less proper deductions, but that it is entitled to commissions on the full amount of the premiums and, therefore, is entitled to recover on its counterclaim. The plaintiff contends that the defendant owes it the full amount of the premiums, less proper deductions, and concedes that if this contention is sustained, the defendant is entitled to commissions on the full amount of the premiums. The plaintiff contends also that the amounts collected by the defendant are held by it in trust for the plaintiff.
First. The amount owed by the defendant to the plaintiff, disregarding proper deductions, was the amount of the premiums prorated to March 16, 1931 — the earned premiums — that is, $14,000.
By the terms of the agency agreement the defendant was bound to remit to the plaintiff the “amounts due” to the plaintiff on business written by the defendant “whether received by him or not.” The “amounts due” are those *68due to the defendant from policy holders. The defendant guaranteed payment of these amounts. At the times the policies were issued the “amounts due,” whether on “open accounts” or on “financed accounts,” were the full premiums. The defendant, however, was given time within which to make payments to the plaintiff. And the agency agreement provided that in case policies were cancelled the amounts to be collected by the defendant were the amounts of the earned premiums. It is clear, therefore, that to the extent, at least, of the premiums earned before cancellation of the policies the defendant was liable to the plaintiff therefor whether or not such premiums were collected.
The question for determination, however, is the liability of the defendant for premiums in excess of earned premiums. We consider this liability, in the first instance, on the assumption that the rules applicable to cancellation of policies in the ordinary course of business are applicable here.
The plaintiff does not contend that, in the case of cancellation of policies in the ordinary course of business, policy holders who have paid the full amount of their premiums would not be entitled to return premiums to the extent that premiums were not earned. See G. L. (Ter. Ed.) c. 175, § 113A (2), (3). Indeed, though the terms of-the policies do not appear from the master’s report, the agency agreement indicates that policy holders would be so entitled. And the right of the plaintiff to recover in actions brought after cancellation against policy holders for unpaid premiums would be limited to earned premiums. Hill v. Baker, 205 Mass. 303, 309-310.
The effect of the provision in the agency agreement applicable in cases of cancellation of policies that the defendant should collect earned premiums is to reduce the “amounts due,” payment of which is guaranteed by the defendant, to the amounts of the earned premiums. This reduction takes effect by reason of a change in the contractual obligation of the defendant resulting from changed circum.stances and not by reason of set-off,. Such reduction js *69clearly applicable to policies cancelled prior to the dates fixed for payments by the defendant to the plaintiff where unearned premiums have not been collected by the defendant. And we think such reduction applicable also to policies so cancelled after the dates fixed for payments by the defendant to the extent that unearned premiums were then uncollected. It follows that if these policies had been cancelled in the ordinary course of business the defendant' would not be liable to the plaintiff for premiums unearned and uncollected.
It remains to consider, however, the liability of the defendant to the plaintiff for unearned premiums collected by the defendant from policy holders. In this connection it is to be observed that the defendant occupied a dual position. See Westfield Cigar Co. v. Insurance Co. of North America, 169 Mass. 382, 384; Michelson v. Franklin Fire Ins. Co. of Philadelphia, 252 Mass. 336, 339. Under the agency contract the defendant was the agent of the plaintiff to receive premiums on policies written by the defendant for the plaintiff. G. B. (Ter. Ed.) c. 175, § 169. And by the terms of the notes given on “financed accounts” the defendant was the agent of policy holders on such accounts to replace their insurance in other companies. Moreover, from the facts found by the master it appears that the defendant was the agent of the policy holders on “open accounts” to replace their insurance. Amounts collected from policy holders after the cancellation of policies in the plaintiff corporation and the replacement of insurance in other corporations, so far as not required for the payment of earned premiums on policies of the plaintiff corporation, are to be regarded as received by the defendant as agent of such policy holders. The defendant, therefore, is not required to account for such premiums to the plaintiff.
Amounts collected from policy holders by the defendant before cancellation of the policies, however, stand on a somewhat different basis. Whether these amounts were paid on account of earned or of unearned premiums, as between the plaintiff and the policy holders they were re*70ceived by the defendant as the agent of the plaintiff. If, however, unearned premiums had not been received by the defendant, they could not have been collected by the plaintiff from the policy holders after cancellation of the policies in the ordinary course of business, and such unearned premiums received by the defendant before cancellation and not paid by it to the plaintiff could be recovered by the policy holders from the plaintiff. The law applicable to the liability of an agent to a third person for money received by such agent from such third person for the principal and not paid to the principal was stated in Cabot v. Shaw, 148 Mass. 459, 460, as follows: "The liability of an agent, who has acted in good faith, to repay money paid to him for his principal, arises only when the party ' paying it proves that he has the right to recall it, and that he has notified the agent and made a demand on him before the money was paid over to the principal. After such demand, if the money is still held by the agent, and no change has taken place in his situation, the law regards it as held for the use of the "party entitled to it, who may maintain an action for it.” See also Daly v. Crawford, 279 Mass. 262, 268; Bromfield v. Gould, 289 Mass. 80, 83. Whether in accordance with this principle a third person can recover in an action against the agent where such third person’s right to the money arose after payment by him to the agent need not be decided. Compare Am. Law Inst. Restatement: Agency, §§ 339, 340. Mechem, Agency, §§ 1430, 1436-1438. Smith v. Binder, 75 Ill. 492. But payment of such money by the agent to the third person or application thereof by his authority for his use is a defence to an action therefor by the principal against the agent. Am. Law Inst. Restatement: Agency, § 417. The facts found by the master bring the case within this principle so far as unearned premiums collected by the defendant before cancellation are concerned. Amounts collected for such unearned premiums have been applied by the defendant to the replacement of insurance in other companies as authorized by the policy holders and such application of the unearned premiums is a defence to this suit so far as it is *71brought to recover such premiums. And the record does not disclose that the defendant has collected unearned premiums from policy holders for whom it did not replace insurance. Furthermore, such application of amounts collected for unearned premiums was not .a breach of the trust imposed by the agency agreement on money received by the defendant for transmission to the plaintiff or of the similar trust imposed by G. L. (Ter. Ed.) c. 175, § 176. On the basis, therefore, of cancellation in the ordinary course of business the plaintiff is not entitled to recover from the defendant any amounts in excess of the earned premiums.
The plaintiff contends, however, that the principles applicable to cancellation of policies in the ordinary course of business are not applicable here, particularly in view of the fact that the plaintiff is a mutual company. We think that those principles are applicable.
The provision in the agency agreement with respect to cancellation of the policies is not to be interpreted as inapplicable to cancellation by reason of withdrawal of the plaintiff from the Commonwealth. There is a statutory requirement for inclusion in policies of compulsory motor vehicle insurance of provisions for paying return premiums in case of such withdrawal (G. L. [Ter. Ed.] c. 175, § 113A [3]) and it is to be inferred that cancellation by reason of withdrawal of the plaintiff from the Commonwealth was within the contemplation of the parties to the agency agreement.
It is true that in a mutual company the policy holders are both insurers and insured persons and as insurers are liable to assessment. Consol. Laws of N. Y. (1930) c. 30, § 346. See also G. L. (Ter. Ed.) c. 175, §§ 81, 83, 90, 150, 151 (Second). Commonwealth v. Massachusetts Mutual Fire Ins. Co. 112 Mass. 116, 121-122. But this is not a suit to recover assessments. And the defendant did not by the agency agreement agree to collect assessments or guarantee the payment thereof. Nor does it seek here to set off or recoup against assessments on policy holders any claim of its own or any claims of the policy holders. Compare Stone *72v. Old Colony Street Railway, 212 Mass. 459; Butterworth v. Smith, 240 Mass. 192. Furthermore, the rights and liabilities of the policy holders, performance of whose obligations as to premiums, as distinguished from assessments, was guaranteed by the defendant, were fixed at the time of the withdrawal of the plaintiff from the Commonwealth and the cancellation of the policies — March 16, 1931. As of that time the liabilities of the policy holders and of the defendant as guarantor were reduced to the amount of the earned premiums as in case of cancellation in the ordinary course of business. Hill v. Baker, 205 Mass. 303, 309-310. See also Fayette Mutual Fire Ins. Co. v. Fuller, 8 Allen, 27, 34-35 (where the policies provided for return premiums [page 30] by language similar to that used in the agency agreement with reference to the collection by the defendant of earned premiums), explained in Commonwealth v. Massachusetts Mutual Fire Ins. Co. 112 Mass. 116, 125. And see Traders’ Mutual Fire Ins. Co. v. Stone, 9 Allen, 483. The fact that the cancellation of policies resulted from the plaintiff’s withdrawal from the Commonwealth in itself did not prevent reduction of the policy holders’ liabilities for premiums. And though the reason for such withdrawal was the action of the commissioner of insurance based on ■the condition of the plaintiff’s surplus, there is nothing in the record, beyond a basis for conjecture, that the plaintiff was insolvent at that time. Compare Fayette Mutual Fire Ins. Co. v. Fuller, 8 Allen, 27; Commonwealth v. Massachusetts Mutual Fire Ins. Co. 112 Mass. 116, 126. Furthermore, no receiver had been appointed at the time of the cancellation of the policies, and the dissolution of the plaintiff corporation by decree of the Supreme Court of the State of New York and the transfer of its assets and affairs to the superintendent of insurance of the State of New York took place after such cancellation had become effective. The case, therefore, is distinguishable from Commonwealth v. Massachusetts Mutual Fire Ins. Co. 112 Mass. 116, 125, Commonwealth v. Mechanics Mutual Fire Ins. Co. 112 Mass. 192, and Stone v. Old Colony Street Railway, 212 Mass. 459, relied on by the plaintiff.
*73Second. The defendant is entitled to credit for commissions — amounting to $3,000 — on earned premiums.
The amount of commissions to which the defendant is entitled depends upon the terms of the agency agreement applied to the facts of the case. Federal Ins. Co. v. Gilmour, 206 Mass. 203, 206. By the terms of the agreement commissions "accrue only on such net premiums as are actually paid to the Company” and are “payable on the date of the payment of such net premiums,” and "net premiums” are defined as "gross premiums paid to Company less premiums returned to the insured.” And the agreement provided further that in case of cancellation the defendant should "make a short rate or pro rata charge and collect for the earned portions of policies.” Clearly, therefore, according to the provisions of the agency agreement, in the ordinary course of business, the defendant was not to receive commissions on premiums not paid by it to the plaintiff — except as it might be entitled to partial commissions on premiums collected by the plaintiff in accordance with a special provision in the agreement. Indeed the defendant was not even to receive commissions on premiums actually paid by it to the plaintiff but returned by the plaintiff to the policy holders. It is to be observed that the service rendered by the defendant to the plaintiff for which it was to be paid was not limited to procuring applications for insurance but included also guaranteeing the payment of premiums. In this respect the case differs from T. T. Hay & Brother v. Union Fire Ins. Co. 167 N. C. 82, 83-84, and Johnson v. Button, 120 Va. 339, 344, relied on by the defendant. And, as already stated, the guaranty of the defendant was limited by the provisions of the agency agreement to earned premiums. Such earned premiums, therefore, furnish the measure of the defendant’s service so far as the guaranty of premiums is concerned. And cancellation of policies by reason of the withdrawal of the plaintiff from the Commonwealth, which was contemplated by the parties to the agency agreement, like cancellation in the ordinary course of business, is cancellation with respect to the reduction of commissions as *74well as with respect to- the reduction of premiums, within the meaning of the agreement. The case resembles Independence Indemnity Co. v. Dreyfus, 49 Fed. Rep. (2d) 599, more nearly than Bothwell v. Employers Underwriters Agency, Inc. 145 Md. 36, relied on by defendant.
Third. The final decree was right in adjudging that the defendant owes the plaintiff the sum of $6,166.77.
It is undisputed that the defendant has paid to the plaintiff the sum of $4,636.23 and is entitled to credit for the amount so paid. And the plaintiff makes no contention that the defendant is not entitled also to credit in the amount of $197 for premiums collected by counsel for the plaintiff. The defendant, however, contends that it is entitled to credit for $2,727, the full amount of premiums on accounts turned over by it to such counsel for the plaintiff, upon which accounts this sum of' $197 was collected, instead of to credit only for the amount actually collected on such accounts. This contention is unsound. The decision here made relieves the defendant from liability for such part of these accounts as represents unearned premiums. But nothing in the agency agreement relieves the defendant from its liability for such part of these accounts as represents earned premiums. Finally, the defendant does not argue in this court that it is entitled to damages for breach of the agency agreement. The aggregate amount, including $3,000 for commissions, of credits to which the defendant is entitled is, therefore, $7,833.23 and the excess of the amount of earned premiums for which the defendant is liable over the aggregate amount of credits is $6,166.77.
Interlocutory decree affirmed.
Final decree affirmed.