Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

paystack-node

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paystack-node

A NodeJS wrapper for the Paystack API

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
259
increased by41.53%
Maintainers
1
Weekly downloads
 
Created
Source

Paystack

NPM Version Build Status

A NodeJS Wrapper for Paystack

Overview

This project provides an easy-to-use object-oriented API to access endpoints delineated at https://developers.paystack.co/reference

Getting Started

Install from the NPM Registry


    $ npm i --save paystack-node

Usage


let PayStack = require('paystack-node')

let APIKEY = 'sk_test_2hWyQ6HW73jS8p1IkXmSWOlE4y9Inhgyd6g5f2R7'
const environment = process.env.NODE_ENV

const paystack = new PayStack(APIKEY, environment)

/* 
  NOTE: All fields/params that require dates should be set to
  instances of the `Date()` constructor as they will
  eventually be turned into the ISO 8601 format (String)
  using `toJSON()` method for date instances/objects
*/

const promise = paystack.getSettlements({
  from:new Date("2017-02-09"), 
  to:new Date()
})

promise.then(function(response){
  var data = response.body
  
})

API Resources

  • customers
    • paystack.createCustomer()
    • paystack.getCustomer()
    • paystack.listCustomer()
    • paystack.updateCustomer()
    • paystack.deactivateAuthOnCustomer()
    • paystack.setRiskActionOnCustomer()
  • invoices
    • paystack.createInvoice()
    • paystack.getMetricsForInvoices()
    • paystack.sendInvoiceNotification()
    • paystack.listInvoice()
    • paystack.updateInvoice()
    • paystack.verifyInvoice()
    • paystack.finalizeInvoiceDraft()
    • paystack.archiveInvoice()
    • paystack.markInvoiceAsPaid()
  • settlements
    • paystack.getSettlements()
  • pages
    • paystack.createPage()
    • paystack.listPages()
    • paystack.getPage()
    • paystack.updatePage()
    • paystack.checkSlugAvailability()
  • transactions
    • paystack.initializeTransaction()
    • paystack.chargeAuthorization()
    • paystack.getTransaction()
    • paystack.listTransaction()
    • paystack.viewTransactionTimeline()
    • paystack.transactionTotals()
    • paystack.exportTransaction()
    • paystack.requestReauthorization()
    • paystack.checkAuthorization()
    • paystack.verifyTransaction()
  • plans
    • paystack.createPlan()
    • paystack.getPlan()
    • paystack.listPlan()
    • paystack.updatePlan()
  • refunds
    • paystack.createRefund()
    • paystack.getRefund()
    • paystack.listRefund()
  • subscriptions
    • paystack.createSubscription()
    • paystack.disableSubscription()
    • paystack.enableSubscription()
    • paystack.getSubscription()
    • paystack.listSubscription()
  • subaccounts
    • paystack.createSubaccount()
    • paystack.getSubaccount()
    • paystack.listSubaccount()
    • paystack.updateSubaccount()
  • miscellanous
    • paystack.listBanks()

License

MIT

Credits

Contributing

See the CONTRIBUTING.md file for info

Keywords

FAQs

Package last updated on 11 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc