Poynt Node.js SDK
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
.jshintrc
CHANGELOG.md
LICENSE
README.md
package.json

README.md

Poynt Node.js SDK

This SDK helps you connect to the Poynt API from your Node.js apps. You can easily get/create business information, subscribe to webhooks, and send cloud messages to your terminal app.

Documentation

After you've signed up for a Poynt developer account, check out our API reference or our developer guides!

Installation

Install this package:

npm install poynt --save

Usage

You can connect to the Poynt API by passing either a filename or a string containing your PEM-encoded private key you downloaded from Poynt.net. If region param is not set, the SDK uses services.poynt.net endpoint. If you need to hit services-eu.poynt.net, you need to pass region: 'eu'.

var poynt = require('poynt')({
  // region: 'eu',
  applicationId: 'urn:aid:your-application-id',
  filename: __dirname + '/key.pem'
});

or

var poynt = require('poynt')({
  applicationId: 'urn:aid:your-application-id',
  key: '-----BEGIN RSA PRIVATE KEY-----\n.....\n-----END RSA PRIVATE KEY-----'
});

Then, make a request signed with your app private key:

poynt.getBusiness({
  businessId: '00000000-0000-0000-0000-000000000000'
}, function (err, business) {
  if (err) {
    // deal with your error
  } else {
    // do something with business
  }
});

We'll handle all the request signing, token refresh, etc. for you!

Namespaces and methods

CloudMessages

  • sendCloudMessage
  • sendRawCloudMessage

Hooks

  • getHooks
  • createHook
  • getHook
  • deleteHook

Businesses

  • getBusiness
  • getBusinessByDeviceId

Stores

  • getStore

Orders

  • getOrders
  • getOrder

Transactions

  • getTransactions
  • getTransaction

Customers

  • getCustomers
  • getCustomer

Catalogs

  • getCatalogs
  • getCatalog
  • getFullCatalog
  • createCatalog
  • createFullCatalog
  • updateCatalog
  • deleteCatalog
  • getCategory
  • createCategory
  • lookupCategories
  • deleteCategory
  • updateCategory

Products

  • getProducts
  • getProductsSummary
  • lookupProducts
  • getProduct
  • createProduct
  • deleteProduct
  • updateProduct

Taxes

  • getTaxes
  • getTax
  • createTax
  • deleteTax
  • updateTax

Business Users

  • getBusinessUsers
  • getBusinessUser