<p>You appear to be confusing two different blockchain's API services into one. The code snippet you provided is for their old deprecated wallet API, but your title mentioning the receive payments API is another. </p>

<p><strong>Wallet API:</strong> <a href="https://blockchain.info/api/blockchain_wallet_api" rel="nofollow">https://blockchain.info/api/blockchain_wallet_api</a><br>
(The new version requires a local service installed via NPM)</p>

<p><strong>Receive Payments API:</strong> <a href="https://blockchain.info/api/api_receive" rel="nofollow">https://blockchain.info/api/api_receive</a></p>

<p>You can add any custom parameter you would like when using the Receive Payments API just by including it as a GET within your callback URL. </p>

<pre><code>$callback_url = "yourwebsite.com/callback.php?parameter1=".$var1."&amp;parameter2=".$var2;
</code></pre>

CC BY-SA 3.0
2016-02-15T17:05:57.503Z
Can you be so kind as to give me a basic example of the receive payments api $callbackurl appended to something? Do i append it to
 json_decode(file_get_contents("https://blockchain.info/merchant/$ID/new_address?password=$PW"),true);  ?
Tim
CC BY-SA 3.0
2016-02-11T02:01:51.180Z
2016-02-11T02:01:51.180Z
m1xolyd1an
<p>I am trying to get variables back from the callback URL, but I can't figure out how to add custom parameters correctly. This is how I have them written right now:</p>

<pre><code>$newAddy = json_decode(file_get_contents("https://blockchain.info/merchant/$ID/new_address?password=$PW&amp;funding_id=$funding_id"),true);
$parseAddy = $newAddy[address];
</code></pre>

<p><code>$funding_id</code> is the extra one that I want to add. Any suggestions?</p>

<api><blockchain.info>
Blockchain Receive API - custom Parameters
Tim
# Blockchain Receive API - custom Parameters

(Asked by: username_0 on 2016-02-10)

I am trying to get variables back from the callback URL, but I can't figure out how to add custom parameters correctly. This is how I have them written right now:

```
$newAddy = json_decode(file_get_contents("https://blockchain.info/merchant/$ID/new_address?password=$PW&funding_id=$funding_id"),true);
$parseAddy = $newAddy[address];

```

`$funding_id` is the extra one that I want to add. Any suggestions?

**Tags:** api, blockchain.info


---

## 1 answers

### Answer by username_1 on 2016-02-11. Score: 1

You appear to be confusing two different blockchain's API services into one. The code snippet you provided is for their old deprecated wallet API, but your title mentioning the receive payments API is another.

**Wallet API:** <https://blockchain.info/api/blockchain_wallet_api>  
(The new version requires a local service installed via NPM)

**Receive Payments API:** <https://blockchain.info/api/api_receive>

You can add any custom parameter you would like when using the Receive Payments API just by including it as a GET within your callback URL.

```
$callback_url = "yourwebsite.com/callback.php?parameter1=".$var1."&parameter2=".$var2;

```

> **Comments:**
> **username_0**: Can you be so kind as to give me a basic example of the receive payments api $callbackurl appended to something? Do i append it to  json_decode(file_get_contents("https://blockchain.info/merchant/$ID/new_address?password=$PW"),true);  ?  

---

