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

stablezact-pay

v0.73.16

Published

Beautiful and smooth blockchain payment gateway SDK for seamless crypto payments - React & vanilla js

Readme

stablezact-pay

React and vanilla JavaScript SDK for Stablezact checkout.

Environment selection

The SDK uses production by default and no longer requires apiUrl for the standard Stablezact environments:

<StablezactPayment
  environment="production"
  publicKey="pk_live_..."
  config={{ amount: 100, customerEmail: '[email protected]' }}
/>

Use environment="staging" during staging integration. environment="auto" (the default) detects the environment from a supplied Stablezact API URL and uses staging on localhost; all other hosts safely default to production.

| Environment | API URL | Hosted payment screen | | --- | --- | --- | | Staging | https://talented-mercy-production.up.railway.app | https://paymentscreen-h9e8.vercel.app | | Production | https://hub.stablezact.com | https://payment.stablezact.com |

An explicit apiUrl or paymentScreenUrl remains supported as an override for private deployments.

Sandbox simulated tokens

Use a merchant test key (pk_test_...) with the same apiUrl and checkout configuration used in production. The SDK automatically detects sandbox mode, creates test payments through Stablezact Server, and displays a Pay with test tokens action. No blockchain wallet, gas, or real asset is involved.

For lower-level integrations, PaymentAPI.completeSandboxPayment(paymentId, customerId) completes a pending test payment and returns its simtx_... transaction hash. Replace only the public key with pk_live_... when moving the integration to production.

React / Vite Install

Use the package ESM entry for React apps:

import { StablezactPayment } from 'stablezact-pay';
import 'stablezact-pay/dist/style.css';

The React checkout is lazy-loaded from the root entry, so Vite apps do not pull the full wallet/payment stack into the initial application chunk.

Webhooks

Pass your backend webhook endpoint as callbackUrl when opening checkout:

<StablezactPayment
  config={{
    publicKey: 'pk_your-public-key',
    amount: 100,
    currency: 'USD',
    callbackUrl: 'https://your-store.com/api/webhooks/stablezact'
  }}
/>

On your backend, verify Stablezact webhook signatures before trusting the event:

import { stablezactWebhookMiddleware } from 'stablezact-pay';

app.post(
  '/api/webhooks/stablezact',
  stablezactWebhookMiddleware(process.env.STABLEZACT_WEBHOOK_SECRET),
  (req, res) => {
    // req.body is verified here.
    res.sendStatus(200);
  }
);

coinleyWebhookMiddleware is still exported as a backward-compatible alias, but new integrations should use stablezactWebhookMiddleware.

PWA Builds

The SDK ESM build is split into smaller chunks so vite-plugin-pwa can precache it with Workbox's default 2 MiB per-file limit. In the current build, the largest React checkout chunk is about 1.3 MB minified.

Do not import the standalone vanilla CDN bundle in React/Vite apps. The vanilla bundle is intentionally self-contained for script-tag usage and is much larger than the split ESM build.

If an app intentionally uses the standalone vanilla bundle with PWA precaching, configure Workbox explicitly:

VitePWA({
  workbox: {
    maximumFileSizeToCacheInBytes: 7 * 1024 * 1024
  }
})