Title: How to assign a bitcoin address for each new member in a website Post by: LAURA98 on November 25, 2017, 01:11:43 PM Hi I just want to know how to assign a unique address for each member of a website to identify if they already paid the website's membership fee.
Title: Re: How to assign a bitcoin address for each new member in a website Post by: aleksej996 on November 25, 2017, 01:16:35 PM Hi I just want to know how to assign a unique address for each member of a website to identify if they already paid the website's membership fee. You could create a private key out of their session cookie. Just make sure to salt it correctly, the session cookies where never intended for such importance so adding your own is a good idea. Title: Re: How to assign a bitcoin address for each new member in a website Post by: Colorblind on November 25, 2017, 01:56:49 PM Hi I just want to know how to assign a unique address for each member of a website to identify if they already paid the website's membership fee. You can use bitcoin api to generate any amount of adresses from your public key (see this example https://github.com/weex/addrgen) Now generate unique address for each of your users and store it as an additional field in your database After this is done - you can easily check if payment have been received if selected address was credited. Profit! Title: Re: How to assign a bitcoin address for each new member in a website Post by: LAURA98 on November 25, 2017, 02:03:21 PM Hi I just want to know how to assign a unique address for each member of a website to identify if they already paid the website's membership fee. You can use bitcoin api to generate any amount of adresses from your public key (see this example https://github.com/weex/addrgen) Now generate unique address for each of your users and store it as an additional field in your database After this is done - you can easily check if payment have been received if selected address was credited. Profit! What if the generated address belongs to other wallet or it is impossible for it to generate an address that belongs to others? Title: Re: How to assign a bitcoin address for each new member in a website Post by: DannyHamilton on November 25, 2017, 03:53:21 PM What if the generated address belongs to other wallet or it is impossible for it to generate an address that belongs to others? As long as your software doesn't have a bug that results in it incorrectly generating random numbers, it is effectively impossible to generate an address that belongs to others. Title: Re: How to assign a bitcoin address for each new member in a website Post by: LAURA98 on November 26, 2017, 01:05:21 PM What if the generated address belongs to other wallet or it is impossible for it to generate an address that belongs to others? As long as your software doesn't have a bug that results in it incorrectly generating random numbers, it is effectively impossible to generate an address that belongs to others. Is there an existing opensource software for it, or should I buy that software? Title: Re: How to assign a bitcoin address for each new member in a website Post by: Quickfant on November 26, 2017, 01:36:53 PM What if the generated address belongs to other wallet or it is impossible for it to generate an address that belongs to others? As long as your software doesn't have a bug that results in it incorrectly generating random numbers, it is effectively impossible to generate an address that belongs to others. Is there an existing opensource software for it, or should I buy that software? You might be able to use bitaddress.org software which I think is open source if not you could hire someone to create a similar sort of setup over in the services sub forum. Title: Re: How to assign a bitcoin address for each new member in a website Post by: Colorblind on November 29, 2017, 09:23:06 AM Hi I just want to know how to assign a unique address for each member of a website to identify if they already paid the website's membership fee. You can use bitcoin api to generate any amount of adresses from your public key (see this example https://github.com/weex/addrgen) Now generate unique address for each of your users and store it as an additional field in your database After this is done - you can easily check if payment have been received if selected address was credited. Profit! What if the generated address belongs to other wallet or it is impossible for it to generate an address that belongs to others? If you use same public key to generate addresses there is no way to generate "wrong" address - all of them will be controlled by a single private key. There is no specific open source solution that does exactly what you ask for out of the box, but this is very popular solution and you should be able to find code snippets by doing quick google (like the one I linked above). Just remember to try everything on testnet before going live! You don't want your users to send their BTC to the void. Also make sure accepting BTC is legal in country you accept it. Otherwise you may attract unwanted attention. Paying taxes from BTC income can be tricky. Title: Re: How to assign a bitcoin address for each new member in a website Post by: achow101 on November 29, 2017, 07:16:59 PM Is there an existing opensource software for it, or should I buy that software? There are hundreds of open source libraries that you can use for doing Bitcoin things on websites and in other software. Just use Google and you will find them. There is no need to pay any money to use a library. |