basqet-node
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    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": "customer@example.com"
         },
         "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

    Keywords

    none

    Install

    npm i basqet-node

    DownloadsWeekly Downloads

    5

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    14.2 kB

    Total Files

    18

    Last publish

    Collaborators

    • quidax-engineering