npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bank78/checkout

v1.2.0

Published

Drop-in payment checkout for React — powered by Bank78

Readme

@bank78/checkout

Drop-in payment checkout for the web — card, bank transfer, and Pay with Bank78 — with end-to-end encrypted payloads, built-in 3DS/redirect handling, and a themeable UI.

Install one package. @bank78/core and @bank78/themes come with it automatically.

npm install @bank78/checkout
# or
yarn add @bank78/checkout
# or
pnpm add @bank78/checkout

Quick start (React)

Wrap your app (or the checkout page) in a CheckoutProvider, import the stylesheet once, and drop in a checkout component.

import { CheckoutProvider, PaymentLinkCheckout } from '@bank78/checkout';
import '@bank78/checkout/styles.css';

export function Checkout({ linkref }: { linkref: string }) {
  return (
    <CheckoutProvider
      apiBaseUrl="https://checkout.bank78.co"
      apiKey={import.meta.env.VITE_BANK78_API_KEY}
      onSuccess={(result) => console.log('paid', result)}
      onCancel={() => console.log('cancelled')}
      onError={(err) => console.error(err)}
    >
      <PaymentLinkCheckout linkref={linkref} />
    </CheckoutProvider>
  );
}

That's the whole payment-link flow — the SDK loads the link, renders the card / bank-transfer / Pay-with-Bank78 UI, and handles the charge (including 3DS redirects and app hand-offs).

Hosted checkout session

When your backend pre-creates a checkout session, render it by reference:

import { CheckoutProvider, HostedSessionCheckout } from '@bank78/checkout';
import '@bank78/checkout/styles.css';

<CheckoutProvider apiBaseUrl="https://checkout.bank78.co" apiKey={API_KEY}>
  <HostedSessionCheckout sessionReference="chk-..." />
</CheckoutProvider>;

Create the session on your server — never expose secret keys in the browser.

Embed inline

Both components take an optional inline prop to drop the full-screen wrapper and render inside your own layout:

<PaymentLinkCheckout linkref={linkref} inline />

No build step / any framework (CDN)

A standalone bundle ships React, the checkout, and the CSS in a single <script>-loadable file that exposes a global Bank78Checkout. Use it from plain HTML, Vue, Svelte — anything.

<script src="https://cdn.jsdelivr.net/npm/@bank78/checkout/dist/cdn/bank78-checkout.global.js"></script>
<div id="checkout"></div>
<script>
  const instance = Bank78Checkout.renderPaymentLink('#checkout', {
    apiBaseUrl: 'https://checkout.bank78.co',
    apiKey: 'YOUR_API_KEY',
    linkref: 'pay-...',
    inline: true,
    onSuccess: (r) => console.log('paid', r),
    onCancel: () => {},
    onError: (e) => console.error(e),
  });
  // later: instance.unmount();
</script>

For a pre-created session, use Bank78Checkout.renderSession('#checkout', { apiBaseUrl, apiKey, sessionReference, inline }). Both return { unmount() }.


Using Vue?

There's a first-class Vue 3 wrapper: @bank78/vue. Same checkout, native Vue components and events — no React in your app code.

npm install @bank78/vue vue
<script setup>
import { PaymentLinkCheckout } from '@bank78/vue';
</script>

<template>
  <PaymentLinkCheckout
    api-base-url="https://checkout.bank78.co"
    :api-key="apiKey"
    :linkref="linkref"
    @success="onSuccess"
    @cancel="onCancel"
    @error="onError"
  />
</template>

It also ships HostedSessionCheckout, Bank78PayLaunch, Bank78PayApproval, and CancellationScreen — enough to wire the full Bank78 Pay flow with your own router. See the @bank78/vue README for details.


Configuration

CheckoutProvider props:

| Prop | Type | Description | | -------------- | ------------------------- | -------------------------------------------------------- | | apiBaseUrl | string | Checkout API base URL, e.g. https://checkout.bank78.co | | apiKey | string | Your API key — sent as X-Api-Key on every request | | publicKey | string? | Optional publishable key (pk_…) | | theme | Partial<CheckoutTheme>? | Override design tokens | | onSuccess | (result) => void | Fired when a payment succeeds | | onError | (error) => void | Fired on error | | onCancel | () => void | Fired on cancellation | | onStepChange | (step) => void | Fired on each checkout step — handy for analytics |

Component props:

| Component | Props | | ----------------------- | ----------------------------- | | PaymentLinkCheckout | linkref, inline? | | HostedSessionCheckout | sessionReference, inline? |


Theming

The design system is CSS variables — override tokens, no fork and no !important wars:

<CheckoutProvider
  theme={{
    colorPrimary: '#A9FFF2',
    colorBackground: '#111111',
    colorText: '#E8E8E8',
    borderRadius: '12px',
  }}
>
  {/* ... */}
</CheckoutProvider>

Entry points

| Import | What you get | | ----------------------------- | ------------------------------------------------------------ | | @bank78/checkout | Components, hooks, and re-exported core types/utilities | | @bank78/checkout/styles.css | The stylesheet (import once) | | @bank78/checkout/headless | Logic + hooks only, no styled components — build your own UI | | @bank78/checkout/cdn | The standalone browser bundle (Bank78Checkout global) |


Good to know

  • Card PIN is automatic — when the session's provider requires it (e.g. Payaza for NGN cards), the SDK shows a 4-digit PIN field and includes it in the charge. You don't wire anything.
  • 3DS & redirects are first-class — the SDK sends the customer to their bank / the Bank78 app and re-checks status on return, so sessions aren't lost.
  • Encrypted payloads — sensitive request bodies are encrypted in the browser (RSA-OAEP + AES-GCM) on top of TLS.
  • Publishable keys only — never put a secret key in client code.

Requirements

  • React >= 18 (peer dependency) — not needed for the CDN bundle.

License

MIT