Author

Topic: BlockChain Receive Payments API Question? (Read 684 times)

newbie
Activity: 1
Merit: 0
February 18, 2014, 01:25:29 AM
#4
1. Every time you generate the address you'll have to also generate a unique code (Incrementing index is easiest).  Include the unique code as a refer in your callback address (eg www.yoursite.com/callback.php?refer=$unique_code)  Save the address you generated along with the unique code and any other data you may need.
2. When blockchain fires a callback, they will send you the same unique code.  Your callback will have to search your database for the code and the address the relates to it.  Use the http://blockchain.info/address/$bitcoin_address?format=json API to get an array of the transactions, get the lastest deposit and get the sending address from there Smiley.
hero member
Activity: 756
Merit: 500
CryptoTalk.Org - Get Paid for every Post!
February 12, 2014, 06:17:34 PM
#3
I'm looking for a way to include the source\sending address within the callback string when using BlockChain's Receive Payments API. Does anyone know if this is possible?

I would have thought it would be a fair straight forward requirement, but I cant see any reference to the source address in their limited documentation.
They don't have a function for that. Instead, get its transaction ID and then use the transaction API to do it. This is probably done this way because there can be mote than one input address for transactions. You could also just use a different address per transaction.

Thanks for that, if you're referring to something like "http://blockchain.info/rawtx/$tx_hash", $tx_hash being the ID sent to the callback page, unfortunately that shows me the transaction for newly generated address -> destination address

I need a way of reversing that a step further and logically identifying the ID for the source address -> newly generated address transaction.
sr. member
Activity: 389
Merit: 250
February 12, 2014, 06:08:41 PM
#2
I'm looking for a way to include the source\sending address within the callback string when using BlockChain's Receive Payments API. Does anyone know if this is possible?

I would have thought it would be a fair straight forward requirement, but I cant see any reference to the source address in their limited documentation.
They don't have a function for that. Instead, get its transaction ID and then use the transaction API to do it. This is probably done this way because there can be mote than one input address for transactions. You could also just use a different address per transaction.
hero member
Activity: 756
Merit: 500
CryptoTalk.Org - Get Paid for every Post!
February 12, 2014, 04:00:40 PM
#1
I'm looking for a way to include the source\sending address within the callback string when using BlockChain's Receive Payments API. Does anyone know if this is possible?

I would have thought it would be a fair straight forward requirement, but I cant see any reference to the source address in their limited documentation.
Jump to: