Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/momi-foundation-coding/paystack-gateway

Paystack API Gateway wrapper for all API in Paystack
https://github.com/momi-foundation-coding/paystack-gateway

Last synced: 2 months ago
JSON representation

Paystack API Gateway wrapper for all API in Paystack

Awesome Lists containing this project

README

        

![npm](https://img.shields.io/npm/dt/paystack-gateway?style=for-the-badge)
# 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`

```js
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](https://github.com/momi-foundation-coding/paystack-gateway/blob/main/LICENSE)