Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including node-sellsy with all npm packages installed. Try it out:

var nodeSellsy = require("node-sellsy")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

node-sellsy v1.5.3

Node Sellsy API wrapper


npm license github-issues Circle CI build status

Node Sellsy API wrapper - works in NodeJS and in the browser.

The official Sellsy API is PHP based so here's a JavaScript handy replacement.

It can helps you automate most of Sellsy from their API.

For example i use a Stripe webhook to automate actions in Sellsy.


  • Works with your oauth private app id
  • Simple promise call for all methods in


npm i --save node-sellsy

var Sellsy = require('node-sellsy');

var sellsy = new Sellsy({
  creds: {
    consumerKey: 'myConsumerKey',
    consumerSecret: 'myConsumerSecret',
    userToken: 'myUserToken',
    userSecret: 'myUserSecret'

var params = {
  search: {
    contains: 'test',

  method: 'Client.getList',
  params: params
}).then(data => {
  console.log('data', data);
}).catch(e => {
  console.log('error:', e);


You can access the full Sellsy API using sellsy.api({ method, params }).

This call returns a promise.

Browser usage

Sellsy API doesnt provide CORS access so here's a drop-in proxy you can deploy on your own to use node-bookeo on the client : revolunet/sellsy-proxy.

Then, define the endPoint when creating your Sellsy instance :

var sellsy = new Sellsy({
  endPoint: 'http://path/to/sellsy/proxy'

Higher-level API methods :


  • sellsy.customers.create(data)
  • sellsy.customers.get({ email: '' })


  • sellsy.documents.create(data)
  • sellsy.documents.createPayment(docType, docId, paymentData)
  • sellsy.documents.getList(docType, search)
  • sellsy.documents.getById(docType, docId)
  • sellsy.documents.updateStep(docType, docId, step)


  • npm run readme : node ./node_modules/node-readme/bin/node-readme.js
  • npm run test : find ./spec -iname '*.spec.js' -exec ./node_modules/.bin/babel-node {} \; | ./node_modules/.bin/tap-spec
  • npm run zuul : ./node_modules/zuul/bin/zuul -- spec/**/*.spec.js
  • npm run build : babel -d ./dist ./src


  Customers.create should call sellsy api

    ✔ should call API twice
    ✔ should call Client.create with correct data
    ✔ should call Client.getList with correct data

  Customers.get should call sellsy api

    ✔ should call API
    ✔ should call get with correct data
    ✔ should return first result

  sellsy.api should be defined

    ✔ should be equal

  sellsy.api should init call oAuth.OAuth with correct parameters

    ✔ consumerKey
    ✔ consumerSecret

  sellsy.api post correct data to API

    ✔ userToken
    ✔ userSecret
    ✔ request
    ✔ io_mode
    ✔ method
    ✔ params

  Sellsy should use default api endPoint


  Sellsy should use given api endPoint


  total:     17
  passing:   17
  duration:  1.8s


Julien Bouquillon and contributors


  • MIT :


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free