<PAGE>

                                                                    EXHIBIT 10.6

                              AMENDMENT NO. 2 TO
                             AMENDED AND RESTATED
                         REGISTRATION RIGHTS AGREEMENT

     THIS AMENDMENT NO. 2 TO AMENDED AND RESTATED REGISTRATION RIGHTS AGREEMENT
(the "Second Amendment") is made and entered into as of the 7th day of January,
2000 by and among eDocs, Inc., a Delaware corporation (the "Company"), Kevin
Laracey, Kris Canekeratne and James Moran (each, a "Founder" and together, the
"Founders"), the holders of the Company's Series A Convertible Preferred Stock
(the "Series A Holders"), the holders of the Company's Series B Convertible
Preferred Stock (the "Series B Investors"), the holders of the Company's Series
C Convertible Preferred Stock (the "Series C Holders") and those persons or
entities listed as Purchasers (the "Series D Investors") on Exhibit 2.01A to
                                                            -------------
that certain Series D Convertible Preferred Stock Purchase Agreement of even
date herewith (the "Series D Purchase Agreement").  The Series A Holders, the
Series B Investors, the Series C Investors and the Series D Investors are
hereinafter referred to individually as an "Investor" and collectively as the
"Investors."

     WHEREAS, the Company, the Founders, the Series A Holders, the Series B
