Kuda Node.js Library
NodeJS wrapper for making secure request to Kuda API
Getting started
- paste your private and public key (both in XML format) in your project directory
- Your client key is the name of your private key file
Using the library
run npm install kuda-node
Library setup
const fs = ;const Kuda = ; const publicKey = fs; // or path to your kuda public keyconst privateKey = fs; // or path to your kuda kuda private keyconst clientKey = "name-of-private-key-file"; // name of private key file without the .xml suffix (extension) const kuda = ; // this initialize the Kuda function
Making a request
;
Sample request
// account creationconst shortid = ; // this libarary will generate random id for you. You can install with `yarn add shortid` or `npm i shortid`. You can use any other random key generatring library of your choice ; // it can also be called with in an async await fashion like soconst onboardUser = asyncemail phoneNumber firstName lastName trackingReference const response = await
Refer to documentation for respective data types for each fields in the payload
Contribution & Issues
- Simply fork the repo, make changes and make a pull request
- You can open an issue for support or suggestions