<p>I have not tried anything with the blockchain API, but you are trying to reply to a POST they sent you, then just echo or print whatever you are sending back to blockchain.</p>

<p>If you are trying to retrieve data (provided it is POSTed) you can use this to figure out what all is being sent to you.</p>

<pre><code>foreach($_POST as $key =&gt; $value){
    $data = $key.' =&gt; '.$value.' : '.$data;
}

file_put_contents('FILENAME.txt', $data);
</code></pre>

CC BY-SA 3.0
2013-02-09T00:11:17.647Z
Sorry you must misunderstand, I'm talking about Bitcoin addresses, nothing to do with GET/POST. If they send me some BTC and for example, I want to do a refund (in code naturally).
Lloyd
CC BY-SA 3.0
2013-02-09T00:20:43.950Z
If you print all the key value pairs and the address is not there, then they are not sending it.
fwho
CC BY-SA 3.0
2013-02-09T00:22:06.517Z
And that's my point. Where is it? In everything I've seen it doesn't send it as part of the callback. So how do I find it is what I want to know. At present the only place I can see it is in the TX but I don't know how prudent it is to pull it from that as some TX have multiple inputs :/
Lloyd
CC BY-SA 3.0
2013-02-09T00:08:34.330Z
2013-02-09T00:08:34.330Z
fwho
<p>I just started using the Blockchain.info API, I've set it up to notify me when a payment is made, however all addresses in the callback are the destination address. Shouldn't I have the senders address as well?</p>

<p>Is there any way of getting the senders address, otherwise how am I supposed to reply?</p>

<p>I know transaction has the address, do I just pull the first address from inputs of the transaction?</p>

<blockchain.info>
Blockchain.info - How to reply to a sender in a callback?
Lloyd
# Blockchain.info - How to reply to a sender in a callback?

(Asked by: username_0 on 2013-02-08)

I just started using the Blockchain.info API, I've set it up to notify me when a payment is made, however all addresses in the callback are the destination address. Shouldn't I have the senders address as well?

Is there any way of getting the senders address, otherwise how am I supposed to reply?

I know transaction has the address, do I just pull the first address from inputs of the transaction?

**Tags:** blockchain.info


---

## 1 answers

### Answer by username_1 on 2013-02-09. Score: 0

I have not tried anything with the blockchain API, but you are trying to reply to a POST they sent you, then just echo or print whatever you are sending back to blockchain.

If you are trying to retrieve data (provided it is POSTed) you can use this to figure out what all is being sent to you.

```
foreach($_POST as $key => $value){
    $data = $key.' => '.$value.' : '.$data;
}

file_put_contents('FILENAME.txt', $data);

```

> **Comments:**
> **username_0**: Sorry you must misunderstand, I'm talking about Bitcoin addresses, nothing to do with GET/POST. If they send me some BTC and for example, I want to do a refund (in code naturally).  
> **username_1**: If you print all the key value pairs and the address is not there, then they are not sending it.  
> **username_0**: And that's my point. Where is it? In everything I've seen it doesn't send it as part of the callback. So how do I find it is what I want to know. At present the only place I can see it is in the TX but I don't know how prudent it is to pull it from that as some TX have multiple inputs :/  

---

