Blockchain receive API with same address

2k views Asked by At

I need to accept bitcoins on my website (PHP). I'm using blockchain and i have read the api: https://blockchain.info/api/api_receive Is quite simple but i have some questions, but first i will try to explain what i need.

  • Client send bitcoins to my wallet (Any amount they want)
  • Server will be notified with confirmations until gets OK.
  • Gets the sent amount and client wallet from callback and store in DB.

Now my questions:

  1. "You provide a bitcoin address we generate unique addresses that forwards payments to that address instantly notifying a callback URL." Q: Can we reuse that address and all clients use same address to send bitcoins? Or address will be deleted? The address have a lifetime?

  2. Instead create address to pay is possible clients pay directly to my wallet and server got notified? I don't need extra params like tokens.

I end up in a website that use always the same wallet/address for each odd: http://bitzillions.com/satoshibones

I will like to have a pay system like that, one address per game.

Also should i use blockchain/blockchain (https://github.com/blockchain/api-v1-client-php) library or the simple library (https://github.com/blockchain/receive_payment_php_demo)?

Also if you have any suggestion or alternative i will like to hear.

1

There are 1 answers

3
Sarah Foster On BEST ANSWER

I think I can help. Disclaimer that I work for BlockTrail.

It would not be good to use the same address because people can view the historical transactions associated with that address. It is recommended to use a new address for every transaction. These can be under the same wallet or different wallets. That may sound complicated but with the possibilities as long as the universe is old you can make a new address per transactions. Some wallets will do this for you automatically. This is called HD Wallets or Hierarchical Deterministic Wallets. You can also use this to have your clients always pay into the same wallet.

You can also use an API to create these wallets. If you are interested in using BlockTrail's here is the link: https://www.blocktrail.com/

We also have webhooks that will send you notifications for confirmations etc... If you want to learn more about our platform, here is a blog that describes it. BTW it is free! https://blog.blocktrail.com/2015/06/blocktrails-developer-platform/