If you buy hearing aids online, you'll still have to go to an audiologist to get them programmed and you will have to pay for their services. Also, like Jiro said, if something is wrong with the hearing aids, you will have to go to an audiologist to get them sent for repairs. That you will pay for too. Although if you buy them through an audiologist, they do come with a warranty.
I don't know if they do come with a warranty if you buy them online.
So you're not really doing yourself a favour by buying them online instead.