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

@sdkrouter/payments

v0.1.2

Published

Embeddable React payment widget for SDKRouter payment links — crypto payments via NOWPayments

Readme

@sdkrouter/payments

Accept crypto payments on your website with one React component. No payment processor, no merchant account, no monthly fees — payments go directly to your exchange account.

How it works

  1. Connect your exchange account (Binance, Bybit, OKX, KuCoin) in sdkrouter.com dashboard
  2. Create a payment link (fixed or custom amount)
  3. Drop <PaymentPage linkId="..." /> into your site
  4. Buyer clicks "Pay" → sees QR code + deposit address + exact USDT amount
  5. Buyer sends crypto from any wallet
  6. System detects the deposit automatically — no manual confirmation needed
  7. Funds appear in your exchange account

Zero platform fees. You only pay standard network fees (e.g., ~$1 for TRC20).

Quick Start

npm install @sdkrouter/payments

Full-page checkout

import { PaymentPage } from '@sdkrouter/payments';

<PaymentPage linkId="your-link-uuid" />

Inline widget

import { PaymentWidget } from '@sdkrouter/payments';

<PaymentWidget linkId="abc-123" />

Pay button with modal

<PaymentWidget linkId="abc-123" mode="button" buttonText="Pay $50" />

What the buyer sees

| Step | Screen | |------|--------| | 1. Form | Title, amount, email field | | 2. Payment | QR code, deposit address (copy), exact amount (copy), 60-min countdown | | 3. Waiting | "Checking for payment..." — auto-polls every 15 seconds | | 4. Confirmed | "Payment Received!" with transaction ID |

Why the amount isn't round

Each payment gets a unique amount (e.g., 10.003229 USDT instead of 10.00). This is how the system matches your deposit to your invoice on a shared address. The buyer copies the exact amount — it's handled automatically.

Features

  • QR code — SVG, scannable by any crypto wallet
  • Copy buttons — one-tap copy for address and amount
  • Countdown timer — 60-minute window, urgent indicator at <5 min
  • Auto-detection — polls for payment, no "I've paid" button needed
  • Dark/light theme — auto-detects from system/Tailwind/data-theme
  • Self-contained — CSS injected automatically, no external stylesheets
  • React 18 & 19 — works with both

Custom UI

import { PaymentProvider, usePayment } from '@sdkrouter/payments';

<PaymentProvider linkId="abc-123">
  <MyCheckout />
</PaymentProvider>

function MyCheckout() {
  const { link, pay, paymentResult, isPaying, step, reset } = usePayment();

  return (
    <div>
      <h1>{link?.title}</h1>
      <button onClick={() => pay({ email: '[email protected]' })} disabled={isPaying}>
        Pay ${link?.amountUsd}
      </button>
      {paymentResult && (
        <p>Send {paymentResult.payAmount} {paymentResult.coin} to {paymentResult.payAddress}</p>
      )}
    </div>
  );
}

Props

interface PaymentLinkConfig {
  linkId: string;                    // Payment link UUID from dashboard
  baseUrl?: string;                  // API URL (default: https://api.sdkrouter.com)
  customerId?: string;               // Your customer ID — enables payment history
  projectSlug?: string;              // Your project slug
  onSuccess?: (result) => void;      // Called when payment confirmed
  onError?: (error: string) => void; // Called on error
  theme?: 'light' | 'dark' | 'auto';
  locale?: string;                   // 'en', 'ru', 'ko', etc.
}

Supported exchanges

| Exchange | Networks | Sub-accounts | |----------|----------|-------------| | Binance | TRC20, ERC20, BEP20, Arbitrum, SOL | Up to 1000 | | Bybit | TRC20, ERC20, Arbitrum, SOL | Up to 100 | | OKX | TRC20, ERC20, Arbitrum, Polygon, SOL | Up to 50 | | KuCoin | TRC20, ERC20 | Up to 100 |

Default network: TRC20 (cheapest — ~$1 fee, fastest — ~3 seconds).

License

MIT