culqi2-node
Version:
Culqi API v2 Node.js Wrapper
74 lines (51 loc) • 1.88 kB
Markdown
## Culqi2-node
[](https://badge.fury.io/js/culqi2-node)
[](https://travis-ci.org/martoriro/culqi2-node)
[](https://coveralls.io/github/martoriro/culqi2-node?branch=master)
[](https://opensource.org/licenses/MIT)
[]()
<a href="https://www.culqi.com/">Culqi</a> API v2 wrapper for Node.js based in <a href="https://www.npmjs.com/package/culqi-node">Culqi API v1.2 wrapper</a> by <a href="https://github.com/giwiro">giwiro</a>
### Installing
```sh
$ npm install culqi2-node
```
### Usage
```javascript
const Culqi = require('culqi2-node');
const culqi = new Culqi(privateKey, publicKey);
culqi.getCards();
```
`privateKey: Private key given by Culqi`
`publicKey: Public key given by Culqi`
### Currently available methods
**Customers**
* createCustomer()
* getCustomer()
* getCustomers()
* updateCustomer()
* deleteCustomer()
**Tokens**
* createToken()*
**Cards**
* createCard()
* getCard()
* getCards()
* updateCard()
* deleteCard()
**Charges**
* createCharge()
* getCharge()
* getCharges()
* updateCharge()
* captureCharge()
**Events**
* getEvent()
* getEvents()
For more info about method attributes visit <a href="https://www.culqi.com/api/">Culqi API Docs</a>. You could also see the tests on `test` folder.
*Token creation via API is not recommended and requires previous approval by Culqi, as noted <a href="https://www.culqi.com/api/#/tokens">here</a>.
### Tests
```sh
npm test
```
### Contributing
Fork this and do whatever you want.