Catalog npm
Back to packageRELEASE DETAILS

1.0.0

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
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^29.5.0development
react
Environment
{
  "local_name": "react",
  "alias": false,
  "peer_metadata": null
}
^19.2.0development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
^9.8.0development
rollup
Environment
{
  "local_name": "rollup",
  "alias": false,
  "peer_metadata": null
}
^4.20.0development
globals
Environment
{
  "local_name": "globals",
  "alias": false,
  "peer_metadata": null
}
^15.9.0development
ts-jest
Environment
{
  "local_name": "ts-jest",
  "alias": false,
  "peer_metadata": null
}
^29.2.4development
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^3.3.3development
react-dom
Environment
{
  "local_name": "react-dom",
  "alias": false,
  "peer_metadata": null
}
^19.2.0development
@eslint/js
Environment
{
  "local_name": "@eslint/js",
  "alias": false,
  "peer_metadata": null
}
^9.8.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.5.4development
@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
typescript-eslint
Environment
{
  "local_name": "typescript-eslint",
  "alias": false,
  "peer_metadata": null
}
^8.0.0development
eslint-plugin-jest
Environment
{
  "local_name": "eslint-plugin-jest",
  "alias": false,
  "peer_metadata": null
}
^28.7.0development
eslint-plugin-react
Environment
{
  "local_name": "eslint-plugin-react",
  "alias": false,
  "peer_metadata": null
}
^7.35.0development
@testing-library/react
Environment
{
  "local_name": "@testing-library/react",
  "alias": false,
  "peer_metadata": null
}
^16.0.0development
eslint-config-prettier
Environment
{
  "local_name": "eslint-config-prettier",
  "alias": false,
  "peer_metadata": null
}
^9.1.0development
eslint-plugin-prettier
Environment
{
  "local_name": "eslint-plugin-prettier",
  "alias": false,
  "peer_metadata": null
}
^5.2.1development
jest-environment-jsdom
Environment
{
  "local_name": "jest-environment-jsdom",
  "alias": false,
  "peer_metadata": null
}
^29.5.0development
@rollup/plugin-commonjs
Environment
{
  "local_name": "@rollup/plugin-commonjs",
  "alias": false,
  "peer_metadata": null
}
^26.0.1development
@rollup/plugin-typescript
Environment
{
  "local_name": "@rollup/plugin-typescript",
  "alias": false,
  "peer_metadata": null
}
^11.1.6development
@rollup/plugin-node-resolve
Environment
{
  "local_name": "@rollup/plugin-node-resolve",
  "alias": false,
  "peer_metadata": null
}
^15.0.1development
rollup-plugin-peer-deps-external
Environment
{
  "local_name": "rollup-plugin-peer-deps-external",
  "alias": false,
  "peer_metadata": null
}
^2.2.4development
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
{
  "shasum": "f5ca75e09197eed21fe86d098ebcb019ebe437ed",
  "tarball": "https://registry.npmjs.org/@0x0pharaoh/next-paystack/-/next-paystack-1.0.0.tgz",
  "fileCount": 19,
  "integrity": "sha512-YKmCvHFNUfULgkmYtpuGqJl6QmGmd/nAg/WtGdOF4iZ2HTwRXjQhaNkJzDCblur8eHi4Iv0iA92bzhUdCA+TUw==",
  "signatures": [
    {
      "sig": "MEUCIAOSAGz+KdCtCJSy6DKXqbgx6vgrv5mxrpc7XXP5blA9AiEArr9F+dhzgLAge3SKa8EbWYL/KrYwNlw36vFwmaemm9g=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 680947
}

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:2c5e94a8a2abac9fa280f22e7418568473ba813fdc992eb3906cee1fe07b5f60

Other collected versions

1.0.19 AprView all collected versions →