Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewbarba/coinbase-commerce
Node.js library for https://commerce.coinbase.com
https://github.com/andrewbarba/coinbase-commerce
axios coinbase commerce cryptocurrency nodejs promise
Last synced: 22 days ago
JSON representation
Node.js library for https://commerce.coinbase.com
- Host: GitHub
- URL: https://github.com/andrewbarba/coinbase-commerce
- Owner: AndrewBarba
- Created: 2018-05-20T21:56:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-16T18:59:54.000Z (over 6 years ago)
- Last Synced: 2024-10-04T21:57:13.076Z (about 1 month ago)
- Topics: axios, coinbase, commerce, cryptocurrency, nodejs, promise
- Language: JavaScript
- Size: 24.4 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Coinbase Commerce
[![npm version](https://badge.fury.io/js/coinbase-commerce.svg)](https://badge.fury.io/js/coinbase-commerce)
[![wercker status](https://app.wercker.com/status/994eb933a3d4130e70dd47eed4788568/s/master "wercker status")](https://app.wercker.com/project/byKey/994eb933a3d4130e70dd47eed4788568)Node.js library for [commerce.coinbase.com](https://commerce.coinbase.com)
## Usage
Create a Commerce client:
```javascript
const { CoinbaseCommerce } = require('coinbase-commerce')let client = new CoinbaseCommerce({
apiKey: '1234abcd-1234-abcd-1234-abcd1234abcd',
version: '2018-03-22' // optional
})
```## Charges
### List
```javascript
let results = await client.charges.list()
```### Get
```javascript
let result = await client.charges.get('66BEOV2A')
```### Create
```javascript
let result = await client.charges.create(options)
```### Request
```javascript
let result = await client.charges.request('post', '/resolve')
```## Checkouts
### List
```javascript
let results = await client.checkouts.list()
```### Get
```javascript
let result = await client.checkouts.get('1234abcd-1234-abcd-1234-abcd1234abcd')
```### Create
```javascript
let result = await client.checkouts.create({})
```### Update
```javascript
let result = await client.checkouts.update('1234abcd-1234-abcd-1234-abcd1234abcd', updates)
```### Delete
```javascript
let result = await client.checkouts.delete('1234abcd-1234-abcd-1234-abcd1234abcd')
```## Events
### List
```javascript
let results = await client.events.list()
```### Get
```javascript
let result = await client.events.get('66BEOV2A')
```## Webhooks
### Verify Signature
```javascript
// `body` can be a String, Buffer or Object
let isVerified = client.verifyWebhookSignature(signature, body, sharedSecret)
```