Before you start, make sure you already have created Brand ID
and API Key
from your developer dashboard by logging-in into merchant portal.
npm install https://github.com/CHIPAsia/chip-nodejs-sdk.git#v1.0.0
yarn add https://github.com/CHIPAsia/chip-nodejs-sdk.git#v1.0.0
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);
npm run test
Check our examples here.