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?

1 Answer 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;
  • 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("blockchain.info/merchant/$ID/…); ?
    – Tim
    Feb 15, 2016 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.