Bitcoin Forum
November 05, 2024, 09:22:02 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to assign a bitcoin address for each new member in a website  (Read 343 times)
LAURA98 (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
November 25, 2017, 01:11:43 PM
 #1

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.
aleksej996
Sr. Member
****
Offline Offline

Activity: 490
Merit: 389


Do not trust the government


View Profile
November 25, 2017, 01:16:35 PM
 #2

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.
Colorblind
Member
**
Offline Offline

Activity: 392
Merit: 41

This text is irrelevant


View Profile
November 25, 2017, 01:56:49 PM
 #3

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!
LAURA98 (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
November 25, 2017, 02:03:21 PM
 #4

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?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3472
Merit: 4801



View Profile
November 25, 2017, 03:53:21 PM
 #5

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.
LAURA98 (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
November 26, 2017, 01:05:21 PM
 #6

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?
Quickfant
Member
**
Offline Offline

Activity: 128
Merit: 27


View Profile
November 26, 2017, 01:36:53 PM
 #7

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.
Colorblind
Member
**
Offline Offline

Activity: 392
Merit: 41

This text is irrelevant


View Profile
November 29, 2017, 09:23:06 AM
 #8

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.
achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6885


Just writing some code


View Profile WWW
November 29, 2017, 07:16:59 PM
 #9

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.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!