Giter Site home page Giter Site logo

tekpriest / paystack-node Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 10.0 300 KB

Paystack SDK written in Typescript

Home Page: https://www.npmjs.com/package/paystack-sdk

License: MIT License

TypeScript 99.54% JavaScript 0.46%
sdk typescript paystack tooling tools

paystack-node's Introduction

Paystack SDK

Why Another Paystack Package?

Other packages are either outdated or don't support types.

Installation

For Yarn yarn add paystack-sdk

For NPM npm install paystack-sdk

Usage

For Typescript

import {Paystack} from 'paystack-sdk';

const paystack = new Paystack("secret_key");

For Javscript

const Paystack = require('paystack-sdk').Paystack;
const paystack = new Paystack('secret_key');

OR

const { Paystack } = require('paystack-sdk');
const paystack = new Paystack('secret_key');

All methods use promise meaning you can either use the async...await or then...catch or try...catch

Modules

  • Charge
  • Customers
  • Plans
  • Products
  • Subscriptions
  • Transactions
  • Transfers
  • Dedicated Virtual Accounts
  • Apple Pay
  • Subaccounts
  • Transaction Splits
  • Settlements
  • Invoices
  • Transaction Recipients
  • Transfers Control
  • Bulk Charges
  • Control Panel
  • Disputes
  • Refunds
  • Verification
  • Miscellaneous

CONTRIBUTING

If you notice a missing function, or maybe a bug. Please feel free to submit a PR. I will take a look at it. You will need to fork the repo and create a PR against it with your changes.
Thank you ๐Ÿ˜„

paystack-node's People

Contributors

devfresher avatar gbenga238 avatar geekygeeky avatar jace-tech avatar owoade avatar paakways avatar tekpriest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

paystack-node's Issues

Issue with fetching plans

I tried fetching plans but got an error as seen below:

SyntaxError: Unexpected end of JSON input
web:dev:     at JSON.parse (<anonymous>)
web:dev:     at Plan.<anonymous> (/home/waptik/Projects/monorepo/turbo/node_modules/paystack-sdk/dist/plan/plan.js:46:25)
web:dev:     at Generator.next (<anonymous>)
web:dev:     at fulfilled (/home/waptik/Projects/monorepo/turbo/node_modules/paystack-sdk/dist/plan/plan.js:5:58)
web:dev:     at processTicksAndRejections (node:internal/process/task_queues:96:5)

The code

const plans = await paystack.plan.list();
    console.log({ plans });

Creating dedicated Nuban is throwing an error

I noticed an error when I tried to create a dedicated nuban, I fixed it but I am unable to make a PR. kindly help check it out or allow PRs to be made.
Thanks

The error below
Error: Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream

Fix error cannot find name 'Response'

A look at some interface files [transfer, customer, settlement] shows they are extending the base interface Response.

However, Response isn't imported in those files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.