Investors, and the Series C Investors are parties to an Amended and Restated
Registration Rights Agreement dated as of April 30, 1999, as amended by
Amendment No. 1 dated as of August 6, 1999 (as so amended, the "Amended and
Restated Registration Rights Agreement").

     WHEREAS, the Series D Investors have on this date purchased, and the
Company has issued to the Series D Investors pursuant to the Series D Purchase
Agreement, the number of shares of the Company's Series D Convertible Preferred
Stock, $0.001 par value per share, as set forth opposite the Series D Investors'
respective names on Exhibit 2.01A to the Series D Purchase Agreement; and
                    -------------

     WHEREAS, it is a condition precedent to the obligation of the Series D
Investors under the Series D Purchase Agreement that the Company, the Series A
Holders, the Series B Investors and the Series C Investors amend the Amended and
Restated Registration Rights Agreement to admit the Series D Investors as
parties thereto;

     NOW, THEREFORE, in consideration of the mutual promises and covenants
contained in this Amendment and in the Series D Purchase Agreement and pursuant
to Section 13 of the Amended and Restated Registration Rights Agreement, the
Company and the Holders (as defined in the Amended and Restated Registration
Rights Agreement) holding at least sixty percent (60%) of the Registrable Stock
(as defined in the Amended and Restated Registration Rights Agreement) and the
securities convertible into, exchangeable for or exercisable for Registrable
Stock, do hereby amend the Amended and Restated Registration Rights Agreement,
as follows:
<PAGE>

                                      -2-


     1.  The definitions of "Investors" and "Preferred Stock" set forth in
Section 1 of the Amended and Restated Registration Rights Agreement shall each
be amended and restated as follows:

         "Investors" means the Series A Holders, the Series B Investors, the
          ---------
     Series C Investors, and the persons or entities which purchased or will
     purchase shares of Series D Preferred Stock pursuant to the Series D
     Purchase Agreement.

         "Preferred Stock" means the Series A Preferred Stock, the Series B
          ---------------
     Preferred Stock, the Series C Preferred Stock, and the Series D Preferred
     Stock, in each case, now owned or hereinafter acquired.

     2.  Section 1 of the Amended and Restated Registration Rights Agreement
shall be amended by adding the definitions of "Series C Investors", "Series D
Preferred Stock" and "Series D Purchase Agreement" as follows:

          "Series C Investors" shall mean and include those persons or entities
           ------------------
     which purchased shares of Series C Preferred Stock pursuant to the Series C
     Purchase Agreement.

          "Series D Preferred Stock" means the Company's Series D Convertible
           ------------------------
     Preferred Stock, $0.001 par value per share.

          "Series D Purchase Agreement" shall mean that certain Series D
           ---------------------------
     Convertible Preferred Stock Purchase Agreement dated as of January 7, 2000
     by and among the Company and those persons or entities listed on Exhibit
                                                                      -------
     2.01A thereto.
     -----

     3.   Section 20 of the Amended and Restated Registration Rights Agreement
shall be amended and restated as follows:

          20.  Additional Parties.  Each party hereto agrees that any person or
               ------------------
     entity who acquires any Series C Preferred Stock of the Company pursuant to
     the Series C Purchase Agreement and any person or entity who acquires any
     Series D Preferred Stock of the Company pursuant to the Series D Purchase
     Agreement may become a party to this Agreement by executing a counterpart
     hereto, in which event such person or entity shall become bound by and
     shall enjoy the benefits conferred hereby.

     4.   Governing Law.  This Second Amendment shall be governed by, construed
          -------------
in accordance with, the laws of the Commonwealth of Massachusetts (without
regard to conflict of laws provisions).

     5.   Entire Agreement.  The Amended and Restated Registration Rights
          ----------------
Agreement, as amended hereby, constitutes the full and entire understanding
among the parties regarding the subject matter herein. Except as otherwise
expressly provided herein,
<PAGE>

                                      -3-

the provisions hereof shall inure to the benefit of, and be binding upon, the
successors, assigns, heirs, executors and administrators of the parties hereto.

     6.   Full Force and Effect.  Except as amended hereby, the Amended and
          ---------------------
Restated Registration Rights Agreement shall remain in full force and effect.

     7.   Counterparts.  This Second Amendment may be executed in two or
          ------------
more counterparts, each of which shall be deemed an original, but all of which
together shall constitute one and the same instrument.

     8.   Headings.  Headings in this Second Amendment are included for
          --------
reference only and have no effect upon the construction or interpretation of any
part of this Second Amendment.



                 [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]
<PAGE>

                                      -4-

     IN WITNESS WHEREOF, the Company has caused this Second Amendment to be
executed by a duly authorized officer, and each Investor has duly executed this
Second Amendment (or has caused it to be executed by a duly authorized officer,
partner, trustee or agent, as the case may be), as of the date first above
recited.

                              COMPANY:

                              eDocs, Inc.



                              By:/s/ Kevin Laracey
                                 -----------------


                      (See counterpart signature pages.)
<PAGE>

                              AMENDMENT NO. 2 TO
                             AMENDED AND RESTATED
                         REGISTRATION RIGHTS AGREEMENT

                        * COUNTERPART SIGNATURE PAGE *
                          --------------------------


                          INVESTORS:
                          ---------

                          CHARLES RIVER PARTNERSHIP VIII,
                          A Limited Partnership



                          By:/s/ Jonathan M. Guerster
                             ------------------------
                          Address:  1000 Winter Street
                                    Suite 3300
                                    Boston, MA  02154


                          SIGMA PARTNERS IV, L.P.



                          By:/s/ Robert E. Davoli
                             --------------------
                          Address:  2884 Sand Hill Road, Suite 121
                                    Menlo Park, CA 94025


                          SIGMA ASSOCIATES IV, L.P.



                          By:/s/ Robert E. Davoli
                             --------------------
                          Address:  2884 Sand Hill Road, Suite 121
                                    Menlo Park, CA 94025

<PAGE>

                          SIGMA INVESTORS IV, L.P.



                          By:/s/ Robert E. Davoli
                             --------------------
                          Address:  2884 Sand Hill Road, Suite 121
                                    Menlo Park, CA 94025


                          SIGMA PARTNERS V, L.P.



                          By: /s/ Robert E. Davoli
                              --------------------
                          Address:  2884 Sand Hill Road, Suite 121
                                    Menlo Park, CA 94025


                          SIGMA ASSOCIATES V, L.P.



                          By:/s/ Robert E. Davoli
                             --------------------
                          Address:  2884 Sand Hill Road, Suite 121
                                    Menlo Park, CA 94025


                          SIGMA INVESTORS V, L.P.



                          By:/s/ Robert E. Davoli
                             --------------------
                          Address:  2884 Sand Hill Road, Suite 121
                                    Menlo Park, CA 94025

<PAGE>

                          JAFCO CO., LTD.



                          By:/s/ Barry J. Schiffman
                             ----------------------
                             Barry J. Schiffman, President
                             JAFCO America Ventures Inc.
                             Attorney-in-fact

                          Address:  One Boston Place
                                    Suite 3320
                                    Boston, MA  02108


                          JAFCO L-1 VENTURE CAPITAL
                          INVESTMENT LIMITED PARTNERSHIP



                          By: /s/ Barry J. Schiffman
                              ----------------------
                              Barry J. Schiffman, President
                              JAFCO America Ventures Inc.
                              Attorney-in-fact

                          Address:  One Boston Place
                                    Suite 3320
                                    Boston, MA  02108


                          JAFCO USIT FUND III, L.P.



                          By:  /s/ Barry J. Schiffman
                               ----------------------
                               Barry J. Schiffman, Executive Managing
                               Principal
                               JAV Management Associates III, L.L.C.
                               Its General Partner

                          Address:  One Boston Place
                                    Suite 3320
                                    Boston, MA  02108

<PAGE>

                          THE GOLDMAN SACHS GROUP, Inc.



                          By:  /s/ Joseph Gleberman
                               --------------------
                               Name:  Joseph G. Gleberman
                               Title:  Vice President

                          Address:  85 Broad Street, 10th Floor
                                    New York, NY  10004
                                    Attention: Tara Harrison

                          Facsimile:  (212) 357-5505


                          STONE STREET FUND 1999, L.P.
                          By:  Stone Street 1999, L.L.C.,
                               its general partner



                          By:/s/ Katherine L. Nissenbaum
                             ---------------------------
                             Name: Katherine L. Nissenbaum
                                   Title: Vice President

                          Address:  85 Broad Street, 10th Floor
                                    New York, NY  10004
                                    Attention:  Tara Harrison

                          Facsimile:  (212) 357-5505


                          COMDISCO, INC.



                          By:/s/ James Labe
                             --------------

                          Address:  6111 North River Road
                                    Rosemont, IL  60018

<PAGE>

                          GE CAPITAL EQUITY INVESTMENTS, INC.



                          By:/s/ Michael S. Fisher
                             ---------------------
                             Name:  Michael S. Fisher
                             Title:  Sr. Vice President

                          Address:  120 Long Ridge Road
                                    Stamford, CT  06927-5000


                          FOUNDERS:
                          --------

                          /s/ Kevin E. Laracey
                          --------------------
                          Kevin E. Laracey


                          /s/ James Moran
                          ---------------
                          James Moran


                          /s/ Kris Canekeratne
                          --------------------
                          Kris Canekeratne

<PAGE>

                             AMENDED AND RESTATED
                             --------------------
                         REGISTRATION RIGHTS AGREEMENT

                          Counterpart Signature Page

                            Dated January 31, 2000

          Reference is made to that certain Amended and Restated Registration
Rights Agreement dated as of April 30, 1999 by and among eDocs, Inc., a Delaware
corporation (the "Company") and the parties thereto, as amended by Amendment No.
1 dated as of August 6, 1999 and Amendment No. 2 dated January 7, 2000 (as so
amended, the "Registration Rights Agreement").  Capitalized terms used as
defined terms herein and not otherwise defined shall have the meanings ascribed
to such terms in the Registration Rights Agreement.

          Vignette Corporation (the "Additional Purchaser") has, on this date
purchased, and the Company has issued to the Additional Purchaser pursuant to
that certain Series D Convertible Preferred Stock Purchase Agreement dated as of
January 7, 2000 by and among the Company and the Persons listed on Exhibit 2.01A
                                                                   -------------
thereto, 156,646 shares of the Series D Convertible Preferred Stock, $0.001 par
value per share (the "Series D Preferred Stock"), of the Company.

          By execution of this Counterpart Signature Page to the Registration
Rights Agreement, the undersigned hereby:  (a) acknowledges receipt of a copy of
the Registration Rights Agreement; (b) agrees that the shares of Common Stock
issuable upon conversion of the Series D Preferred Stock acquired by the
undersigned shall be included within the meaning of Registrable Stock for all
purposes of, and shall be subject in all respects to, the Registration Rights
Agreement; and (c) agrees that the undersigned shall be bound by and obtain the
benefit of the rights and restrictions of the Registration Rights Agreement as a
Holder thereunder.

                 [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]
<PAGE>

              AMENDED AND RESTATED REGISTRATION RIGHTS AGREEMENT

                          Counterpart Signature Page

          IN WITNESS WHEREOF, the parties hereto have hereunto set their hands
as of the date first above written.


                          COMPANY:
                          -------
                          eDocs, Inc.



                          By: /s/ Kevin E. Laracey
                              --------------------
                              Kevin E. Laracey
                              President



                          VIGNETTE CORPORATION



                          By: /s/ David Brodsky
                              -----------------
                              Name:
                              Title: