Is it possible to buy a genuine iPhone battery online?
I've replaced several batteries in older iPhones including the iPhone 3.. I have not tried in the iPhone 4 models.

In the original and the iPhone 3 / 3GS, it's really quite simple. The batteries were fine (from Amazon). They come with the tool to separate the back panel, look at iFixit.com for instructions, but just take your time and be patient..

HTH