0

Ok so I am a business trying to accept crypto as a form of payment, but can't seem to figure out how I can generate 1000s of addresses (for each customer) to pay crypto to me? Or would there be some premade tool for this?

3 Answers 3

1

I would suggest that you use a tool for this. You could use a payment processor which you pay for or have a look at BTCPayServer.

It handles payment requests and can integrate with web stores etc. It will generate the required addresses and keep track of whether a client has paid their invoices. So does what you want and more.

It can also receive lightning payments as well as traditional on-chain transactions.

0
  1. Download Bitcoin Core or Bitcoin Knots

  2. Complete the initial sync and use prune settings if disk space is an issue

  3. Create multiple wallets. One for each customer.

  4. Generate 1000 address in each wallet and use them for receiving payments

How to generate multiple legacy or segwit bitcoin address

0

Essentially all you need to do is write a simple loop that generates a new key pair each iteration. If you output the loop to a table you can easily paste the generated addresses into a spreadsheet and import to your database.

Example using buidljs

<head>
<script type="text/javascript" src="buidl.js"></script>
</head>
<body>
# of Address to Generate:<input type="number" id="iters" value="1000"><button id="addrgen">Generate</button>
<br><br>
<div id="output"></div>
<script>

var btn = document.getElementById("addrgen");

btn.onclick = function(){
    console.log('btn click');
    var iterations = document.getElementById("iters").value;
    var outtable = '<table><tr><td>Index</td><td>Address</td><td>PrivateKey</td><td>Dispensed</td></tr>';
    for(var i=0;i<iterations;i++){
        var a = buidl.getNewAddress();
        var b = a.pk;
        var c = a.p2shp2wpkh;
        outtable += '<tr><td>'+i+'</td><td>'+c+'</td><td>'+b+'</td><td>1</td></tr>';
    }
    outtable += '</table>';
    document.getElementById("output").innerHTML = outtable; 
}

The above example is from my NoNodePay project that is intended for people that want to accept bitcoin without running a node. The user generates a large amount of key pairs (default is 1,000), stores the private keys offline, imports the addresses to a database and uses a fresh one for each order. Eventually you will need to generate more and update your database.

https://github.com/coinables/NoNodePay/blob/master/js/addresses.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.