Skip to content

momi-foundation-coding/paystack-gateway

Repository files navigation

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: "ezrqnkemboi@gmail.com",
   amount: 20000,
   currency: "ZAR"
}
const initializedTransaction = await paystackInstance.transactions.initialize({ bodyParams: bodyParams })

Contributors

License

MIT

About

Paystack API Gateway wrapper for all API in Paystack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published