https://github.com/sailscastshq/machinepack-paystack
Communicate with the Paystack API to initialize transactions, create plans, etc.
https://github.com/sailscastshq/machinepack-paystack
credit-card machinepack machines payment-integration payment-processing paystack paystack-api paystack-library
Last synced: 9 days ago
JSON representation
Communicate with the Paystack API to initialize transactions, create plans, etc.
- Host: GitHub
- URL: https://github.com/sailscastshq/machinepack-paystack
- Owner: sailscastshq
- License: mit
- Created: 2021-01-27T23:54:46.000Z (almost 5 years ago)
- Default Branch: develop
- Last Pushed: 2022-01-18T15:23:51.000Z (about 4 years ago)
- Last Synced: 2025-10-24T14:51:48.953Z (3 months ago)
- Topics: credit-card, machinepack, machines, payment-integration, payment-processing, paystack, paystack-api, paystack-library
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/machinepack-paystack
- Size: 502 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](#contributors-)
machinepack-paystack
This machinepack contains 113 machines. What this means is that with this machine you can communicate with `113` Paystack endpoints
Communicate with the Paystack API to initialize transaction, create plans, etc.
## Installation
```sh
$ npm install machinepack-paystack --save
```
## Usage
```js
// Initialize a transaction on your Paystack integration
const Paystack = require('machinepack-paystack')
Paystack.initializeTransaction({
apiKey: process.env.PAYSTACK_API_KEY,
email: 'customer@email.com',
amount: '20000'
}).exec(function (error, intializedTransaction) {
console.log(initializedTransaction)
})
```
`machinepack-paystack` expects your Paystack secret for convenience to be in your environment as `PAYSTACK_API_KEY` so the above can be written as:
```js
// Initialize a transaction on your Paystack integration
const Paystack = require('machinepack-paystack')
Paystack.initializeTransaction({
email: 'customer@email.com',
amount: '20000'
}).exec(function (error, intializedTransaction) {
console.log(initializedTransaction)
})
```
## Test
To run the test in this machine, rename `env.example` to `.env` then replace the content with your Paystack test API Key
Now run test simpley with:
```sh
npm test
```
Alternatively you can run tests by
```sh
PAYSTACK_API_KEY_FOR_TESTS=YOUR_PAYSTACK_TEST_API_KEY npm test
```
## Machines
* add-evidence
* add-products
* add-split-subaccount
* archive-invoice
* bulk-create-transfer-recipient
* charge
* charge-authorization
* check-authorization
* check-balance
* check-pending-charge
* check-slug-availability
* create-customer
* create-dedicated-accounts
* create-invoice
* create-page
* create-plan
* create-product
* create-refund
* create-split
* create-subaccount
* create-subscription
* create-transfer-recipient
* deactivate-authorization
* deactivate-dedicated-account
* delete-transfer-recipient
* disable-subscription
* disable-transfers-otp
* enable-subscription
* enable-transfers-otp
* export-disputes
* export-transactions
* fetch-balance-ledger
* fetch-bulk-charge-batch
* fetch-charges-in-a-batch
* fetch-customer
* fetch-dedicated-account
* fetch-dispute
* fetch-page
* fetch-payment-session-timeout
* fetch-plan
* fetch-product
* fetch-refund
* fetch-settlement-transactions
* fetch-settlements
* fetch-split
* fetch-subaccount
* fetch-subscription
* fetch-transaction
* fetch-transfer-recipient
* finalize-disable-otp
* finalize-invoice
* finalize-transfer
* get-upload-url
* initialize-transaction
* initiate-bulk-charge
* initiate-bulk-transfer
* initiate-transfer
* invoice-total
* list-banks
* list-bulk-charge-batches
* list-countries
* list-customers
* list-dedicated-accounts
* list-disputes
* list-invoices
* list-pages
* list-plans
* list-products
* list-providers
* list-refunds
* list-splits
* list-states
* list-subaccounts
* list-subscriptions
* list-transaction-disputes
* list-transactions
* list-transfer-recipients
* list-transfers
* partial-debit
* pause-bulk-charge-batch
* remove-subaccount-from-split
* resend-transfers-otp
* resolve-a-dispute
* resolve-account-number
* resolve-bvn-premium
* resolve-bvn-standard
* resolve-card-bin
* resume-bulk-charge-batch
* send-notification
* submit-address
* submit-birthday
* submit-otp
* submit-phone
* submit-pin
* transaction-totals
* update-customer
* update-dispute
* update-invoice
* update-page
* update-payment-session-timeout
* update-plan
* update-product
* update-split
* update-subaccount
* update-transfer-recipient
* validate-customer
* verify-bvn-match
* verify-invoice
* verify-transaction
* verify-transfer
* view-invoice
* view-transaction-timeline
* whitelist-or-blacklist-customer
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Omereshone Kelvin
🚇 ⚠️ 💻

haastrup elijah
💻 ⚠️
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!