(a) Except as otherwise provided in subdivisions (b) and (g), any local agency that imposes any fees or charges on a residential development for the construction of public improvements or facilities shall not require the payment of those fees or charges, notwithstanding any other provision of law, until the date of the final inspection, or the date the certificate of occupancy is issued, whichever occurs first. However, utility service fees may be collected at the time an application for utility service is received. If the residential development contains more than one dwelling, the local agency may determine whether the fees or charges shall be paid on a pro rata basis for each dwelling when it receives its final inspection or certificate of occupancy, whichever occurs first; on a pro rata basis when a certain percentage of the dwellings have received their final inspection or certificate of occupancy, whichever occurs first; or on a lump-sum basis when the first dwelling in the development receives its final inspection or certificate of occupancy, whichever occurs first.

(b) (1) Notwithstanding subdivision (a), the local agency may require the payment of those fees or charges at an earlier time if (A) the local agency determines that the fees or charges will be collected for public improvements or facilities for which an account has been established and funds appropriated and for which the local agency has adopted a proposed construction schedule or plan prior to final inspection or issuance of the certificate of occupancy or (B) the fees or charges are to reimburse the local agency for expenditures previously made. "Appropriated," as used in this subdivision, means authorization by the governing body of the local agency for which the fee is collected to make expenditures and incur obligations for specific purposes.

(2) (A) Paragraph (1) does not apply to units reserved for occupancy by lower income households included in a residential development proposed by a nonprofit housing developer in which at least 49 percent of the total units are reserved for occupancy by lower income households, as defined in Section 50079.5 of the Health and Safety Code, at an affordable rent, as defined in Section 50053 of the Health and Safety Code. In addition to the contract that may be required under subdivision (c), a city, county, or city and county may require the posting of a performance bond or a letter of credit from a federally insured, recognized depository institution to guarantee payment of any fees or charges that are subject to this paragraph. Fees and charges exempted from paragraph (1) under this paragraph shall become immediately due and payable when the residential development no longer meets the requirements of this paragraph.

(B) The exception provided in subparagraph (A) does not apply to fees and charges levied pursuant to Chapter 6 (commencing with Section 17620) of Part 10.5 of Division 1 of Title 1 of the Education Code.

(c) (1) If any fee or charge specified in subdivision (a) is not fully paid prior to issuance of a building permit for construction of any portion of the residential development encumbered thereby, the local agency issuing the building permit may require the property owner, or lessee if the lessee's interest appears of record, as a condition of issuance of the building permit, to execute a contract to pay the fee or charge, or applicable portion thereof, within the time specified in subdivision (a). If the fee or charge is prorated pursuant to subdivision (a), the obligation under the contract shall be similarly prorated.

(2) The obligation to pay the fee or charge shall inure to the benefit of, and be enforceable by, the local agency that imposed the fee or charge, regardless of whether it is a party to the contract. The contract shall contain a legal description of the property affected, shall be recorded in the office of the county recorder of the county and, from the date of recordation, shall constitute a lien for the payment of the fee or charge, which shall be enforceable against successors in interest to the property owner or lessee at the time of issuance of the building permit. The contract shall be recorded in the grantor-grantee index in the name of the public agency issuing the building permit as grantee and in the name of the property owner or lessee as grantor. The local agency shall record a release of the obligation, containing a legal description of the property, in the event the obligation is paid in full, or a partial release in the event the fee or charge is prorated pursuant to subdivision (a).

(3) The contract may require the property owner or lessee to provide appropriate notification of the opening of any escrow for the sale of the property for which the building permit was issued and to provide in the escrow instructions that the fee or charge be paid to the local agency imposing the same from the sale proceeds in escrow prior to disbursing proceeds to the seller.

(d) This section applies only to fees collected by a local agency to fund the construction of public improvements or facilities. It does not apply to fees collected to cover the cost of code enforcement or inspection services, or to other fees collected to pay for the cost of enforcement of local ordinances or state law.

(e) "Final inspection" or "certificate of occupancy," as used in this section, have the same meaning as described in Sections 305 and 307 of the Uniform Building Code, International Conference of Building Officials, 1985 edition.

(f) Methods of complying with the requirement in subdivision (b) that a proposed construction schedule or plan be adopted, include, but are not limited to, (1) the adoption of the capital improvement plan described in Section 66002, or (2) the submittal of a five-year plan for construction and rehabilitation of school facilities pursuant to subdivision (c) of Section 17017.5 of the Education Code.

(g) A local agency may defer the collection of one or more fees up to the close of escrow. This subdivision shall not apply to fees and charges levied pursuant to Chapter 6 (commencing with Section 17620) of Part 10.5 of Division 1 of Title 1 of the Education Code.