
63 Cal.Rptr.3d 232 (2007)
153 Cal.App.4th 675
MORGAN CREEK RESIDENTIAL, Plaintiff and Appellant,
v.
Earl S. KEMP et al., Defendants and Respondents.
No. C053098.
Court of Appeal of California, Third District.
July 24, 2007.
*234 Cox, Castle & Nicholson, Lawrence Teplin and Heather Stern, Los Angeles, for Plaintiff and Appellant.
Kirton & McConkie, Eric C. Olson and Christopher S. Hill, Salt Lake City, UT; Goldsberry, Freeman & Guzman, Francis M. Goldsberry, II and James T. Freeman, Sacramento, for Defendants and Respondents.
SIMS, J.
In this case involving claims of equitable contribution and subrogation, plaintiff Morgan Creek Residential appeals from a judgment of dismissal, following the sustaining of a demurrer without leave to amend, in favor of defendants Earl S. Kemp and Richard A. Haws.[1] Plaintiff contends its complaint states a claim for equitable contribution from co-obligors and for subrogation under the California Uniform Commercial Code (undesignated section references are to the California Uniform Commercial Code) for monies paid by plaintiff pursuant to a letter of credit.[2] As we shall explain, plaintiff is not entitled to contribution from the guarantors because the liabilities of an applicant[3] of a letter of credit, on the one hand, and the guarantors, on the other, are not equal. We shall also conclude plaintiff is not entitled to subrogation under the Commercial Code. We shall therefore affirm the judgment.

BACKGROUND
In the operative pleadingthe "FIRST AMENDED COMPLAINT FOR UNJUST ENRICHMENT, MONEY PAID, EQUITABLE CONTRIBUTION FROM CO-OBLIGORS, AND SUBROGATION"plaintiff alleged as follows:
Plaintiff is a land developer formerly entitling and developing real estate in a *235 residential development known as Morgan Creek. Defendants are developers and/or merchant builders engaged in entitling and developing real estate and/or homes for sale to the public in the Morgan Creek Development.
One of the planned amenities of the Morgan Creek Development was a golf course, golf club and clubhouse (the Amenities) to serve the surrounding developments. The ownership of the Amenities was in Morgan Creek Golf Club, LLC (the Golf Club), the members of which were West Placer Golf, LLC; Stonebridge Golf IV, LLC (Stonebridge), and the Stonebridge Group (TSG). Defendant Kemp was a principal of TSG. Defendant Haws was a principal of Stonebridge and TSG. The other individuals named as defendants were principals of defendant Lakemont Homes, which was the managing member of West Placer Golf, LLC. These Lakemont defendants are not parties to this appeal.
During the course of development, the Golf Club applied for a $10 million loan from Citicapital Commercial Corporation (Citicapital) in order to complete the golf course. As a condition of the loan, Citicapital required loan guarantees from all of the named defendants. The guarantees were as follows: Kemp up to the sum of $800,000; Haws up to the sum of $800,000; Lakemont Homes up to the sum of $1.6 million; and the individual Lakemont principals up to the sum of $400,000 each. The written guarantees, totaling $4,800,000 were submitted to Citicapital.
Citicapital subsequently advised the Golf Club, through its members West Placer Golf, LLC, Stonebridge and TSG, that the guarantees were insufficient. The Golf Club, through its members, requested that plaintiff loan or advance additional sums in order to complete the golf course. Plaintiff agreed and advanced and loaned the sum of approximately $2.8 million to West Placer Golf, LLC, the operating member of the Golf Club, to complete the golf course.
Additionally, at the request of the Golf Club and defendants, plaintiff obtained and underwrote an unconditional letter of credit in the sum of $1.4 million for the benefit of Citicapital, as security for the Loan. The issuing bank was Northern Trust Bank. The terms of the letter of credit allowed Citicapital to call the letter of credit upon any default in the loan from Citicapital to the Golf Club.
The Golf Club's $10 million loan application to Citicapital was thereafter reduced to $6.5 million. Citicapital approved the $6.5 million loan (the Loan), and the Golf Club commenced construction of the golf course. The Loan was secured by a note and deed of trust on the real property and personal property comprising the golf course and other Amenities (the Property).
In July 2004, several unpaid contractors filed mechanics' liens against the real property on which the golf course was being built. As a result of this and other issues, Citicapital gave notice of a Loan default and opportunity to cure. The Golf Club, through its members, failed to take any action to cure the Loan default.
Citicapital then called the letter of credit and was paid the sum of $1.4 million by Northern Trust Bank. As a result of the contractual relationship with Northern Trust Bank, plaintiff was required to and did immediately provide the sum of $1.4 million to Northern Trust Bank to satisfy the draw on the letter of credit.
The $1.4 million drawn down on the letter of credit and obtained by Citicapital was used to reduce the outstanding principal of the Loan from $6,173,738.68 to $4,773,738.68. It was not used to cure the default under the Loan. As a result of the *236 draw on the letter of credit and reduction of the outstanding principal of the Loan, the amount of remaining secured debt on the Property was reduced to an amount substantially equal to the fair market value of the Property.
After the draw on the letter of credit and reduction of the outstanding principal of the Loan by $1.4 million, the Lakemont defendants entered into an agreement with Citicapital, pursuant to which the Lakemont defendants sold the assets of the Golf Glub, including the Property, to themselvestaking ownership in a new entity known as Step Golf Associates, LLCand obtained restated and restructured financing from Citicapital in a loan amount already reduced by the $1.4 million draw on the letter of credit, in the sum of approximately $4.7 million (the New Loan).
The first two counts of the complaint, which are not at issue in this appeal, alleged unjust enrichment and money paid as against the Lakemont defendants.
The third count, against all defendants, was for equitable contribution from co-obligors. It alleged that, in obtaining and underwriting an unconditional letter of credit in the sum of $1.4 million as security for the Loan, plaintiff became a co-obligor and/or co-guarantor with defendants up to the sum of $1.4 million of the total guaranteed loan sum of $6.2 million on behalf of the Golf Club for the benefit of Citicapital. Plaintiff has disproportionately paid its share of the guarantee of $6.2 million and, by reducing the principal of the New Loan for which it has no obligation, has benefited defendants to the extent that their guarantee or proportionate share thereof has been reduced. Plaintiffs $1.4 million pro rata share of the $6.2 million Loan guarantee is only 22 percent.[4] In paying $1.4 million as a result of the draw on the letter of credit, plaintiff paid substantially more than its 22 percent proportionate share of the total amounts paid by the guarantors to Citicapital following the Loan default. Plaintiff alleged that equity and justice require that the co-obligor defendants contribute to the $1.4 million payment made by plaintiff in proportion to their percentage of total guarantee so that plaintiff is not unjustifiably penalized and defendants are not unjustly enriched. Defendants refused plaintiffs written demand for contribution.
The fourth count of the complaint alleged subrogation against all defendants. It alleged plaintiff was an applicant for a letter of credit that reimbursed an issuer of a letter of credit (Northern Trust Bank) within the meaning of section 5117.[5]*237 Plaintiff is subrogated to the rights of Northern Trust Bank pursuant to section 5117, subdivision (b). Pursuant to section 5117, subdivision (a), Northern Trust Bank is subrogated to the rights of Citicapital to the same extent as if Northern Trust Bank were a secondary obligor of the Loan from Citicapital. Plaintiff is also subrogated to the rights of Citicapital to the same extent as if plaintiff were a secondary obligor of the Loan from Citicapital. Plaintiffs payment of $1.4 million to Northern Trust Bank was made to protect plaintiffs own interest and was made as a result of its obligation under the letter of credit, not as a volunteer. Pursuant to section 5117, plaintiffs $1.4 million payment was one for which plaintiff was not primarily liable. Plaintiff alleged it is subrogated to the rights of Citicapital as against defendants and can obtain contribution from them pursuant to those rights, and such subrogation will not work an injustice to the rights of others.
The pleading prayed for judgment against each defendant "in proportion to their percentage of total guarantee, such that plaintiff is reimbursed for all but its 22% pro rata share...."
Defendants Kemp and Haws filed a demurrer to this first amended complaint, noting that the trial court, in its order sustaining a demurrer to the original complaint, said: "A letter of credit is not a form of suretyship obligation. Assuming arguendo such obligation was created, plaintiff has not alleged that it has paid more than the $1.4 million it guaranteed so as to require contribution from the defendants. As the claims for contribution fail, the common count claim must also fail as it is alleged on the same facts. Additionally, any arguments made by plaintiff regarding subrogation, which are not plead [sic ] in the Complaint, would also fail. Such arguments directly contravene Civil Code [section] 2787."[6]
In their demurrer to the amended complaint, defendants Kemp and Haws argued plaintiff failed to add any new allegations that would avoid the legal effect of the court's ruling that plaintiff is not a coguarantor and has no right of contribution or subrogation against Kemp or Haws.
The trial court sustained the demurrer without leave to amend. The court's written ruling stated in part: "This court has previously ruled that a letter of credit is not a form of suretyship obligation. While plaintiff argues that the first amended complaint is based on [section] 5117, rather than Civil Code [section] 2787, plaintiffs arguments are without merit. [Section] 5117 provides, `An issuer that honors a beneficiary's presentation is subrogated to the rights of the beneficiary to the same extent as if the issuer were a secondary obligor of the underlying obligation owed to the beneficiary and of the applicant to *238 the same extent as if the issuer were the secondary obligor of the underlying obligation owed to the applicant.' In the present case, the `applicant' is [plaintiff], not the individual guarantor defendants. As such, [section] 5117 does not apply. And, as Civil Code [section] 2787 provides that a letter of credit is not a form of suretyship obligation, the claims for contribution and subrogation fail."
Plaintiff appeals from the ensuing order of dismissal of plaintiffs complaint against defendants Kemp and Hawsan order which constitutes a judgment subject to appeal. (Code Civ. Proc., §§ 581d, 904.1, subd. (a).)

