
224 Cal.App.2d 507 (1964)
HAROLD W. SYMMONDS, as Executor, etc., Plaintiff and Respondent,
v.
PACIFIC HOMES, Defendant and Appellant.
Civ. No. 26843. 
California Court of Appeals. Second Dist., Div. Three.  
Feb. 6, 1964.
 Roland Maxwell, Paul H. Marston and Richard W. Olson for Defendant and Appellant.
 Earl E. Howard and Charles F. Howard for Plaintiff and Respondent.
 FORD, J.
 In an action for declaratory relief brought by the executor of the estate of Walter H. Gobelet, deceased, it was determined that an agreement executed by Mr. Gobelet and the defendant Pacific Homes, a nonprofit corporation, on or about October 1, 1954, did not entitle Pacific Homes to retain $15,500 which had been paid to Pacific Homes by Mr. Gobelet during his lifetime. The defendant has appealed from the judgment.
 The agreement, which was in the form of a letter, was as follows:
 "October 1, 1954"
 Mr. Walter Gobelet
 Gillis Hall
 Pacific Home
 Los Angeles 29, California
 Dear Mr. Gobelet:
 This will confirm our conversation of this date in which we agree to accept the deposit of your funds and hold them in an open account subject to withdrawals on your order. We agree to pay you a dividend of 4% per annum payable quarterly.
 It is our understanding that in the event of your death the balance of your account is to be paid to the Endowment Fund of Pacific Home.
 Will you kindly sign the copy of this letter as acknowledgement of these wishes.
 Very truly yours,
 Victor A. Parker
 General Auditor
 VAP:nw
 I agree to the above (S) Walter Gobelet""
 At the trial it was stipulated that the defendant is a corporation organized for charitable purposes which operates several homes for retired persons on the basis of a life-care plan. *509 One place of residence was formerly known as Pacific Home. Mr. Gobelet became a member thereof in 1942 pursuant to a written agreement which was thereafter fully performed by both parties. He was a member at the time of his death on December 11, 1960.
 Pursuant to the agreement of October 1, 1954, set forth hereinabove, from time to time Mr. Gobelet deposited with Pacific Homes money in sums of $500 or $1,000. He made no withdrawals. The total amount so deposited was $15,500. Interest at the rate of 4 per cent per annum was paid quarterly to Mr. Gobelet by Pacific Homes until his death.
 Mr. Parker, whose position with the defendant at the time of the trial was that of controller, testified that a fund known as the "Endowment Fund" had been established by the corporation and was administered under his supervision. The fund was in existence in 1954. The net income therefrom was used solely for the benefit of members who could not pay the necessary fees in full.
 On behalf of the plaintiff, two letters which had been sent to Mr. Gobelet by the defendant were received in evidence. One letter, dated May 28, 1948, made reference to a gift of $100 to the "New Hospital Fund," and the other letter, dated January 13, 1954, contained an expression of appreciation for a "gift of $5,000.00 for the endowment fund."
 [1a] The trial court determined that it was never the intention of Mr. Gobelet "to create, enter into or execute: (a) a will; (b) a contract or gift, either present or future; (c) a trust, either express, tentative or otherwise, with respect to the retention of the amount on deposit at the date" of his death, and that "the funds on deposit with defendant ... constitute a part of the assets of the estate of said decedent." For reasons which will be stated, we have reached the conclusion that, as a matter of law, the determination of the trial court was erroneous.
 The criterion to be followed in determining whether a payment of money by one person to another has resulted in the creation of a debt or in the creation of a trust is expressed in comment g of section 12 of the Restatement Second of Trusts. It is there stated: "If one person pays money to another, it depends upon the manifested intention of the parties whether a trust or debt is created. If the intention is that the money shall be kept or used as a separate fund for the benefit of the payor or a third person, a trust is created. If the intention is that the person receiving the money shall have the unrestricted *510 use thereof, being liable to pay a similar amount whether with or without interest to the payor or to a third person, a debt is created."
 "The intention of the parties will be ascertained by a consideration of their words and conduct in the light of all the circumstances. Among the circumstances which may be of importance in determining the intentions of the parties are: (1) the presence or absence of an agreement to pay interest on the money paid; (2) the amount of money paid; (3) the time which is to elapse before the payee is called upon to perform his agreement; (4) the relative financial situation of the parties; (5) the relations between the parties; (6) their respective callings; (7) the usage or custom in such or similar transactions."
 "If there is an understanding between the parties that the person to whom money is paid shall pay 'interest' thereon (at a fixed or at the current rate, and not merely such interest as the money, being invested, may earn) the relationship is practically always a debt and not a trust. Interest is paid for the use of the money, and if the payee pays interest he is, in the absence of a definite understanding to the contrary, entitled to use the money for his own purposes. It is theoretically possible, of course, for a trustee to pay 'interest' from his own funds, but in the absence of a clear agreement to that effect such an intention would not be found."  [fn. 1]
 In the joint pretrial statement the parties agreed that "interest at the rate of 4 per cent was paid" quarterly to Mr. Gobelet by the defendant, "the aggregate amount of said interest payments being $523.32." Moreover, in the agreement of October 1, 1954, reference was made to an "account" and there was no provision that the money be kept or used as a separate fund. The only reasonable inference which finds support in the record is that the parties to the agreement intended to create a relationship of debtor and creditor. (See Kooy v. Van Winkle, 88 F.2d 481; 1 Scott on Trusts,  12.2, pp. 87-88.)
 The remaining question to be resolved is the nature and effect of the second paragraph of the agreement.  [fn. 2] It is clear *511 that the endowment fund was not a separate entity but was a fund held and administered by the defendant Pacific Homes in the furtherance of its charitable purposes. The obvious intent of the parties as expressed in their agreement was that upon the death of Mr. Gobelet the defendant's obligation to him would be extinguished or terminated and that the endowment fund would be credited with the amount of the previously existing obligation. [2] A contractual provision of that nature is valid. As stated in section 1267 of Corbin on Contracts: "There are cases in which a creditor provides that the contract shall be 'null and void,' or that the debtor shall be discharged, in case of the creditor's death before making demand, or before the 'due date', or before actual payment is made. In such cases the provision is a valid one (not an attempt at a testamentary disposition); the death, occurring as specified, operates as a discharge of the contractual obligation by condition subsequent to that obligation. If the provision is that death shall discharge even though it occurs after the debt falls due, the death is a true condition subsequent to the debtor's duty of immediate performance." (See also Note 127 A.L.R. 634.)  [fn. 3]
 [1b] The conclusion that the agreement in the present case constituted a valid contract and was not an attempted testamentary disposition finds support in the reasoning of the court in Bergman v. Ornbaun, 33 Cal.App.2d 680 [92 P.2d 654]. Similar reasoning is found in other cases where questions of a kindred nature were presented. (De Lapp v. Anderson's Admr., 305 Ky. 336 [203 S.W.2d 389]; In re Reese's Estate, 31 Ill. App.2d 468 [176 N.E.2d 636]; Church of Jesus Christ of Latter Day Saints v. Scarborough, 189 F.2d 800.)
 The judgment is reversed with directions to the trial court to amend its findings of fact and conclusions of law in accordance with the views herein expressed and thereupon to enter judgment in conformity therewith.
 Shinn, P. J., and Files, J., concurred.
NOTES
[fn. 1]  1. One of the illustrations given immediately following the comment is: "A employs B as his housekeeper. B hands over to A $1000 of her savings on A's agreement 'to keep the money for her and to pay her 6 per cent interest.' In the absence of evidence showing a contrary intention, A is a debtor and not a trustee."
[fn. 2]  2. As set forth hereinabove, that paragraph was as follows: "It is our understanding that in the event of your death the balance of your account is to be paid to the Endowment Fund of Pacific Home."
[fn. 3]  3. In the note it is stated in part (127 A.L.R. at p. 635): "The weight of authority is in favor of the validity of an agreement contemporaneous with a debt or legal obligation that such obligation shall be extinguished or terminated by the death of the creditor or obligee. ... More often such validity has been predicated on the theory that the agreement constitutes a valid and enforceable contract."
