- send bitcoins from a Coinbase acccount
- generate Bitcoin invoices with callback urls
npm install coinbase-node
const coinbase = new CoinbaseClient({
apiKey: process.env.COINBASE_API_KEY,
secret: process.env.COINBASE_SECRET
});
coinbase.sendMoney({
to: 'me@stevenzeiler.com',
amount: 1.5,
note: 'Payment for Services'
})
.then(function(transaction) {
// do something with new transaction
})
.error(function(error) {
// handle error
});
coinbase.getTransaction({
id: 12345
})
.then(function(transaction) {
// do something with new transaction
})
.error(function(error) {
// handle error
});
coinbase.listTransactions()
.then(function(transaction) {
// do something with new transactions
})
.error(function(error) {
// handle error
});