1.0.0 • Published 4 years ago

clover-ecomm-sdk v1.0.0

Weekly downloads
6
License
MIT
Repository
-
Last release
4 years ago

Clover Node.js Library

The Clover Node library provides convenient access to the Clover API from applications written in server-side JavaScript.

Please keep in mind that this package is for use with server-side Node that uses Clover secret keys. To maintain PCI compliance, tokenization of credit card information should always be done with Clover.js on the client side. This package should not be used for that purpose.

Documentation

See the Node API docs.

Installation

Install the package with:

npm install clover-ecomm-sdk --save

or

$ yarn install

Usage

The package needs to be configured with your account's secret key which is available in your Clover Dashboard. Require it with the key's value:

const clover = require('clover')('ck_test_...');

const customer = await clover.customers.create({
  email: 'customer@example.com',
});

On older versions of Node, you can use promises or callbacks instead of async/await.