Civil Code section 1717.5
(a)
Except as otherwise provided by law or where waived by the parties to an agreement, in any action on a contract based on a book account, as defined in Section 337a of the Code of Civil Procedure, entered into on or after January 1, 1987, which does not provide for attorney’s fees and costs, as provided in Section 1717, the party who is determined to be the party prevailing on the contract shall be entitled to reasonable attorney’s fees, as provided below, in addition to other costs. The prevailing party on the contract shall be the party who recovered a greater relief in the action on the contract. The court may determine that there is no party prevailing on the contract for purposes of this section.(b)
The attorney’s fees allowed pursuant to this section shall be the lesser of either the maximum amount allowed by this section, the amount provided by any default attorney’s fee schedule adopted by the court applicable to the suit, or an amount as otherwise provided by the court. Any claim for attorney’s fees pursuant to this section in excess of the amounts set forth in the default attorney’s fee schedule shall be reasonable attorney’s fees, as proved by the party, as actual and necessary for the claim that is subject to this section.(c)
This section does not apply to any action in which an insurance company is a party nor shall an insurance company, surety, or guarantor be liable under this section, in the absence of a specific contractual provision, for the attorney’s fees and costs awarded a prevailing party against its insured.
Source:
Section 1717.5, https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=CIV§ionNum=1717.5.
(accessed May 10, 2025).