Skip to content

sailscastshq/machinepack-paystack

Repository files navigation

All Contributors

node-machine logo 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

$ npm install machinepack-paystack --save

Usage

// 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:

// 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:

npm test

Alternatively you can run tests by

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):


Omereshone Kelvin

🚇 ⚠️ 💻

haastrup elijah

💻 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!