What should be the BTCPAY_URL and BTCPAY_KEY and from where i can get it?
savshit opened this issue · 1 comments
Replace the BTCPAY_XXX envirnoment variables with your values and run:
$ [space] BTCPAY_URL=https://mydomain.com/ BTCPAY_KEY=... BTCPAY_PAIRCODE=... node -e "const btcpay=require('btcpay'); new btcpay.BTCPayClient(process.env.BTCPAY_URL, btcpay.crypto.load_keypair(Buffer.from(process.env.BTCPAY_KEY, 'hex'))).pair_client(process.env.BTCPAY_PAIRCODE).then(console.log).catch(console.error)"
{ merchant: 'XXXXXX' }
generate private key : node -p "require('btcpay').crypto.generate_keypair().getPrivate('hex')"
generate public key : node -p "require('btcpay').crypto.generate_keypair().getPublic(true|false, 'hex')"
use the above command to generate a private key and use it as BTCPAY_KEY.
BTCPAY_URL is BTC PAY server url
for testnet BTCPAY_URL : https://testnet.demo.btcpayserver.org/
for mainnet BTCPAY_URL : https://mainnet.demo.btcpayserver.org/