npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

glade-api-nodejs

v1.0.1

Published

Core NodeJs library for making calls to the Gladefinance API

Downloads

3

Readme

About

To Learn more, visit https://developer.gladefinance.co/docs

Getting Started

You need a Merchant ID and Key to authenticate against the API, please contact [email protected] to setup a demo account.

Installation

Simply run the

npm install glade-api-nodejs 

in your project.

Usage

import { Glade } from "glade-api-nodejs";

const merchantId = ""
const merchantKey = ""

const api = new Glade(merchantId: string, merchantKey: string, isProd: boolean) //isProd = false by default

const apiCalls = async function apiCall() {
    let resp = await api.bankList()
    return resp;
}

apiCalls().then(result => console.log(result));

Set environment

For Production environment

const api = new Glade($merchantId, $merchantKey, true); 

For Sandbox environment

const api = new Glade($merchantId, $merchantKey, false); 

Methods

BVN Verification

const apiCalls = async function apiCall(){
    let result = await api.bvnValidation()
    return result;
} 
apiCalls().then(result => console.log(result));

Get Chargeable Banks

const apiCalls = async function apiCall(){
    let result = await api.supportedChargeableBanks()
    return result;
} 
apiCalls().then(result => console.log(result));

Sample Response Data: 
{
    "code": "200",
    "status":"success",
    "data":
            {
                "bankname":"3LINE CARD MANAGEMENT LIMITED",
                "bankcode":"110005"
            }
}

Get Bank List

const apiCalls = async function apiCall(){
    let result = await api.bankList()
    return result;
} 
apiCalls().then(result => console.log(result));

Sample Response Data:
{
    code: 200,
    status: "success",
    data: {
        "110005":"3LINE CARD MANAGEMENT LIMITED",
        "120001":"9 PAYMENT SOLUTIONS BANK",
        "090270":"AB MICROFINANCE BANK",
        "070010":"ABBEY MORTGAGE BANK",
        "090260":"ABOVE ONLY MICROFINANCE BANK",
        "090197":"ABU MICROFINANCE BANK",
        "90202":"ACCELEREX NETWORK LIMITED",
        "090202":"ACCELEREX NETWORK LIMITED",
        "044":"Access Bank"
    }
}

Verify Account Name

const apiCalls = async function apiCall(){
    let result = await api.verifyAccountName(string accountNumber, string bankCode, string bankName);
    return result;
} 
apiCalls().then(result => console.log(result));

Get Personalized Account Info

const apiCalls = async function apiCall(){
    let result = await api.personalizedAccount(string accountName, string accountEmail, string accountBvn, string reference, string channel = "providus");
    return result;
} 
apiCalls().then(result => console.log(result));

Create Customer

const apiCalls = async function apiCall(){
    let result = await api.createCustomer(string name, string email, string phoneNumber,  string address); 
    return result;
} 
apiCalls().then(result => console.log(result));

Get All Customers

const apiCalls = async function apiCall(){
    let result = await api.getCustomers();
    return result;
} 
apiCalls().then(result => console.log(result));

Get A Single Customer's Details

const apiCalls = async function apiCall(){
    let result = await api.getCustomerDetail(number customerId); 
    return result;
} 
apiCalls().then(result => console.log(result));

Get All Bill Categories

const apiCalls = async function apiCall(){
    let result = await api.getBillCategory(string category = null);
    return result;
} 
apiCalls().then(result => console.log(result));

Get Bill ID

const apiCalls = async function apiCall(){
    let result = await api.getBillById(number billId);
    return result;
} 
apiCalls().then(result => console.log(result));

Resolve Bill

const apiCalls = async function apiCall(){
    let result = await api.resolveBill(string payCode, string reference); 
    return result;
} 
apiCalls().then(result => console.log(result));

Purchase Bill

const apiCalls = async function apiCall(){
    let result = await api.purchaseBill(string payCode, number amount, string reference, string orderReference = null);  
    return result;
} 
apiCalls().then(result => console.log(result));

Verify Bill Purchase

const apiCalls = async function apiCall(){
    let result = await api.verifyBillPurchase(string transactionReference); 
    return result;
} 
apiCalls().then(result => console.log(result));

Make A Single Transfer

const apiCalls = async function apiCall(){
    let result = await api.transfer(number amount, string receiverAccountNumber, string receiverBankCode, string senderName, string reference, string narration);
    return result;
} 
apiCalls().then(result => console.log(result));

Verify Single Transfer

const apiCalls = async function apiCall(){
    let result = await api.verifySingleTransfer(string reference); 
    return result;
} 
apiCalls().then(result => console.log(result));

Make Bulk Transfer

const apiCalls = async function apiCall(){
    let result = await api.bulkTransfer(array transferObjects); 
    return result;
} 
apiCalls().then(result => console.log(result));

Create Payment Link

const apiCalls = async function apiCall(){
    let result = await api.createPaymentLink(string title, string description, number amount, string type, bool payerBearsFees, bool acceptNumber, string notificationEmail, string customLink = null, string redirectUrl = null, string customMessage = null, string frequency = null); 
    return result;
} 
apiCalls().then(result => console.log(result));

Create Ticket

const apiCalls = async function apiCall(){
    let result = await api.createTicket(string title, string description, number amount, string type, bool payerBearsFees, bool acceptNumber, string notificationEmail, array ticketData, string customLink = null, string redirectUrl = null, string customMessage = null, string frequency = null); 
    return result;
} 
apiCalls().then(result => console.log(result));
 

Create Invoice

const apiCalls = async function apiCall(){
    let result = await api.invoice(number customerId, bool chargeUser, number shipping, number vat, string dueDate,  bool allowedDiscount, array invoiceItems, string note, string discountType= null, string invoiceId); 
    return result;
} 
apiCalls().then(result => console.log(result));

Return Values

All methods return a JSON object.