Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 1.15 KB

README.md

File metadata and controls

49 lines (32 loc) · 1.15 KB

npm

Paystack Gateway

This is a wrapper that is used to make it easy to interface with Paystack API.

How To Use

npm

npm i paystack-gateway

yarn

yarn add paystack-gateway

Sample Code

Apart from the example below, other examples can be found inside real-sample

import Paystack from "paystack-gateway-test"

const paystackInstance = new Paystack(process.env.SECRET_KEY) // secret key should be passed

// Get transactions
const queryParams = {
   perPage: 20
}

const transactions = await paystackInstance.transactions.list({ queryParams })

// Initialize transactions
const bodyParams = {
   email: "[email protected]",
   amount: 20000,
   currency: "ZAR"
}
const initializedTransaction = await paystackInstance.transactions.initialize({ bodyParams: bodyParams })

Contributors

License

MIT