Skip to content

CHIPAsia/chip-nodejs-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chip NodeJS library

Prerequisite

Before you start, make sure you already have created Brand ID and API Key from your developer dashboard by logging-in into merchant portal.

Installation

npm

npm install https://github.com/CHIPAsia/chip-nodejs-sdk.git#v1.0.0

yarn

yarn add https://github.com/CHIPAsia/chip-nodejs-sdk.git#v1.0.0

Getting Started

Simple usage looks like:

var PublicRestApi = require('Chip').default;

PublicRestApi.ApiClient.instance.basePath = "https://gate.chip-in.asia/api/v1/";
PublicRestApi.ApiClient.instance.token = "TOKEN"

let apiInstance = new PublicRestApi.PaymentApi();
let brandId = "BRAND_ID";
let callback = (error, data, response) => {
  if (error) {
    console.log('API call failed. Error:');
    console.error(error);
  } else {
    console.log('API called successfully. Returned data:');
    console.log(data);
  }
}

apiInstance.paymentMethods(brandId, "EUR", {}, callback);

Testing

npm run test

Example

Check our examples here.