DISCUSSION

I. Standard of Review

This appeal from an order of dismissal following the trial court's sustaining of a demurrer without leave to amend presents questions of law, which we review de novo. (Walker v. Allstate Indem. Co. (2000) 77 Cal.App.4th 750, 754, 92 Cal. Rptr.2d 132.)

II. Equitable Contribution

Plaintiff contends its amended complaint states (or can be amended to state) a viable claim for equitable contribution from defendants Kemp and Haws, because (1) plaintiff and defendants Kemp and Haws were all co-obligors who agreed to answer for the Golf Club's debt in the event of a default, yet (2) plaintiff was the only one who paid. We shall conclude plaintiff fails to show grounds for reversal because its unconditional letter of credit created for plaintiff a different level of liability than the level of liability created by the guarantees put up by defendants Kemp and Haws.

A. General Legal Principles

Civil Code section 1432 provides: "Except as provided in Section 877 [effect of release, dismissal, or covenant not to sue] of the Code of Civil Procedure, a party to a joint, or joint and several obligation who satisfies more than his share of the claim against all, may require a proportionate contribution from all the parties joined with him."
Civil Code section 2848[7] authorizes a surety to pursue a contribution action against co-sureties.
"A claim for contribution ... stems from a legally recognized right forged from principles of equity and natural justice. [Citations.] The right of contribution, although necessarily related to some former transaction or obligation, exists as an entirely separate contract implied by law. [Citation.] In situations where two or more parties are jointly liable on an obligation and one of them makes payment of more than his share, the one paying possesses a new obligation against the others for their proportion of what he has paid for them. [Citation.]" (Borba Farms, Inc. v. Acheson (1988) 197 Cal. App.3d 597, 601-602, 242 Cal.Rptr. 880.)
"Equitable contribution is ... the right to recover, not from the party primarily liable for the loss, but from a co-obligor who shares such liability with the party seeking contribution. [Fn. noting the right is codified in Civil Code section 1432.] ... Equitable contribution permits *239 reimbursement to the [party] that paid on the loss for the excess it paid over its proportionate share of the obligation, on the theory that the debt it paid was equally and concurrently owed by [others] and should be shared by them pro rata in proportion to their respective coverage of the [insurance] risk. The purpose of this rule of equity is to accomplish substantial justice by equalizing the common burden shared by [co-obligors], and to prevent one [obligor] from profiting at the expense of others. [Citations.]" (Fireman's Fund Ins. Co. v. Maryland Casualty Co. (1998) 65 Cal.App.4th 1279, 1293, 77 Cal.Rptr.2d 296.)
"Equitable contribution allows for loss sharing among [co-obligors] `that share the same level of liability on the same risk as to the same [principal].' [Citation.]" (RLI Ins. Co. v. CNA Casualty of California (2006) 141 Cal.App.4th 75, 84, 45 Cal.Rptr.3d 667 [insurance case].) "The principle of equity on which the right of contribution is founded applies only where the parties are under a common burden of liability." (Weinberg Co. v. Heller (1925) 73 Cal.App. 769, 779, 239 P. 358 [contribution was not an appropriate remedy for corporation which incurred court costs litigating a lawsuit for the benefit of itself and an individual, and which sought to enforce the individual's promise to share the court costs].) The California Supreme Court said in dictum in Jessup Farms v. Baldwin (1983) 33 Cal.3d 639, 190 Cal. Rptr. 355, 660 P.2d 813: "The right to contribution embodied in Civil Code section 1432 `rests upon principles of equity and natural justice.' (Blankenhorn-Hunter-Dulin Co. v. Thayer (1926) 199 Cal. 90, 96, 247 P. 1088; see also Jackson v. Lacy (1940) 37 Cal.App.2d 551, 559, 100 P.2d 313.)[[8]] Under fundamental principles of equity, a person who has paid no more than his or her just proportion of the debt cannot secure contribution from a codebtor, even if the codebtor has paid nothing. [Citations.] As a corollary to this rule, [the California Supreme Court] has held that equality of liability among persons whose respective situations are not equal is inequitable. (Blankenhorn, supra, at p. 96, 247 P. 1088 [cash customers who paid in full for stock purchased from broker were not in same class as marginal traders who had not paid in full, and therefore cash customers' stock could not be pledged as security for broker's debt].)" (Jessup Farms, supra, 33 Cal.3d at p. 650, fn. 7, 190 Cal.Rptr. 355, 660 P.2d 813, italics added [payments made by the principal obligor of four promissory notes should have been applied to extinguish the first note, hence extinguishing the liability of the defendant who cosigned only the first note, rather than ratably apportioned among the four notes].)

B. Application to this Case

In the case before us, plaintiff fails to show that defendants Kemp and Haws shared the same level of liability as plaintiff, so as to entitle plaintiff to receive contribution from them. Thus, plaintiff put up an unconditional letter of credit,[9]*240 while defendants Kemp and Haws put up guarantees. As we shall explain, the liabilities inherent in these two kinds of security are markedly different.

1. Letter of Credit

As the trial court noted, "the rules applicable to surety relationships do not govern the relationships between the parties to a letter of credit transaction." (Western Security Bank v. Superior Court, supra, 15 Cal.4th 232, 248, 62 Cal.Rptr.2d 243, 933 P.2d 507.) A 1994 amendment to Civil Code section 2787, footnote 6, ante, added the statutory language: "A letter of credit is not a form of suretyship obligation." (Stats.1994, ch. 611, § 1, p. 3005.) Civil Code section 2787 defines a surety or guarantor as "one who promises to answer for the debt, default, or miscarriage of another, or hypothecates property as security therefor." The California Supreme Court has said: "Generally, a surety's liability for an obligation is secondary to, and derivative of, the liability of the principal for that obligation. (See e.g., Civ.Code, § 2806 et seq.) [¶] By contrast, the liability of the issuer of a letter of credit to the letter's beneficiary is direct and independent of the underlying transaction between the beneficiary and the issuer's customer. [Citations.] Thus, as the amendment to Civil Code section 2787 made clear, existing law viewed a letter of credit as an independent obligation of the issuing bank rather than as a form of guaranty or a surety obligation. [Citations.] The issuer of a letter of credit cannot refuse to pay based on extraneous defenses that might have been available to its customer. [Citation.] Absent fraud, the issuer must pay upon proper presentment regardless of any defenses the customer may have against the beneficiary based in the underlying transaction. [Citation.]" (Western Security Bank, supra, 15 Cal.4th at pp. 246-247, 62 Cal.Rptr.2d 243, 933 P.2d 507.)
"[Commercial Code] section 5114, subdivision (1) provides that `[a]n issuer must honor a draft or demand for payment which complies with the terms of the relevant credit regardless of whether the goods or documents conform to the underlying contract for sale or other contract between the customer and the beneficiary.' The California code comment to section 5114 states, `Subdivision (1) reflects the concept that the letter of credit is independent from the underlying sales contract.' (23B West's Ann. Cal. U. Com.Code (1964 ed.) § 5114, p. 718.) This unique feature, referred to as the `independence principle,' is the primary characteristic of a letter of credit. Absent fraud, the issuer must pay upon proper presentment regardless of any defenses the applicant for the letter of credit may have against the beneficiary arising from the underlying transaction. (See, e.g., Lumbermans Acceptance Co. v. Security Pacific Nat. Bank (1978) 86 Cal. App.3d 175, 178, 150 Cal.Rptr. 69.) Thus, the issuer of a letter of credit is never entitled to defend against' payment based on extraneous defenses which might have been available to the primary obligor." (San Diego Gas & Electric Co. v. Bank Leumi (1996) 42 Cal.App.4th 928, 933-934, 50 Cal.Rptr.2d 20 (San Diego v. Leumi).)
Thus, when Citicapital called the unconditional letter of credit furnished by plaintiff, neither plaintiff nor the issuer, Northern Trust Bank, could assert any defenses (except fraud) to stop Citicapital from collecting on the letter of credit. (See San Diego v. Leumi supra, 42 Cal.App.4th 928, 933-934, 50 Cal.Rptr.2d 20.)
"To the extent that resort to analogy is appropriate for such a singular creation as the standby letter of credit, its closest *241 relative would seem to be cash collateral." (Western Security Bank v. Superior Court, supra, 15 Cal.4th at p. 251, fn. 8, 62 Cal. Rptr.2d 243, 933 P.2d 507.)

2. The Guarantees

A guarantee is a form of suretyship obligation. (Civ.Code, § 2787, fn.6, ante.)
As sureties, Kemp and Haws would have defenses to demands by Citicapital which were not available to plaintiff. Thus, Civil Code section 2845 says, "A surety may require the creditor, subject to Section 996.440 of the Code of Civil Procedure [motion to enforce liability on bond given in an action or proceeding], to proceed against the principal, or to pursue any other remedy in the creditor's power which the surety can not [sic ] pursue, and which would lighten the surety's burden; and if the creditor neglects to do so, the surety is exonerated to the extent to which the surety is thereby prejudiced." (Italics added.) (See Cadle Co. v. World Wide Hospitality Furniture, Inc. (2006) 144 Cal. App.4th 504, 514, fn. 7, 50 Cal.Rptr.3d 480.) In its reply brief, plaintiff concedes the applicant of a letter of credit is unable to assert suretyship defenses against the creditor.
Because Kemp and Haws had suretyship defenses available to them, and plaintiff, as an applicant of a letter of credit did not, these parties did not share the same level of liability to Citicapital. Consequently, plaintiff has no viable claim for contribution against Kemp and Haws. (Weinberg Co. v. Heller, supra, 73 Cal.App. at p. 779, 239 P. 358.)

3. Plaintiffs Arguments

We shall address various arguments advanced by plaintiff in opposition to our conclusion.
Plaintiff concedes there are distinctions between letters of credit and guarantees. Plaintiffs reply brief acknowledges that "with a letter of credit, the beneficiary bank can count on being able to call the letter of credit without having to worry about suretyship defenses...." Plaintiffs reply brief further "concedes that if a beneficiary bank calls a letter of credit, the issuing bank has to pay the beneficiary bank without regard to any suretyship defenses."
However, plaintiff argues the statutory directivethat a letter of credit is not a form of suretyship obligation (Civ.Code, § 2787, fn.6, ante)merely governs the relationship between the parties to the letter of credit transaction, not the relationship between the applicant and others. However, plaintiff fails to persuade, because no such limitation appears in the statute.
In arguing that the statute is limited to the relationship between parties to the letter of credit transaction, plaintiff notes the 1994 amendment (adding to Civil Code section 2787 the provision that a letter of credit is not a form of suretyship obligation) was part of a bill enacted to abrogate the holding of a Court of Appeal decision which held an issuing bank could assert defenses under an antideficiency statute (Code Civ. Proc., § 580d) to prevent a beneficiary bank from drawing down on a letter of credit. Western Security Bank, supra, 15 Cal.4th 232, 62 Cal. Rptr.2d 243, 933 P.2d 507, which reversed the judgment in the abrogated Court of Appeal case, noted, "The Legislature made its purpose explicit: `It is the intent of the Legislature in enacting Sections 2 and 4 of this act [neither of which amended Civil Code section 2787] to confirm the independent nature of the letter of credit engagement and [H] ... confirm the expectation of the parties to a contract that underlies a letter of credit, that the beneficiary will *242 have available the value of the real estate collateral and the benefit of the letter of credit without regard to the order in which the beneficiary may resort to either.' (Stats.1994, ch. 611, § 5.)" (Western Security Bank, supra, 15 Cal.4th at p. 242, 62 Cal.Rptr.2d 243, 933 P.2d 507.) This expression of legislative intent says nothing about the intent of the amendment of Civil Code section 2787. (See Western Security Bank, supra, at p. 242, 62 Cal.Rptr.2d 243, 933 P.2d 507, noting section 2 of the bill added an antideficiency statute excluding letters of credit from the antideficiency laws, and section 4 made nonsubstantive changes to section 5114 [assignment of proceeds of letter of credit].)
In support of its argument that the distinction between letters of credit and suretyship obligations applies only to parties to the letter of credit transaction, plaintiff quotes from Western Security Bank, supra, 15 Cal.4th at page 248, 62 Cal.Rptr.2d 243, 933 P.2d 507, that "the rules applicable to surety relationships do not govern the relationships between the parties to a letter of credit transaction." However, plaintiff reads too much into this quote. The dispute in Western Security Bank was between the parties to the letter of credit transaction. (Id. at pp. 238-240, 62 Cal. Rptr.2d 243, 933 P.2d 507.)
Plaintiff cites Matthews v. Hinton (1965) 234 Cal.App.2d 736, 44 Cal.Rptr. 692, for the proposition that "[w]hether one is a surety depends not so much upon his relation with the creditor as upon his relation to the principal debtor." (Id. at p. 740, 44 Cal.Rptr. 692.) However, in Matthews, which in any case predated the 1994 legislation at issue in this case, this court did not deal with any letter of credit but merely concluded that landowners who, together with their sublessees, signed a trust deed as principals, subjected themselves to primary liability. (Id. at p. 741, 44 Cal. Rptr. 692.)
We conclude plaintiff fails to show that the statutory distinction between letters of credit and suretyship obligations should be limited to parties to the letter of credit transaction. Nothing in the statutory language contains the limitation urged by plaintiff.
Plaintiff contends there is no reason why the distinction between a letter of credit and other types of security should eliminate the right of contribution. However, the reason is that equitable contribution is founded on the premise that the plaintiff and defendant share the same level of liability. (Jessup Farms v. Baldwin, supra, 33 Cal.3d at p. 650, fn. 7, 190 Cal. Rptr. 355, 660 P.2d 813; RLI Ins. Co., supra, 141 Cal.App.4th at p. 84, 45 Cal. Rptr.3d 667; Weinberg Co. v. Heller, supra, 73 Cal.App. at p. 779, 239 P. 358.) As we have explained, an applicant of an unconditional letter of credit does not share the same level of liability with a guarantor. Insofar as plaintiff bemoans this result as harsh formalism elevating form over substance, plaintiff must take his complaint to the Legislature, which codified the distinction between letters of credit and sureties. (Fn.6, ante.) Since this is a matter of legislative fiat, plaintiffs reliance on (subrogation) cases from other jurisdictions is misplaced.
Plaintiff argues defendants Kemp and Haws provide no authority for their implied premise that the affirmative defenses applicable in an action by the principal to obtain payment from a guarantor would automatically apply to an action for contribution from a co-obligor. In plaintiffs view, defendants Kemp and Haws are arguing they have affirmative defenses that they should be able to raise to the contribution action. Plaintiffs say the subject of affirmative defenses is premature at the *243 demurrer stage. However, plaintiff misconstrues defendants' position and misses the point. Kemp and Haws argue the alleged default related to mechanics' liens rather than a payment default on the Citicapital loan and, while any default might trigger Citicapital's right to call on the letter of credit, only a payment default by the Golf Club would trigger the right to collect on the guarantees. Certainly, this issue cannot be resolved at this stage, since the guarantees are not part of the record. However, we need not resolve this issue in order to affirm the judgment. The demurrer does not depend on the assertion of affirmative defenses to the contribution claim. Rather, plaintiff has to be able to allege it shared the same level of liability with defendants Kemp and Haws in order to sue them for contribution. Plaintiff cannot do so.
We conclude plaintiff, as a letter of credit applicant, had a different level of liability from Kemp and Haws, as guarantors, and therefore plaintiff has no viable claim for contribution against Kemp and Haws.
Plaintiffs case is not helped by its allegation that all defendants specifically asked plaintiff to put up the letter of credit. Every party to this transaction was a big boy. Nor does it matter that plaintiff says it would not have obtained the letter of credit had it known the outcome.
We conclude the trial court properly sustained the demurrer without leave to amend as to the contribution count.

III. Subrogation

Plaintiff contends its complaint states a viable claim for subrogation under section 5117 (fn. 5, ante), in that plaintiff is subrogated to any rights of Citicapital against defendants Kemp and Haws. Plaintiff claims it can assert Citicapital's rights under the written guarantees to obtain pro rata contribution from Kemp and Haws. We disagree.
"Subrogation is defined as the substitution of another person in place of the creditor or claimant to whose rights he or she succeeds in relation to the debt or claim. By undertaking to indemnify or pay the principal debtor's obligation to the creditor or claimant, the `subrogee' is equitably subrogated to the claimant (or `subrogor'), and succeeds to the subrogor's rights against the obligor. [Citation.] ... '"As now applied [equitable subrogation] is broad enough to include every instance in which one person, not acting as a mere volunteer or intruder, pays a debt for which another is primarily liable, and which in equity and good conscience should have been discharged by the latter." [Citations.]' " (Fireman's Fund, supra, 65 Cal.App.4th at pp. 1291-1292, 77 Cal. Rptr.2d 296, italics omitted.) "One who claims to be equitably subrogated to the rights of a secured creditor must satisfy certain prerequisites. These are: `(1) Payment must have been made by the subrogee to protect his own interest. (2) The subrogee must not have acted as a volunteer. (3) The debt paid must be one for which the subrogee was not primarily liable. (4) The entire debt must have been paid. (5) Subrogation must not work any injustice to the rights of others.' [Citations.]" (Caito v. United California Bank (1978) 20 Cal.3d 694, 704, 144 Cal.Rptr. 751, 576 P.2d 466, (Caito).)[10]
Thus, subrogation seeks to shift the entire obligation from one who paid to another who should have paid.
*244 Here, plaintiff does not show grounds for application of equitable subrogation. Even assuming plaintiff did not act as a volunteer,[11] and even assuming plaintiffs claim is not defeated by the fact it was primarily liable on the letter of credit, and even assuming the requirement that the "entire debt" be paid was satisfied by payment of the entire $1.4 million letter of credit (which was less than the total $6.5 million the Golf Club owed to Citicapital), defendants Kemp and Haws were not primarily liable on the Citicapital obligation. Rather, the Golf Club was primarily liable on the debt paid by plaintiff (or rather, paid by Northern Trust Bank and reimbursed by plaintiff). Additionally, as noted by defendants Kemp and Haws, subrogation depends on the superiority of the equities of he who asserts it over those of the one against whom it is sought. (King v. Hartford Acc. & Indent. Co. (1933) 133 Cal.App. 711, 715, 24 P.2d 906.) Plaintiff does not claim superior rights over defendants Kemp and Haws but merely equal rights. Yet Kemp and Haws, as mere guarantors, bargained for limited exposure, as we explained in our discussion of the contribution issue. To allow plaintiff to recover from them on plaintiffs letter of credit would work an injustice to the rights of Kemp and Haws.[12]
Plaintiff claims California law establishes an equitable subordination right in favor of co-sureties which section 5117, footnote 5, ante, extends to plaintiff regardless of whether plaintiff is a co-surety. Plaintiff cites section 5117, subdivision (b), with inserted brackets: "An applicant [such as plaintiff] that reimburses an issuer [of a letter of credit, i.e. Northern Trust Bank] is subrogated to the rights of the issuer against any beneficiary [such as Citicapital] ... and has the rights of subrogation of the issuer to the rights of the beneficiary stated in subdivision (a) [fn. 5, ante ]." (Italics omitted.) In other words, argues plaintiff, whatever rights are enjoyed by Northern Trust Bank as the issuer are also enjoyed by plaintiff as the applicant reimbursing the issuer $1.4 million. Plaintiff then asks rhetorically: What rights does Northern Trust Bank, and plaintiff by extension, enjoy? Plaintiff then cites section 5117, subdivision (a): "An issuer [Northern Trust Bank] that honors a beneficiary's presentation is subrogated to the rights of the beneficiary [here, Citicapital] to the same extent as if the issuer were a secondary obligor of the underlying obligation owed to the beneficiary...." According to plaintiff, this means that by statute Northern Trust Bank is subrogated to the rights of Citicapital to the same extent as if Northern Trust Bank were a surety with defendants Kemp and Haws. Since plaintiff has the rights of Northern Trust Bank, plaintiff by statute is subrogated to the rights of Citicapital to the same extent as if plaintiff were a surety with defendants Kemp and *245 Haws. Plaintiff says this means that, even though plaintiff paid Citicapital through the vehicle of a letter of credit, and even though Civil Code section 2787 states that a letter of credit is not a suretyship obligation, plaintiff can still recover from defendants Kemp and Haws just as though plaintiff had paid Citicapital on a personal guarantee.
Plaintiff cites nothing supporting its interpretation of section 5117. A more reasonable reading of that statute is that it allows plaintiff to go after the Golf Club as the primary obligor in default, but not Kemp or Haws, who were mere guarantors. That the Golf Club may now be an "empty shell," as asserted by plaintiff, is not reason enough to adopt plaintiffs interpretation of the statute. Nothing cited by plaintiff allows a letter of credit issuer or applicant, by subrogation, to circumvent Civil Code section 2787 and step into Citicapital's separate rights against third parties not in default to the beneficiary and not liable for the portion of the indebtedness paid by the call on the letter of credit.
Plaintiff says that, to understand its conclusion, we must first understand the historical differences between letters of credit and guarantees, and the problem that section 5117 was adopted to address. Plaintiff notes that, before the 1996 enactment of section 5117, an issuing bank's obligation to pay a beneficiary bank on a letter of credit was independent of any suretyship defenses (pursuant to common law codified in Civil Code section 2787, fn. 6, ante)a principle known as the "independence principle." "The independence principle, in summary form, makes the letter of credit issuer's obligation to pay a draw conforming to the letter's terms completely separate from, and not contingent on, any underlying contract between the issuer's customer and the letter's beneficiary. [Citations.]" (Western Security Bank, supra, 15 Cal.4th at p. 237, 62 Cal. Rptr.2d 243, 933 P.2d 507.) The independence principle deprived the issuing bank of a common law right of equitable subrogation.
Section 5117, a part of the California Uniform Commercial Code, removed that impediment. As explained by the Uniform Commercial Code Comment: "By itself this section does not grant any right of subrogation. It grants only the right that would exist if the person seeking subrogation 'were a secondary obligor.' (The term 'secondary obligor' refers to a surety, guarantor, or other person against whom or whose property an obligee has recourse with respect to the obligation of a third party.) [Citation.] If the secondary obligor would not have a right to subrogation in the circumstances in which one is claimed under this section, none is granted by this section. In effect, the section does no more than to remove an impediment that some courts have found to subrogation because they conclude that the issuer's or other claimant's rights are `independent' of the underlying obligation. If, for example, a secondary obligor would not have a subrogation right because its payment did not fully satisfy the underlying obligation, none would be available under this section. The section indorses the position of Judge Becker in [dissent] in Tudor Development Group, Inc. v. United States Fidelity and Guaranty, 968 F.2d 357 (3rd Cir.1991 [1992])." (Comment on U. Com.Code, 23B West's Ann. California Codes (2002 ed.) foil. § 5117, p. 255.)
Plaintiff relies heavily on Judge Becker's dissent in Tudor Dev. Group, Inc. v. United States Fidelity & Guar. (3rd Cir.1992) 968 F.2d 357 (Tudor), endorsement of which is reflected in section 5117. However, the dissent does not support plaintiffs position in this case.
*246 The issue in Tudor, supra, 968 F.2d 357, was whether a bank that issued a standby letter of credit could qualify for equitable subrogation to the rights of its defaulting customer in the underlying commercial transaction. (Tudor, supra, 968 F.2d at p. 364, diss. opn. of Becker, J.) The Tudor majority defined the issue as "whether a bank which has honored a letter of credit may be equitably subrogated to the rights of its customer vis-à-vis funds paid to the customer by a party unrelated to the original letter of credit." (Id. at p. 358.) In Tudor, after a default by a general manager (SCC) on a real estate project, the issuer of the letter of credit (Dauphin Deposit) paid the beneficiary (Township) but was not reimbursed by the owner/developer (Associates) which applied for the letter of credit. (Ibid.) In addition to being the applicant on the
letter of credit, Associates was also the primary obligor on the underlying obligation to the Township. (Ibid.) Dauphin Deposit and Associates' assignee (Investors) made competing claims to funds paid into court by a surety which had issued performance bonds (USF & G). USF & G paid the money into court pursuant to a settlement with Associates, in which Associates kept part of the money, and the rest was paid into court to be held pending resolution of the various parties' claims to the fund. (Id. at p. 359.)
Tudor, supra, 968 F.2d 357, held the bank, which was satisfying its own primary liability rather than liability of another when it made payment under the letter of credit, could not avail itself of the common law remedy of equitable subrogation. (Id. at p. 358.)
Plaintiff quotes from the Tudor dissent (endorsed by section 5117), that subrogation should not be foreclosed (though the dissent would have left it to the trial court to balance the equities in the particular case). (Tudor, supra, 968 F.2d at pp. 368, 371.) The dissent reasoned, "Guarantors and sureties pay their own legal obligations, yet they are still entitled to seek equitable subrogation as well as contractual subrogation. That is because in meeting their own `primary obligations, guarantors and sureties are also `secondarily' liable to pay others' debts. So far as the common law is concerned, the same logic should apply to issuers, of letters of credit...." (Id at p. 366.) The dissent also said, "The independence principle ensures the beneficiary of prompt payment and basically determines that the beneficiary will have the dollars in its pocket if there is a dispute between it and the customer over the underlying transaction. [Citation.] ... [T]his distinguishes a letter of credit from an ordinary guaranty: a guaranty is not independent in this sense, and guarantors may generally assert defenses available to the party whose obligation is guaranteed. [¶] ... The independence principle undoubtedly requires the issuer to pay first, without looking through to the underlying transaction. Subrogation should therefore be unavailable before the issuer has paid the beneficiary. Once the issuer has done so, however, ... the purpose of the independence principle has been served: the beneficiary has the money. [¶] Insistence on perpetual separation is thus pointless formalism. [Fn. omitted.] On a more pragmatic level, I would agree that if the possibility of subsequent subrogation would discourage issuers from honoring already-issued letters of credit [fn. omitted], then subrogation should not be permitted because that would undercut the purposes of Article 5 [of the Uniform Commercial Code]. But I cannot see why that would be so. If anything, the unavailability of subsequent subrogation might discourage issuers from honoring the letters because they would have one less means of obtaining reimbursement." (Id. at p. 368.)
*247 The factual scenario in Tudor, supra, 968 F.2d 357, did not require a judicial determination whether to order a surety to pay a party to a letter of credit. Although the money at issue in Tudor came from a surety rather than the party primarily liable on the underlying obligation, the money was already made availablethrough the settlement efforts of Associates, not through a court order for equitable subrogation from a surety to a letter-of-credit applicant. Moreover, Associates was not a mere letter-of-credit applicant but also the primary obligor on the underlying obligation.
Thus, we do not believe the Tudor dissent goes so far as to support plaintiffs position that a party to a letter of credit can seek equitable subrogation from a surety which is not primarily liable on the underlying obligation. We note this is not a case, about which the Tudor dissent expressed concern, where one party to a letter of credit may receive an undeserved windfall. (Tudor, supra, 968 F.2d at p. 369.)
Plaintiff also cites a federal case from New York, but without any discussion other than to say it discussed the Uniform Commercial Code and found an issuer was subrogated to the rights of the beneficiary. We have no need to consider the New York case or the additional cases from other jurisdictions cited for the first time in plaintiffs reply brief.
Plaintiff argues the Legislature intended that Civil Code section 2787 (fn.6, ante), which says letters of credit are not sureties, should not prevent a party such as plaintiff from asserting a claim of equitable subrogation under section 5117. Plaintiff cites no authority supporting its assertion of legislative intent.
No California court has discussed the relationship between section 5117 (fn. 5, ante) and Civil Code section 2787 (fn. 6, ante). (See Western Security Bank, supra, 15 Cal.4th at pp. 237-238, fn. 2, and p. 248, 62 Cal.Rptr.2d 243, 933 P.2d 507 [addressing letter of credit which issued before enactment of section 5117].)
We do not see a conflict between the statutes. Civil Code section 2787 prevents plaintiff from seeking contribution against guarantors who signed on for lesser liability than plaintiff. Section 5117 might allow plaintiff to go after the debtors on the underlying obligation, but it does not allow plaintiff to go after Kemp and Haws as mere guarantors.
Plaintiffs attempt to use a subrogation theory to obtain apportionment from others who were not primarily liable is inconsistent with the aim of subrogation. (Caito, supra, 20 Cal.3d at p. 704, 144 Cal.Rptr. 751, 576 P.2d 466 [doctrine of equitable subrogation includes every instance in which one person pays a debt "`for which another is primarily liable, and which in equity and good conscience should have been discharged by the latter'"].) "The different equitable principles on which contribution and subrogation are based are reflective of different underlying public policies. The aim of equitable subrogation is to place the burden for a loss on the party ultimately liable or responsible for it and by whom, it should have been discharged, and to relieve entirely the insurer or surety who indemnified the loss and who in equity was not primarily liable therefor. [Citation.] On the other hand, the aim of equitable contribution is to apportion a loss between two or more [parties] who cover the same risk, so that each pays its fair share and one does not profit at the expense of the others. [Citations.] Although these underlying policy aims may be similar, they are nonetheless distinct. Confusing the doctrines with each other necessarily blurs the corresponding *248 policies behind them, with the unintended result in some cases of defeating those very policy goals." (Fireman's Fund, supra, 65 Cal.App.4th at p. 1296, 77 Cal. Rptr.2d 296, italics added [concluding that California law recognizes a direct right of action for equitable contribution between coinsurers on the same risk, entirely independent of any of the requirements for bringing a cause of action based on equitable subrogation to the rights of the insured].)
Plaintiff argues its interpretation of section 5117 does not conflict with Civil Code section 2787, because the Civil Code applies in the context of a dispute between an issuing bank and a beneficiary bank, while the Commercial Code applies in the context where a party to the letter of credit tries to obtain equitable contribution from a stranger to the letter of credit transaction. The distinction is not persuasive.
Plaintiff argues that, even if its interpretation creates a conflict between the two statutes, section 5117 would control as the later-enacted statute. We reject plaintiffs interpretation.
Though not argued by plaintiff, we note that, if the doctrine of equitable subrogation applies, the trial court should be given the opportunity to balance the equities and exercise its discretion. (Dieden v. Schmidt (2002) 104 Cal.App.4th 645, 654, 128 Cal.Rptr.2d 365.) We conclude plaintiffs complaint fails to allege a viable claim for application of the doctrine of equitable subrogation, and therefore plaintiff is not entitled to have the trial court balance the equities.
We conclude the trial court properly sustained the demurrer without leave to amend. On appeal, plaintiff offers no possible amendment that could cure the complaint's defects.

DISPOSITION
The judgment is affirmed. Defendants Kemp and Haws shall recover their costs on appeal. (Cal. Rules of Court, rule 8.276(a)(l)-(2).)
We concur: BLEASE, Acting P.J., and CANTIL-SAKAUYE, J.
NOTES
[1]  Other named defendantsLakemont Homes, Inc., Edward Johanson, Steve A. Thinglum, Paul H. Eblen, and Thomas G. Evancieare not parties to this appeal.
[2]  The Commercial Code defines "Letter of credit" as "a definite undertaking that satisfies the [form] requirements of Section 5104 by an issuer to a beneficiary at the request or for the account of an applicant or, in the case of a financial institution, to itself or for its own account, to honor a documentary presentation by payment or delivery of an item of value." (§ 5102, subd. (a)(10).)
[3]  It is appropriate to use the word "applicant" to refer to the party which furnished the letter of credit, even after issuance and payment of the letter of credit, because that is the usage adopted by the Commercial Code. (§ 5102, subd. (a)(2) ["`Applicant' means a person at whose request or for whose account a letter of credit is issued"]; § 5117, subd. (b) ["An applicant that reimburses an issuer is subrogated to the rights of the issuer"].)
[4]  Defendants Kemp and Haws argue the pro rata allegation is a mischaracterization unsupported by the language of the documents, none of which spoke of pro rata apportionment. We need not resolve this point because, even accepting the allegation as true, the complaint fails.
[5]  Section 5117 provides concerning letters of credit: "(a) An issuer that honors a beneficiary's presentation is subrogated to the rights of the beneficiary to the same extent as if the issuer were a secondary obligor of the underlying obligation owed to the beneficiary and of the applicant to the same extent as if the issuer were the secondary obligor of the underlying obligation owed to the applicant.

"(b) An applicant that reimburses an issuer is subrogated to the rights of the issuer against any beneficiary, presenter, or nominated person to the same extent as if the applicant were the secondary obligor of the obligations owed to the issuer and has the rights of subrogation of the issuer to the rights of the beneficiary stated in subdivision (a). [¶] ... [¶]
"(d) Notwithstanding any agreement or term to the contrary, the rights of subrogation stated in subdivisions (a) and (b) do not arise until the issuer honors the letter of credit or otherwise pays...."
[6]  Civil Code section 2787 states: "The distinction between sureties and guarantors is hereby abolished. The terms and their derivatives, wherever used in this code or in any other statute or law of this state now in force or hereafter enacted, shall have the same meaning as defined in this section. A surety or guarantor is one who promises to answer for the debt, default, or miscarriage of another, or hypothecates property as security therefor. Guaranties of collection and continuing guaranties are forms of suretyship obligations, and except in so far as necessary in order to give effect to provisions specially relating thereto, shall be subject to all provisions of law relating to suretyships in general. A letter of credit is not a form of suretyship obligation. For purposes of this section, the term `letter of credit' means a `letter of credit' as defined in paragraph (10) of subdivision (a) of Section 5102 of the Commercial Code whether or not the engagement is governed by Division 5 (commencing with Section 5101) of the Commercial Code." (Italics added.)
[7]  Civil Code section 2848 states: "A surety, upon satisfying the obligation of the principal, is entitled to enforce every remedy which the creditor then has against the principal to the extent of reimbursing what he has expended, and also to require all his co-sureties to contribute thereto, without regard to the order of time in which they became such." (Italics added.)
[8]  Kemp and Haws cite Jackson v. Lacy (1940) 37 Cal.App.2d 551, 100 P.2d 313, for the proposition that the entire underlying debt (here, $6.5 million) must be paid before a party can pursue a contribution claim. However, Jackson said, "it has been held that the whole debt must have been paid before the action for contribution could be maintained, though the contrary doctrine has also been laid down." (Id. at p. 560, 100 P.2d 313.) In any event, we need not address this argument, nor the argument of Kemp and Haws that plaintiff's contribution claim fails because it paid only its proportionate share ($1.4 million) of the $6.5 million obligation.
[9]  An unconditional letter of credit is also called a "standby" letter of credit. (See Western Security Bank v. Superior Court (1997) 15 Cal.4th 232, 238-239, 62 Cal.Rptr.2d 243, 933 P.2d 507 (Western Security Bank).)
[10]  Although Caito, supra, 20 Cal.3d 694, 144 Cal.Rptr. 751, 576 P.2d 466, predated the 1996 enactment of the current section 5117, upon which plaintiff relies, the elements of subrogation remain the same. (Fireman's Fund, supra, 65 Cal.App.4th at p. 1292, 77 Cal.Rptr.2d 296.)
[11]  Under California law, a party is considered a volunteer if, in making a payment, it has no interest of its own to protect, it acts without any obligation, legal or moral, and it acts without being requested to do so by the person liable on the original obligation. (In re Hamada (9th Cir.2002) 291 F.3d 645, 651 [applying California law, held bank that issued letter of creditto enable judgment debtor to obtain a bondhad no right to be equitably subrogated to the rights of the creditor who succeeded in having the judgment excepted from discharge in the debtor's bankruptcy].)
[12]  Defendants Kemp and Haws say the default alleged in the complaint as triggering the letter of credit draw was not a payment default on the underlying loan (which was the only default Kemp and Haws guaranteed), but a failure to pay third party contractors and avoid lien encumbrances on the property security for the loan. This distinction is unnecessary to our opinion.
