<PAGE>

                                                                  EXHIBIT 4(d).2

                                                                  EXECUTION COPY

                                 AMENDMENT NO. 2
                                       TO
                         RECEIVABLES PURCHASE AGREEMENT

            THIS AMENDMENT NO. 2 TO RECEIVABLES PURCHASE AGREEMENT dated as of
May 10, 2004 (this "Amendment") is entered into among AVISTA RECEIVABLES CORP.
(the "Seller"), Avista Corporation (the "Servicer"), Receivables Capital Company
LLC (the "Conduit Purchaser") and Bank of America, N.A., as "Committed
Purchaser" (in such capacity, the "Committed Purchaser") and as "Administrator"
(in such capacity, the "Administrator") under the Receivables Purchase Agreement
defined below. Capitalized terms used herein but not defined herein shall have
the meanings provided in such Receivables Purchase Agreement.

                               W I T N E S S E T H

            WHEREAS, the Seller, the Servicer, the Conduit Purchaser, the
Committed Purchaser and the Administrator are parties to that certain
Receivables Purchase Agreement dated as of May 29, 2002 (as amended, restated,
supplemented or otherwise modified from time to time, the "Receivables Purchase
Agreement");

            WHEREAS, the Seller, the Servicer, the Conduit Purchaser, the
Committed Purchaser and the Administrator have agreed to amend the Receivables
Purchase Agreement on the terms and conditions hereafter set forth;

            NOW, THEREFORE, in consideration of the premises set forth above,
and for other good and valuable consideration, the receipt and sufficiency of
which are hereby acknowledged, the Seller, the Servicer, the Conduit Purchaser,
the Committed Purchaser and the Administrator hereby agree as follows:

            SECTION 1. Amendments. Subject to the fulfillment of the conditions
precedent set forth in Section 2 below, the Receivables Purchase Agreement is
hereby amended as follows:

            1.1 Section 7.01(k) of the Receivables Purchase Agreement is amended
to delete the reference therein to "0.65" and to substitute "0.70" therefor.

            1.2 The definition of "Eligible Receivable" set forth in Appendix A
to the Receivables Purchase Agreement is amended to insert the following proviso
immediately after the end of clause (i) thereof:

            provided; that, in the case of a Receivable that is subject to a
            quantifiable offset or defense, only the portion of such Receivable
            equal to the amount of such offset or defense shall be deemed not to
            be an Eligible Receivable;

            SECTION 2. Conditions Precedent. The effectiveness of this Amendment
is subject to the satisfaction of the following conditions precedent:

            (a) that certain Assignment and Acceptance Agreement dated as of the
      date

<PAGE>

      hereof, by and among EagleFunding Capital Corporation, Fleet National
      Bank, Fleet Securities, Inc., the Conduit Purchaser, the Committed
      Purchaser, the Administrator and the Seller, shall have become effective
      in accordance with its terms; and

            (b) the Administrator shall have received (which receipt may be by
      facsimile transmission) counterparts of this Amendment, executed by the
      Seller, the Servicer, the Conduit Purchaser, the Committed Purchaser and
      the Administrator.

            SECTION 3. Representations and Warranties. Each of the Seller and
the Servicer hereby represents and warrants that (i) this Amendment constitutes
its legal, valid and binding obligation, enforceable against such party in
accordance with its terms, (ii) before and after giving effect to this
Amendment, the representations and warranties of each such party, respectively,
set forth in Article 6 of the Receivables Purchase Agreement are true and
correct in all material respects with the same effect as if made on the date
hereof, except to the extent such representations and warranties expressly
relate to an earlier date. The Seller further represents and warrants that
before and after giving effect to this Amendment, no event has occurred and is
continuing that constitutes a Liquidation Event or an Unmatured Liquidation
Event.

            SECTION 4. Reference to and Effect on the Receivables Purchase
Agreement.

            4.1 Upon the effectiveness of this Amendment, (i) each reference in
the Receivables Purchase Agreement to "this Agreement", "hereunder", "hereof",
"herein" or words of like import shall mean and be a reference to the
Receivables Purchase Agreement, as amended hereby, and (ii) each reference to
the Receivables Purchase Agreement in any other Transaction Document or any
other document, instrument or agreement executed and/or delivered in connection
therewith, shall mean and be a reference to the Receivables Purchase Agreement
as amended hereby.

            4.2 Except as specifically amended above, the terms and conditions
of the Receivables Purchase Agreement, of all other Transaction Documents and
any other documents, instruments and agreements executed and/or delivered in
connection therewith, shall remain in full force and effect and are hereby
ratified and confirmed.

            4.3 The execution, delivery and effectiveness of this Amendment
shall not operate as a waiver of any right, power or remedy of the
Administrator, the Conduit Purchaser or the Committed Purchaser under the
Receivables Purchase Agreement or any other Transaction Document or any other
document, instrument or agreement executed in connection therewith, nor
constitute a waiver of any provision contained therein, in each case except as
specifically set forth herein.

            SECTION 5. Execution in Counterparts. This Amendment may be executed
in any number of counterparts and by different parties hereto in separate
counterparts, each of which when so executed and delivered shall be deemed to be
an original and all of which taken together shall constitute but one and the
same instrument.

            SECTION 6. GOVERNING LAW. THIS AMENDMENT SHALL BE GOVERNED BY AND
CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF NEW YORK.

                                       2
<PAGE>

            SECTION 7. Section Titles. The section titles contained in this
Amendment are and shall be without substance, meaning or content of any kind
whatsoever and are not a part of the agreement between the parties hereto.

                [THE REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]

                                       3
<PAGE>

            IN WITNESS WHEREOF, the parties hereto have caused this Amendment to
be executed by their respective officers thereunto duly authorized as of the
date first above written.

                                 AVISTA RECEIVABLES CORP.,
                                    as Seller

                                 By: /s/ Diane C. Thoren
                                    ---------------------------------
                                    Name: Diane C. Thoren
                                    Title: Vice President

                                 AVISTA CORPORATION,
                                    as Servicer

                                 By: /s/ Christy M. Burmeister-Smith
                                     -------------------------------------
                                     Name: Christy M. Burmeister-Smith
                                     Title: Vice President and Controller

                                Signature Page to
                Amendment No. 2 to Receivables Purchase Agreement


<PAGE>

                                 RECEIVABLES CAPITAL COMPANY LLC,
                                    as Conduit Purchaser

                                 By: /s/ Evelyn Echevarria
                                     --------------------------------
                                     Name: Evelyn Echevarria
                                     Title: Vice President

                                Signature Page to
                Amendment No. 2 to Receivables Purchase Agreement

<PAGE>

                                 BANK OF AMERICA, N.A.,
                                    as Committed Purchaser

                                 By: /s/ Charu Mani
                                     --------------------------------
                                     Name: Charu Mani
                                     Title: Vice President

                                Signature Page to
                Amendment No. 2 to Receivables Purchase Agreement

<PAGE>

                                 BANK OF AMERICA, N.A.,
                                    as Administrator

                                 By: /s/ Charu Mani
                                     --------------------------------
                                     Name: Charu Mani
                                     Title: Vice President

                                Signature Page to
                Amendment No. 2 to Receivables Purchase Agreement