Coder Social home page Coder Social logo

eko-sdk-node's Introduction

eko-sdk-node

Node.js SDK for Eko APIs

npm version contributions welcome

https://nodei.co/npm/@ekoindia/eko-sdk-node.png?downloads=true&downloadRank=true&stars=true

Warning: This is not yet ready to use in production

Have any questions/suggestions? Share in the Discord community

Getting started

Install the package

npm install @ekoindia/eko-sdk-node

Initialize the SDK

const Eko = require('@ekoindia/eko-sdk-node')
const ekoAPI = Eko.init({
    hostname: "eko.in",
    port: 443,
    developerKey: "becbbce45f79c6f5109f848acd540567",
    authKey: "f74c50a1-f705-4634-9cda-30a477df91b7",
    initiatorId: "9971771929"
})

Usage for KYC related APIs

//How to verify PAN
ekoAPI.verifyPAN({
    panNumber: 'pan number',
    purpose: 'purpose of verification',
    purposeDescription: 'description of the purpose'
}, function(err, result){
    console.log(JSON.stringify(result));
})
//How to verify Bank account
ekoApi.verifyBankAccount({ 
    accountNo: '12313897932', 
    ifsc: 'SBIN02349D', 
    customerId: 4315453, 
    userCode: 12345 
}, (err, result) => { 
    console.log(JSON.stringify(result));
})

Usage for Bill Payments related APIs

Get list of billing operators

ekoApi.billPayments.getOperators({}, function(err, operatorList){ 
    console.log(JSON.stringify(operatorList))
}

Get list of billing operator categories

ekoApi.billPayments.getOperatorCategories({}, function(err, operatorCategoryList){ 
    console.log(JSON.stringify(operatorCategoryList))
}

Get list of billing operator locations

ekoApi.billPayments.getOperatorLocations({}, function(err, locations){ 
    console.log(JSON.stringify(locations))
}

Get required parameters for a billing operator

ekoApi.billPayments.getOperatorParameters({ operator: 1 }, function(err, parameterList){ 
    console.log(JSON.stringify(parameterList))
}

Get bill

ekoApi.billPayments.getBill({
    initiatorId: 9962981729,
    "operator_id":"51",
    "user_code":"20810200",
    "client_ref_id":"202105311125123456",
    "utility_acc_no":"151627591",
    "confirmation_mobile_no":"9999999999",
    "sender_name":"Kaushik",
    "source_ip":"121.121.1.1",
    "latlong":"77.06794760,77.06794760",
    "hc_channel" : 1 
}, function(err, billInfo){ 
    console.log(JSON.stringify(billInfo))
}

Pay bill

ekoApi.billPayments.payBill({
    initiatorId: 9962981729,
    "source_ip":"121.121.1.1",
    "user_code":"20810200",
    "amount":"50" ,
    "client_ref_id":"202105311125123456",
    "utility_acc_no":"151627591",
    "confirmation_mobile_no":"9999999999",
    "sender_name":"Kaushik",
    "operator_id":"1",
    "latlong":"77.06794760,77.06794760",
    "hc_channel" : 1 
}, function(err, paymentInfo){ 
    console.log(JSON.stringify(paymentInfo))
}

Resources

eko-sdk-node's People

Contributors

gitcommitshow avatar

Stargazers

Raj Satra avatar Soham avatar  avatar  avatar  avatar

Watchers

Kumar Abhishek avatar

eko-sdk-node's Issues

Object.assign shallow copy of options leads to bug

Currently network.send(..) does not deep merge the nested values of options (specifically for headers). This can lead to unexpected results in billPayments.payBill. To fix it, deep merge the options.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.