Catalog npm
Back to packageRELEASE DETAILS

1.0.1

npm

@0x0pharaoh/next-paystack

This is an nextJS library for implementing paystack payment gateway

gatewaygithubjavascriptnextjsopen sourcepaymentspaystack
Published9 Apr 2026
Direct dependencies26
Transitive dependenciesNot calculated

README

Current package documentation

Next Paystack (React + Next.js)

Minimal Paystack Inline payments for React apps, compatible with modern Next.js and TypeScript/JavaScript projects.

Requirements

  • next@^16
  • react@^18 || ^19
  • react-dom@^18 || ^19

Paystack opens a checkout UI in the browser, so this package must be used from a Client Component in Next.js.

Install

npm i @0x0pharaoh/next-paystack

Minimal example (Next.js App Router)

'use client';

import {PaystackButton} from '@0x0pharaoh/next-paystack';

export default function Page() {
  return (
    <PaystackButton
      publicKey="pk_test_xxx"
      email="user@example.com"
      amount={20000}
      text="Pay now"
      onSuccess={(tx) => console.log(tx?.reference)}
      onClose={() => console.log('closed')}
    />
  );
}

Required props (per Paystack Inline)

  • publicKey (maps to InlineJS key)
  • email
  • amount (lowest currency unit, e.g. kobo)

Hook (minimal)

'use client';

import {usePaystackPayment} from '@0x0pharaoh/next-paystack';

export default function Donate() {
  const initializePayment = usePaystackPayment({
    publicKey: 'pk_test_xxx',
    email: 'user@example.com',
    amount: 20000,
  });

  return <button onClick={() => initializePayment({})}>Pay</button>;
}

Types

import type {PaystackProps, PaystackTransaction} from '@0x0pharaoh/next-paystack';

Paystack docs

Attribution / lineage

License

MIT (see LICENSE).

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 28

Native requirements
26 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@paystack/inline-js
Environment
{
  "local_name": "@paystack/inline-js",
  "alias": false,
  "peer_metadata": null
}
^2.19.2runtime
@eslint/js
Environment
{
  "local_name": "@eslint/js",
  "alias": false,
  "peer_metadata": null
}
^9.8.0development
@rollup/plugin-commonjs
Environment
{
  "local_name": "@rollup/plugin-commonjs",
  "alias": false,
  "peer_metadata": null
}
^26.0.1development
@rollup/plugin-node-resolve
Environment
{
  "local_name": "@rollup/plugin-node-resolve",
  "alias": false,
  "peer_metadata": null
}
^15.0.1development
@rollup/plugin-typescript
Environment
{
  "local_name": "@rollup/plugin-typescript",
  "alias": false,
  "peer_metadata": null
}
^11.1.6development
@testing-library/react
Environment
{
  "local_name": "@testing-library/react",
  "alias": false,
  "peer_metadata": null
}
^16.0.0development
@types/jest
Environment
{
  "local_name": "@types/jest",
  "alias": false,
  "peer_metadata": null
}
^29.5.12development
@types/react
Environment
{
  "local_name": "@types/react",
  "alias": false,
  "peer_metadata": null
}
^19.0.0development
@types/react-dom
Environment
{
  "local_name": "@types/react-dom",
  "alias": false,
  "peer_metadata": null
}
^19.0.0development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
^9.8.0development
eslint-config-prettier
Environment
{
  "local_name": "eslint-config-prettier",
  "alias": false,
  "peer_metadata": null
}
^9.1.0development
eslint-plugin-jest
Environment
{
  "local_name": "eslint-plugin-jest",
  "alias": false,
  "peer_metadata": null
}
^28.7.0development
eslint-plugin-prettier
Environment
{
  "local_name": "eslint-plugin-prettier",
  "alias": false,
  "peer_metadata": null
}
^5.2.1development
eslint-plugin-react
Environment
{
  "local_name": "eslint-plugin-react",
  "alias": false,
  "peer_metadata": null
}
^7.35.0development
globals
Environment
{
  "local_name": "globals",
  "alias": false,
  "peer_metadata": null
}
^15.9.0development
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^29.5.0development
jest-environment-jsdom
Environment
{
  "local_name": "jest-environment-jsdom",
  "alias": false,
  "peer_metadata": null
}
^29.5.0development
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^3.3.3development
react
Environment
{
  "local_name": "react",
  "alias": false,
  "peer_metadata": null
}
^19.2.0development
react-dom
Environment
{
  "local_name": "react-dom",
  "alias": false,
  "peer_metadata": null
}
^19.2.0development
rollup
Environment
{
  "local_name": "rollup",
  "alias": false,
  "peer_metadata": null
}
^4.20.0development
rollup-plugin-peer-deps-external
Environment
{
  "local_name": "rollup-plugin-peer-deps-external",
  "alias": false,
  "peer_metadata": null
}
^2.2.4development
ts-jest
Environment
{
  "local_name": "ts-jest",
  "alias": false,
  "peer_metadata": null
}
^29.2.4development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.5.4development
typescript-eslint
Environment
{
  "local_name": "typescript-eslint",
  "alias": false,
  "peer_metadata": null
}
^8.0.0development
next
Environment
{
  "local_name": "next",
  "alias": false,
  "peer_metadata": null
}
^16.0.0peer
react
Environment
{
  "local_name": "react",
  "alias": false,
  "peer_metadata": null
}
^18.0.0 || ^19.0.0peer
react-dom
Environment
{
  "local_name": "react-dom",
  "alias": false,
  "peer_metadata": null
}
^18.0.0 || ^19.0.0peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-XtTx6CSAErLzkWSbN4h1W5UvUe3kpmu60wSXFuzOVeFXRdhayOo5i2S6osE1290U9EXt19sb1byfZTlvIVgzSQ==",
  "shasum": "47150dfd3f590c95fee0ed03d70f56d122dab31d",
  "tarball": "https://registry.npmjs.org/@0x0pharaoh/next-paystack/-/next-paystack-1.0.1.tgz",
  "fileCount": 19,
  "unpackedSize": 79780,
  "signatures": [
    {
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
      "sig": "MEUCIQDPoxcWWrsnW+smtRH6IviJiwZ81PjuCUv4qg05GkGf9AIgC62jMqd0i99JikmJYuTloMzvfqp+ReLarh0d/pjUYd4="
    }
  ]
}

Repository

PENDING
0x0pharaoh/next-paystack

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:33 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:7330eb6e65048049f0cf5851c3d7ad7b63705efb7186335bdfe80ecb4ed3cf17

Other collected versions

1.0.09 AprView all collected versions →