http://blockchain.info/de/api/api_receive
First you get a new bitcoin-adress from blockchain and on the same way you send them a callback url
The new bitcoin-adress you can send your custormer to pay
blockchain.info calls your callback procedure every time something changed in the payment-process. First time, when the customer send your bitcoins. In the Parameters you can find the amount of Bitcoins (in Satoshi = 1/100.000.000 BTC) and the number of confimations.
The Number of confirmations counting up every call from blockchain.ino to your callback procedure. The calls don't stop until you return ok...!
When you think you have enough confirmations you can mark your Payment as done and return ok The bitcoins booked on the bitcoin-address ($my_address) you send to blockchain.info in the first call.
This are only a few statements as you see in my link at hte beginning of my text.
blockchain.info calls your callbackprocedure with its own parameters and returns the parameter you send to blockchain.info. For this you can (not must) send your secret key. So you can detect spam-calls to your callback-funktion from other persons.
Regards heinz
www.btcloc.com