Author

Topic: [HOWTO] Generating temporary BTC addresses for user deposits? (Read 1464 times)

sr. member
Activity: 420
Merit: 250
I'd use the Electrum method if you're careful with your money, it's in your full control. If you want to take the easy way out, use Coinbase.
sr. member
Activity: 243
Merit: 250
nice catch!

Still, I will assign a temporary BTC address based on session. Each visitor opens a new session which can be saved to the database. Each deposit request will call a script that creates a new wallet on Coinbase, which will be saved on the database with it's session identifier (and/or user id) and expiration time.
Another script will run every x minutes (probably a cronjob) and requests wallets balance. If user sent some BTC to the wallet, the script adds the difference to users balance.

Thats my point of view. I'll post an update if it works out or not.

Why don't you use Electrum[1]? Its easy and secure. But instead of that, I suggest to export your xpub key and use a tool[2] to generate addresses from it. For WordPress, use Adbussamad's[3] WordPress plugin[4]. What you only need to do is keep your Electrum seed safe, but when you use Coinbase.com API, you will have to trust them for whole work. Its not at all safe to store Bitcoins on an online wallet.


[1] https://electrum.orain.org/wiki/How_to_accept_Bitcoin_on_a_website_using_Electrum
[2] https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#Implementations
[3]https://bitcointalk.org/index.php?action=profile;u=85981
[4] https://wordpress.org/plugins/bitcoin-address/

coinbase is a very old and trustworthy site, i am using this site for more than 2 yrs and my all deposits are done through my coinbase account , it is fast and secure. For any difficulty or problems they respond within 24 hrs. I will recommend to use coinbase it is safe and secure
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
nice catch!

Still, I will assign a temporary BTC address based on session. Each visitor opens a new session which can be saved to the database. Each deposit request will call a script that creates a new wallet on Coinbase, which will be saved on the database with it's session identifier (and/or user id) and expiration time.
Another script will run every x minutes (probably a cronjob) and requests wallets balance. If user sent some BTC to the wallet, the script adds the difference to users balance.

Thats my point of view. I'll post an update if it works out or not.

Why don't you use Electrum[1]? Its easy and secure. But instead of that, I suggest to export your xpub key and use a tool[2] to generate addresses from it. For WordPress, use Adbussamad's[3] WordPress plugin[4]. What you only need to do is keep your Electrum seed safe, but when you use Coinbase.com API, you will have to trust them for whole work. Its not at all safe to store Bitcoins on an online wallet.


[1] https://electrum.orain.org/wiki/How_to_accept_Bitcoin_on_a_website_using_Electrum
[2] https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#Implementations
[3]https://bitcointalk.org/index.php?action=profile;u=85981
[4] https://wordpress.org/plugins/bitcoin-address/
newbie
Activity: 3
Merit: 0
nice catch!

Still, I will assign a temporary BTC address based on session. Each visitor opens a new session which can be saved to the database. Each deposit request will call a script that creates a new wallet on Coinbase, which will be saved on the database with it's session identifier (and/or user id) and expiration time.
Another script will run every x minutes (probably a cronjob) and requests wallets balance. If user sent some BTC to the wallet, the script adds the difference to users balance.

Thats my point of view. I'll post an update if it works out or not.
legendary
Activity: 1512
Merit: 1012
Are you trying to run a website for selling goods or similar? Electrum can integrate with a website to do such a thing: generate an address for each payment. There are also wordpress plugins that work the same way, but you have to give those plugins your xpub key.

Otherwise I'm not sure how to handle what you want automatically. As far as I've read, Bitcoin Core is not a good start for a service like this.

Hope this can guide you further in your research...

Your answer helped me a lot on this one, Thanks!

I found out there is an API on Coinbase which allows to create, access BTC accounts and transfer it's funds.

More information on https://developers.coinbase.com/api/v2

But using an external API raises a new set of problems: the addresses aren't in your control, they're from a Coinbase wallet. On the upside it's probably easier to implement (? not sure, I never really used such a thing).
newbie
Activity: 3
Merit: 0
Are you trying to run a website for selling goods or similar? Electrum can integrate with a website to do such a thing: generate an address for each payment. There are also wordpress plugins that work the same way, but you have to give those plugins your xpub key.

Otherwise I'm not sure how to handle what you want automatically. As far as I've read, Bitcoin Core is not a good start for a service like this.

Hope this can guide you further in your research...

Your answer helped me a lot on this one, Thanks!

I found out there is an API on Coinbase which allows to create, access BTC accounts and transfer it's funds.

More information on https://developers.coinbase.com/api/v2
legendary
Activity: 1512
Merit: 1012
Are you trying to run a website for selling goods or similar? Electrum can integrate with a website to do such a thing: generate an address for each payment. There are also wordpress plugins that work the same way, but you have to give those plugins your xpub key.

Otherwise I'm not sure how to handle what you want automatically. As far as I've read, Bitcoin Core is not a good start for a service like this.

Hope this can guide you further in your research...
newbie
Activity: 3
Merit: 0
Hello everyone,

I'm currently looking for a way to generate a private deposit address for each user.

Do you know any topics or sites explaining the background or even a tutorial how to do it? My own research and possible keywords doesn't look so well... Sad
Jump to: