Node.js library for commerce.coinbase.com
Create a Commerce client:
const { CoinbaseCommerce } = require('coinbase-commerce')
let client = new CoinbaseCommerce({
apiKey: '1234abcd-1234-abcd-1234-abcd1234abcd',
version: '2018-03-22' // optional
})
let results = await client.charges.list()
let result = await client.charges.get('66BEOV2A')
let result = await client.charges.create(options)
let result = await client.charges.request('post', '/resolve')
let results = await client.checkouts.list()
let result = await client.checkouts.get('1234abcd-1234-abcd-1234-abcd1234abcd')
let result = await client.checkouts.create({})
let result = await client.checkouts.update('1234abcd-1234-abcd-1234-abcd1234abcd', updates)
let result = await client.checkouts.delete('1234abcd-1234-abcd-1234-abcd1234abcd')
let results = await client.events.list()
let result = await client.events.get('66BEOV2A')
// `body` can be a String, Buffer or Object
let isVerified = client.verifyWebhookSignature(signature, body, sharedSecret)