I'm trying to create a website that will allow me to accept payment in bitcoins. What I need is a way to integrate the wallet with the website so that I can generate a unique address to give each user to deposit the bitcoins. The reason to create a different address for each user to pay is to create a sense of anonymity. The site is purely for transactional purposes and not for mining. How do I generate a unique valid address for each user?

1 Answer 1


You can use bitcoinjs-lib, a nodejs package which easily generates addresses. Apart from that it manages transaction signing and other useful stuff too which would help in development. You can check out their site (where there is a list of organisations, including blockchain.info, who use their package)


  • This I assume would work like a web wallet. I want to integrate my already existing bitcoin wallet (not web) to generate addresses in the browser. Would that be possible or would it have to be a web wallet only?
    – tbolt
    Nov 2, 2016 at 15:33
  • Your bitcoin wallet is nothing but a collection of your private keys (in WIF format) and the public keys(addresses). You can obviously add more keys to the wallet using the wallet software, or add another address not generated from the wallet too. The integration you speak of is just adding new key-pairs generated by bitcoin-js which all bwallet software support. Nov 3, 2016 at 10:51
  • this library only works with btc I presume! Is there a package to accept more coins? such as BCH, DOGE, etc. In addition, is it safe to generate a public address for each user, or is it better to assign a new wallet to each user?
    – fafa.mnzm
    Feb 22, 2022 at 6:18

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.