Skip to content

oyeolamilekan/basqet-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basqet NodeJS SDK

The Official Node.js library for the Basqet API.

Installation

Install node-client with npm

  npm i basqet-node

Usage/Examples

Fetch Available currency

const Basqet = require('basqet-node')

const basqet = new Basqet(secretKey, publicKey)

// Fetch all fiat currency
const currencies = basqet.fetchAllCurrency("FIAT")

Initialize transaction

const Basqet = require('basqet-node')

const basqet = new Basqet(secretKey, publicKey)

const paymentData = {
     "customer": {
          "name": "tunde",
          "email": "[email protected]"
     },
     "amount": "1000",
     "currency": "NGN",
     "meta": {
          "reference": "bghggbbvv"
     }
};

const transactionObj = basqet.initializeTransaction(paymentData);

Initiate transaction

const Basqet = require('basqet-node')

const basqet = new Basqet(secretKey, publicKey)

const transactionObj = basqet.initiateTransaction(<transactionId>, {'currency_id': <currency_id>})

Verify transaction

const Basqet = require('basqet-node')

const basqet = new Basqet(secretKey, publicKey)

const transactionObj = basqet.verifyTransaction(<transactionId>)

Mock webhook events

const Basqet = require('basqet-node')

const basqet = new Basqet(secretKey, publicKey)

const transactionObj = basqet.triggerWebhook(<transactionId>, { status: 'SUCCESSFUL' })

Documentation/API reference

Documentation

About

The Official Node.js library for the Basqet API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published