paystack-pay
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Paystack

npm npm NPM

About

This provides easy access to paystack APIS. All are properly & fully tested. Available features include:

  • Account: get balance, statement, transfers and transactions.
  • Payment: create dynamic account.
  • Tool: banks, resolve Bank account number, check transaction dtatus, check transfer Status.
  • Transfer: initiate transfer to bank account.
  • USSD: get ussd banks, generate ussd code for payment/collection.

Getting Started

Technologies · Installations · Usage · Components · Tests · Author

Technologies Used

  • ESLint - A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.
  • Jest - Jest is a JavaScript testing framework maintained by Facebook, Inc. designed and built by Christoph Nakazawa with a focus on simplicity and support for large web applications.
  • Airbnb style guide was followed.
  • TypeScript

Installations

Getting started

  • You need to have your paystack secret key and NPM installed on your computer.

Setup

  • Installing the project dependencies

    Run the command below

    $ npm install paystack-pay

Usage

$ const { Paystack } = require('paystack-pay');
$ const  paystack = new Paystack('your-secret-key');

Components

  • Transaction
    • Initiate transaction
     paystack.transaction.initialize({
      channels: ['card'], // not required  ["card", "bank", "ussd", "qr", "mobile_money", "bank_transfer", "eft"]
      amount: 900, // required
      email: 'elon@musk.com', // required
      callback_url: 'your-callback-url', // required
      metadata: { userId: 1 }, // not required
      reference: 'your-unique-reference', // required
    }) 
    • VERIFY TRANSACTION
     paystack.transaction.verify('your-unique-reference',) 
    • CHARGE TRANSACTION AUTHORIZATION
     paystack.transaction.chargeAuthorization({
     authorization_code: 'AUTH_CODE'; //required
     email: 'youruser@musk.com',  //required
     amount; // required // this is kobo
     metadata:{userId:303030},// required
     reference:'your-unique-reference' //not required
    })  

Author

Package Sidebar

Install

npm i paystack-pay

Weekly Downloads

39

Version

0.1.2

License

MIT

Unpacked Size

13.3 kB

Total Files

14

Last publish

Collaborators

  • oluwabukolatina