<PAGE>

                                                                    Exhibit 4.06

                               SECURITY AGREEMENT

         THIS  SECURITY   AGREEMENT   dated  as  of  June  15,  1999  ("Security
Agreement"), is made by REALMED CORPORATION, an Indiana corporation ("Grantor"),
in favor of GEMPLUS CORP., a Delaware corporation ("Secured Party"').

                                    RECITALS

         A.  Grantor is  indebted  to Secured  Party  pursuant  to that  certain
Subordinated  Secured  Promissory  Note of even date  herewith  in the  original
principal amount of $4,285,797.87 (the "Note").

         B.  Secured  Party is willing to advance the amounts  evidenced  by the
Note (the "Loans") to Grantor,  but only upon the condition,  among others, that
Grantor  shall  have  executed  and  delivered  to Secured  Party this  Security
Agreement.

                                    AGREEMENT

         NOW, THEREFORE,  in order to induce Secured Party to make the Loans and
for other good and valuable consideration, the receipt and adequacy of which are
hereby  acknowledged,   and  intending  to  be  legally  bound,  Grantor  hereby
represents, warrants, covenants and agrees as follows:

         1.  DEFINED TERMS.  When used in this Security Agreement the following
terms shall have the following meanings (such meanings being equally applicable
to both the singular and plural forms of the terms defined):

         "Collateral"  shall have the meaning assigned to such term in Section 2
of this Security Agreement.

         "Contracts"  means with respect to the sale,  lease,  transfer or other
disposition  of  the  Readers  and  the  Proceeds   therefrom,   all  contracts,
undertakings, franchise agreements or other agreements in or under which Grantor
now holds or hereafter acquires any right, title or interest, including, without
limitation,  with respect to an Account,  any agreement relating to the terms of
payment or the terms of  performance  thereof,  excepting all  transactions  for
which Secured Party has been tendered  payment for the  applicable  reader(s) in
the normal course of business.

         "Event of Default" means (i) any failure by Grantor forthwith to pay or
perform  any of the  Secured  Obligations  (ii) any failure by Grantor to comply
with terms,  conditions,  covenants  or  agreements  set forth in this  Security
Agreement  and (iii) any  "Event of  Default"  as  defined in the Note not cured
within five (5)  business  days after  notice  thereof is tendered in the manner
provided for herein.


<PAGE>


         "Lien"  means  any  mortgage,  lien,  deed of  trust,  charge,  pledge,
security interest or other encumbrance.

         "Payment" has the meaning set forth in Section 2(b).

         "Permitted Lien" means any Liens constituting "Senior  Indebtedness" as
that term is defined in the Note.

         "Readers"  means all Smart Card Readers,  Part Number #GCR500 US-HC, in
which  Grantor now holds any  interest,  excepting all readers for which Grantor
has tendered the Payment to Secured Party.

         "Secured  Obligations"  means (a) the  obligation  of  Grantor to repay
Secured  Party all of the unpaid  principal  amount of, and accrued  interest on
(including any interest that accrues after the commencement of bankruptcy),  the
Note, (b) and any  obligation of Grantor to pay any fees,  costs and expenses of
the Secured Party under Section 6(b) hereof.

         "UCC" means the Uniform  Commercial  Code as the same may, from time to
time, be in effect in the State of California;  provided,  however, in the event
that, by reason of mandatory  provisions  of law, any or all of the  attachment,
perfection or priority of Secured Party's security interest in any Collateral is
governed by the Uniform  Commercial  Code as in effect in a  jurisdiction  other
than the State of California,  the term "UCC" shall mean the Uniform  Commercial
Code as in effect in such other  jurisdiction  for  purposes  of the  provisions
hereof relating to such  attachment,  perfection of priority and for purposes of
definitions related to such provisions.

         In  addition,  the  following  terms shall be defined  terms having the
meaning set forth for such terms in the UCC (definition  sections of the UCC are
noted  parenthetically):   "Account  Debtor"  (9105(l)(a));  "Accounts"  (9106);
"Chattel   Paper"   (9105(l)(b));    "Documents"   (9105(l)(f);    "Instruments"
(9105(l)(i);  "Proceeds"  (9306(l)).  Each of the foregoing  defined terms shall
include all of such items now owned, or hereafter acquired,  by Grantor, as such
relate only to the  Readers or the sale,  lease,  transfer or other  disposition
thereof, or the Proceeds therefrom, excepting all transactions for which Secured
Party has tendered payment for the applicable  reader(s) in the normal course of
business.

         2. GRANT OF SECURITY  INTEREST.  As collateral  security for the prompt
and complete payment and performance  when due (whether at stated  maturity,  by
acceleration or otherwise) of all the Secured Obligations and in order to induce
Secured Party to cause the Loans to be made,  Grantor hereby  assigns,  conveys,
mortgages,  pledges,  hypothecates  and transfers to Secured  Party,  and hereby
grants to Secured Party, a security  interest in all of Grantor's  right,  title
and interest  in, to and under the  following  (all of which being  collectively
referred to herein as the "Collateral"):

                                       2

<PAGE>

              (a)   Each Reader for which payment of $135.00 (the  "Payment")
to Secured Party has not been  tendered; and

              (b)   To the extent not  otherwise  included,  all proceeds  from
the sale or other disposition of each Reader,  not to exceed $135.00 per Reader,
to the extent such proceeds have not been tendered to Secured Party.

         3.  RIGHTS OF SECURED PARTY; COLLECTION OF ACCOUNTS.

              (a)   Notwithstanding  anything  contained  in  this  Security
Agreement to the contrary,  Grantor expressly agrees that it shall remain liable
under each of its  Contracts  to observe  and  perform  all the  conditions  and
obligations  to be observed  and  performed by it  thereunder  and that it shall
perform all of its duties and obligations thereunder, all in accordance with and
pursuant to the terms and provisions of each such Contract.  Secured Party shall
not have any obligation or liability  under any Contract by reason of or arising
out of this  Security  Agreement  or the  granting  to  Secured  Party of a lien
therein or the receipt by Secured Party of any payment  relating to any Contract
pursuant hereto,  nor shall Secured Party be required or obligated in any manner
to perform or fulfill any of the obligations of Grantor under or pursuant to any
Contract, or to make any payment, or to make any inquiry as to the nature or the
sufficiency of any payment  received by it or the sufficiency of any performance
by any party under any Contract, or to present or file any claim, or to take any
action to collect or enforce any performance or the payment of any amounts which
may have  been  assigned  to it or to which  it may be  entitled  at any time or
times.

              (b)  Secured  Party  authorizes Grantor to collect  its  Accounts,
provided that such collection is performed in a prudent and businesslike manner.

         Secured Party may, upon the occurrence and during the  continuation  of
any Event of Default  and upon five days  written  notice to  Grantor,  limit or
terminate  said  authority  at any time.  Upon the  occurrence  and  during  the
continuance of any Event of Default, at the reasonable request of Secured Party,
Grantor shall deliver,  with respect to all affected Accounts,  all original and
other  documents  evidencing and relating to the performance of labor or service
which created such Accounts, including, without limitation, all original orders,
invoices and shipping receipts.

              (c)  Secured  Party may at any time,  upon the  occurrence  and
during  the  continuance  of any Event of  Default,  and upon five days  written
notice to Grantor,  notify affected  Account debtors of Grantor,  parties to the
Contracts of Grantor, obligors in respect of Instruments of Grantor and obligors
in respect of Chattel  Paper of Grantor that the  Accounts and the right,  title
and  interest of Grantor in and under such  Contracts,  Instruments  and Chattel
Paper  have been  assigned  to  Secured  Party and that  payments  shall be made
directly to Secured Party. Upon the reasonable request of Secured Party upon the
occurrence and during the continuance of any event of Default,  Grantor shall so
notify such Account debtors,  parties to such Contracts,  obligors in respect of
such  Instruments  and  obligors  in respect  of such  Chattel  Paper.  Upon the
occurrence  and during the  continuance  of any Event of Default,  Secured Party

                                       3

<PAGE>

may,  upon five days  written  notice to Grantor,  in its name or in the name of
others,  communicate  with such  Account  debtors,  parties  to such  Contracts,
obligors in respect of such  Instruments and obligors in respect of such Chattel
Paper to verify with such parties,  to Secured Party's reasonable  satisfaction,
the existence, amount and terms of any such Accounts, Contracts,  Instruments or
Chattel Paper.

              (d)  Notwithstanding  anything in this Agreement, Secured  Party's
rights shall be  subordinated  (i) to the rights of Newcourt  Financial USA Inc.
("Newcourt") in any Proceeds (whether constituting Chattel Paper, Instruments or
Accounts) to the extent that such  Proceeds  were  purchased  by, or assigned to
Newcourt  under that certain  Master  Vending  Program  Agreement by and between
Grantor and Newcourt dated of even date herewith,  and (ii) to the extent and in
the manner set forth in Section 4 of the Note.

         4.  REPRESENTATIONS AND WARRANTIES.  Grantor  hereby represents and
warrants to Secured Party that:

              (a)  Except for the  security  interest  granted to Secured  Party
under this Security Agreement and Permitted Liens, Grantor is the sole legal and
equitable  owner of each item of the  Collateral in which it purports to grant a
security interest hereunder,  having good and marketable title thereto, free and
clear of any and all Liens except for Permitted Liens.

              (b)  No effective security  agreement,  financing  statement,
equivalent security or lien instrument or continuation statement covering all or
any part of the Collateral exists, except such as may have been filed by Grantor
in favor of  Secured  Party  pursuant  to this  Security  Agreement  except  for
Permitted Liens.

              (c)  This  Security  Agreement  creates  a  legal  and  valid
security  interest  on and in all of the  Collateral  in which  Grantor  now has
rights and all filings and other  actions  necessary or desirable to perfect and
protect such security interest have been duly taken. Accordingly,  Secured Party
has a fully perfected subordinated security interest in all of the Collateral to
the  extent  such  security  interest  may  be  perfected  by  filing  financing
statements in the State of Indiana.

              (d)  Grantor's  chief  executive  office,  principal  place of
business  and the place  where  Grantor  maintains  its records  concerning  the
Collateral are presently  located at the address set forth on the signature page
hereof.  The  Collateral  is  presently  located  at  such  address  and at such
additional addresses set forth on Schedule A attached hereto.

         5.  COVENANTS.  Grantor  covenants and agrees with Secured Party that
from and  after  the date of this  Security  Agreement  and  until  the  Secured
Obligations have been performed and paid in full:

                  5.1 Disposition of Collateral.  Grantor shall not sell, lease,
transfer or otherwise  dispose of any of the Collateral,  or attempt or contract
to do so,  other  than the sale or lease of Readers  in the  ordinary  course of
Grantor's business.

                                       4


<PAGE>

                  5.2  Relocation of Business or  Collateral.  Grantor shall not
relocate its chief executive office, principal place of business or its records,
or allow the relocation of any Collateral (except as allowed pursuant to Section
5.1 immediately above) from such address(es)  provided to Secured Party pursuant
to Section 4(d) above without  twenty (20) days prior written  notice to Secured
Party.

                  5.3  Limitation  on Liens on  Collateral.  Grantor  shall not,
directly or indirectly,  create, permit or suffer to exist, and shall defend the
Collateral  against and take such other action as is  necessary  to remove,  any
Lien on the  Collateral,  except (a) Permitted Liens and (b) the Lien granted to
Secured Party under this Security Agreement.

                  5.4  Insurance.   Maintain  insurance  policies  insuring  the
Collateral  against loss or damage from such risks and in such amounts and forms
and with such companies as are customarily  maintained by businesses  similar to
Grantor.

                  5.5  Taxes,  Assessments, Etc. Grantor shall pay promptly when
due all property and other taxes,  assessments and government  charges or levies
imposed  upon,  and all  claims  (including  claims  for  labor,  materials  and
supplies) against,  Grantor's  Equipment,  Fixtures or Inventory,  except to the
extent the  validity  thereof  is being  contested  in good  faith and  adequate
reserves are being maintained in connection therewith.

                  5.6  Maintenance  of  Records.  Grantor  shall keep and
maintain at its own cost and expense  satisfactory  and complete  records of the
Collateral.

                  5.7 Further Assurances; Pledge of Instruments. At any time and
from time to time,  upon the written  request of Secured Party,  and at the sole
expense of Grantor,  Grantor shall promptly and duly execute and deliver any and
all such further  instruments  and  documents  and take such  further  action as
Secured  Party may  reasonably  deem  necessary  or desirable to obtain the full
benefits of this Security Agreement, including, without limitation, facilitating
the filing of UCC-1 Financing Statements in all applicable jurisdictions.

         6.  RIGHTS AND REMEDIES UPON DEFAULT.

              (a)  After any Event of Default  shall  have  occurred  and while
such Event of Default is  continuing,  Secured Party may exercise in addition to
all other rights and remedies granted to it under this Security  Agreement,  all
rights and remedies of a Secured Party under the UCC.

              (b)  Grantor  also  agrees  to all  fees,  costs and  expenses  of
Secured  Party,  including,  without  limitation,  reasonable  attorneys'  fees,
incurred in connection  with the  enforcement  of any of its rights and remedies
hereunder.


                                       5

<PAGE>


              (c)  The Proceeds of any sale,  disposition or other  realization
upon all or any part of the Collateral  shall be distributed by Secured Party in
the following order of priorities:

         FIRST,  to  Secured  Party in an amount  sufficient  to pay in full the
reasonable  costs of Secured Party in connection  with the sale,  disposition or
other  realization  of the  collateral,  including all reasonable  fees,  costs,
expenses,  liabilities  and  advances  incurred  or made  by  Secured  Party  in
connection therewith, including, without limitation, reasonable attorneys' fees;

         SECOND, to Secured Party in an amount equal to the then unpaid Secured
Obligations; and

         FINALLY, upon payment in full of the Secured Obligations, to Grantor or
its  representatives,  in  accordance  with the UCC or as a court  of  competent
jurisdiction may direct.

         7. LIMITATION ON SECURED PARTY'S DUTY IN RESPECT OF COLLATERAL. Secured
Party shall be deemed to have acted reasonably in the custody,  preservation and
disposition of any of the Collateral if it takes such action as Grantor requests
in writing,  but failure of Secured  Party to comply with any such request shall
not in itself be deemed a failure to act reasonably.

         8. REINSTATEMENT.  This Security  Agreement shall remain in full force
and effect and  continue  to be  effective  should any  petition  be filed by or
against  Grantor  for  liquidation  or  reorganization,  should  Grantor  become
insolvent  or make an  assignment  for the  benefit  of  creditors  or  should a
receiver or trustee be appointed  for all or any  significant  part of Grantor's
property and assets and shall continue to be effective or be reinstated,  as the
case may be, if at any time payment and performance of the Secured  Obligations,
or any part thereof,  is,  pursuant to applicable  law,  rescinded or reduced in
amount or must  otherwise  be restored or returned by any obligee of the Secured
Obligations,  whether as a "voidable  preference,"  "fraudulent  conveyance"  or
otherwise,  all as though such payment or performance  had not been made. In the
event that any payment, or any part thereof, is rescinded,  reduced, restored or
returned, the Secured Obligations shall be reinstated and deemed reduced only by
such amount paid and not so rescinded, reduced, restored or returned.

         9. MISCELLANEOUS.

                  9.1      No Waiver; Cumulative Remedies.

                           (a)  Except as provided in  Subsection  (e) of this
Section 9.1, Secured Party shall not by any act, delay, omission or otherwise be
deemed to have waived any of its respective  rights or remedies  hereunder,  nor
shall any single or partial exercise of any right or remedy hereunder on any one
occasion  preclude  the further  exercise  thereof or the  exercise of any other
right or remedy.

                           (b)  The  rights  and  remedies  hereunder  provided
are cumulative and may be exercised singly or concurrently and are not exclusive
of any rights and remedies provided by law.

                                       6

<PAGE>


                           (c)  None of the terms or  provisions of this
Security  Agreement  may be waived,  altered,  modified or amended  except by an
instrument in writing, duly executed by Grantor and Secured Party.

                  9.2 Termination of this Security Agreement. Subject to Section
8  hereof,  this  Security  Agreement  shall  terminate  upon  the  payment  and
performance in full of the Secured Obligations.

                  9.3  Successor and Assigns.  This  Security  Agreement and all
obligations  of Grantor  hereunder  shall be  binding  upon the  successors  and
assigns of Grantor, and shall,  together with the rights and remedies of Secured
Party hereunder, inure to the benefit of Secured Party, any future holder of any
of the  indebtedness and their  respective  successors and assigns.  No sales of
participation,  other sales, assignments, transfers or other dispositions of any
agreement  governing or instrument  evidencing  the Secured  Obligations  or any
portion thereof or interest  therein shall in any manner affect the Lien granted
to Secured Party hereunder.

                  9.4 Governing  Law. In all respects,  including all matters of
construction,  validity and performance, this Security Agreement and the Secured
Obligations  arising  hereunder shall be governed by, and construed and enforced
in accordance with, the laws of the State of California  applicable to contracts
made and performed in such State,  excluding  conflict of laws  principles  that
would cause the application of laws of any other jurisdiction.

                  9.5 Notice. All notices under this Security Agreement shall be
in writing and sent by United States mail, postage prepaid, by hand delivery, by
a nationally recognized overnight courier, or by facsimile as follows:

         To Grantor:                RealMed Corporation
                                    10333 N. Meridian Street
                                    Suite 350
                                    Indianapolis, IN  46290
                                    Attention:  Robert J. Hicks, CEO
                                    Facsimile No.:  317/580-0027

         With a copy to:            Sommer & Barnard, PC
                                    4000 Bank One Tower
                                    111 Monument Circle
                                    Indianapolis, IN  46204
                                    Attention:  Eric R. Johnson
                                    Facsimile No.:  317/236-9802


<PAGE>



         To Secured Party:          Gemplus Corp.
                                    Suite 300
                                    3 Lagoon Drive
                                    Redwood City, California  94065-1566
                                    Attn:Legal Dept.
                                    Facsimile Number:  (650) 654-2920

Either party may change its address and/or facsimile number by giving notices as
provided  above.  Notice  shall be  considered  given and received on the actual
delivery  date or, if sent by mail and  delivery  cannot  be made by the  postal
service,  the  last  attempted  delivery  date,  as  indicated  on  the  postage
receipt(s).

                  9.6 Counterparts.  This Security  Agreement may be executed in
one or more  counterparts,  each of which shall be deemed to be an original  but
all of which together will constitute one and the same Security  Agreement.  Any
facsimile transmission of a signed counterpart of this Agreement shall be deemed
to be an original  counterpart  and all  signatures  appearing  thereon shall be
deemed to be originals.


<PAGE>


         IN WITNESS WHEREOF, each of the parties hereto has caused this Security
Agreement to be executed and  delivered  by its duly  authorized  officer on the
date first set forth above.


ADDRESS OF GRANTOR                          REALMED CORPORATION

10333 N. Meridian Street

Suite 350

Indianapolis,  IN 46290                     By:

Telephone:  (317) 580-0658                  Printed Name: Robert J. Hicks

FAX: (317) 580-0027                         Title: Chief Executive Officer




ACCEPTED AND ACKNOWLEDGED BY:

GEMPLUS CORP.

By:

Printed Name:

Title:



Address of Secured Party:

Gemplus Corp.
Attn:Legal Dept.
Suite 300
3 Lagoon Drive
Redwood City, California  94065-1566



<PAGE>


                                   Schedule A
                             Location of Collateral



Inventory Warehouse Location:

         Langham Logistics
         7955 Zionsville Road
         Indianapolis, IN 46268


<PAGE>


                                    Exhibit A


                             to Financing Statement

                     Between Gemplus Corp. as Secured Party

                       and RealMed Corporation, as Debtor


         This Financing  Statement  covers all right,  title and interest of the
Debtor in, to and under all of the following (collectively, the "Collateral"):

-   each Reader for which payment of $135.00 (the "Payment") to the Secured
Party has not been tendered; and

-   to the extent not otherwise  included,  all Proceeds from the sale or other
disposition of each Reader, not to exceed $135.00 per Reader, to the extent such
Proceeds have not been tendered to Secured Party; and

         "Readers"  means all Smart Card Readers,  Part Number #GCR500 US-HC, in
which Debtor now holds any interest,  excepting all readers for which Debtor has
tendered Payment to Secured Party; and

         "Proceeds"  shall have the  meaning as set forth in Section  9306(l) of
the Uniform Commercial Code ("UCC") as may be in effect from time to time in the
State of California,  or the UCC that may apply to this security interest in any
jurisdiction.