Blockchain Receive API - custom Parameters

0

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?

Tim

Posted 2016-02-10T18:44:26.800

Reputation: 1

Answers

0

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;

m1xolyd1an

Posted 2016-02-10T18:44:26.800

Reputation: 3 356

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 2016-02-15T17:05:57.503