I recently integrated "In App Purchase" into my iPhone application. I'm not going to give a step by step guide here, there are plenty of those already. I wanted to share a few tips.
First, the biggest stumbling block for me was a dumb one. How do you test In App Purchases before your game is published to the App Store? In order to test, you need to register your In App Purchase in iTunes Connect. But in order to do that, you must have your App registered. This seems like a chicken and egg problem. However, the answer is simple. You need to "pre-register" your new app with iTunes. Go ahead and fill out that App Submission forms but check "Upload binary later". This will allow you to get your app registered with iTunes without actually submitting the App for review. You can go back later when the app is ready for review and update your metadata and submit your binary.
I found the "In App Purchase Programming Guide" provided by Apple to be very informative and all you really need to get it working. The "Adding a Store to Your Application" section provides step-by-step instructions and code samples that plug right into your code. Read carefully and follow the directions, and you will get it working.