New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

paystack-edge-sdk

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paystack-edge-sdk

Paystack SDK written in Typescript for development on edge and serverless servers

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
0
Created
Source

Paystack SDK (Edge)

Why Another Paystack Package?

Other packages are either outdated or don't support TypeScript or only works with Node.js. This package is built with TypeScript and works with any JavaScript environment.

Installation

For Yarn:

yarn add paystack-edge-sdk

For NPM:

npm install paystack-edge-sdk

Usage

For TypeScript:

import { Paystack } from 'paystack-edge-sdk';

const paystack = new Paystack("secret_key");

For JavaScript:

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

OR

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

All methods use promises, meaning you can either use async...await, then...catch, or try...catch.

Example

import { Paystack } from 'paystack-edge-sdk';

const paystack = new Paystack("secret_key");

const { data: transaction, error } = await paystack.transaction.initialize({
  amount: 10000,
  email: "email@example.com",
});

if (error) {
  console.error(error);
} else {
  console.log(transaction);
}

Modules

  • Apple Pay
  • Bulk Charges
  • Charge
  • Customer
  • Dedicated Virtual Accounts
  • Invoice
  • Payment Page
  • Plan
  • Product
  • Recipient
  • Refund
  • Settlement
  • SubAccount
  • Subscription
  • Transaction
  • Transaction Split
  • Transfer
  • Verification
  • Control Panel
  • Disputes
  • Miscellaneous

Contributing

If you notice a missing function or a bug, please feel free to submit a PR. You will need to fork the repo and create a PR against it with your changes.
Thank you! :smile:

Keywords

Paystack

FAQs

Package last updated on 11 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts