I'm sorry to have answered in this way, but the documentation from Google is pretty good in this matter; http://developer.android.com/guide/market/billing/index.html
Example "Dungeons" provides sample code that is pretty good.
Application billing is a bit more complicated and uses some advanced Android technologies, such as IPC. I have been experimenting with this for the last two to three days, and I think you will have to do as I do; close the office door and insert the sample code and documents.
Good luck Please ask any specific question along the way. I am sure that people will be more than willing to help.
source share