Bitcoin Forum
April 27, 2024, 04:27:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1]
  Print  
Author Topic: BlockChain Receive Payments API Question?  (Read 663 times)
jayc89 (OP)
Hero Member
*****
Offline Offline

Activity: 756
Merit: 500

CryptoTalk.Org - Get Paid for every Post!


View Profile
February 12, 2014, 09:00:40 PM
Last edit: February 12, 2014, 09:55:01 PM by jayc89
 #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.

 
                                . ██████████.
                              .████████████████.
                           .██████████████████████.
                        -█████████████████████████████
                     .██████████████████████████████████.
                  -█████████████████████████████████████████
               -███████████████████████████████████████████████
           .-█████████████████████████████████████████████████████.
        .████████████████████████████████████████████████████████████
       .██████████████████████████████████████████████████████████████.
       .██████████████████████████████████████████████████████████████.
       ..████████████████████████████████████████████████████████████..
       .   .██████████████████████████████████████████████████████.
       .      .████████████████████████████████████████████████.

       .       .██████████████████████████████████████████████
       .    ██████████████████████████████████████████████████████
       .█████████████████████████████████████████████████████████████.
        .███████████████████████████████████████████████████████████
           .█████████████████████████████████████████████████████
              .████████████████████████████████████████████████
                   ████████████████████████████████████████
                      ██████████████████████████████████
                          ██████████████████████████
                             ████████████████████
                               ████████████████
                                   █████████
.CryptoTalk.org.|.MAKE POSTS AND EARN BTC!.🏆
1714235240
Hero Member
*
Offline Offline

Posts: 1714235240

View Profile Personal Message (Offline)

Ignore
1714235240
Reply with quote  #2

1714235240
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714235240
Hero Member
*
Offline Offline

Posts: 1714235240

View Profile Personal Message (Offline)

Ignore
1714235240
Reply with quote  #2

1714235240
Report to moderator
1714235240
Hero Member
*
Offline Offline

Posts: 1714235240

View Profile Personal Message (Offline)

Ignore
1714235240
Reply with quote  #2

1714235240
Report to moderator
1714235240
Hero Member
*
Offline Offline

Posts: 1714235240

View Profile Personal Message (Offline)

Ignore
1714235240
Reply with quote  #2

1714235240
Report to moderator
BawsyBoss
Sr. Member
****
Offline Offline

Activity: 389
Merit: 250


View Profile
February 12, 2014, 11: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.

Forever strong.
jayc89 (OP)
Hero Member
*****
Offline Offline

Activity: 756
Merit: 500

CryptoTalk.Org - Get Paid for every Post!


View Profile
February 12, 2014, 11: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.

 
                                . ██████████.
                              .████████████████.
                           .██████████████████████.
                        -█████████████████████████████
                     .██████████████████████████████████.
                  -█████████████████████████████████████████
               -███████████████████████████████████████████████
           .-█████████████████████████████████████████████████████.
        .████████████████████████████████████████████████████████████
       .██████████████████████████████████████████████████████████████.
       .██████████████████████████████████████████████████████████████.
       ..████████████████████████████████████████████████████████████..
       .   .██████████████████████████████████████████████████████.
       .      .████████████████████████████████████████████████.

       .       .██████████████████████████████████████████████
       .    ██████████████████████████████████████████████████████
       .█████████████████████████████████████████████████████████████.
        .███████████████████████████████████████████████████████████
           .█████████████████████████████████████████████████████
              .████████████████████████████████████████████████
                   ████████████████████████████████████████
                      ██████████████████████████████████
                          ██████████████████████████
                             ████████████████████
                               ████████████████
                                   █████████
.CryptoTalk.org.|.MAKE POSTS AND EARN BTC!.🏆
taranakiblaze
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
February 18, 2014, 06: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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!