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

@djangocfg/ext-payments

v1.0.17

Published

Payments system extension for DjangoCFG

Readme

DjangoCFG Extension Preview

📦 View in Marketplace📖 Documentation⭐ GitHub

@djangocfg/ext-payments

Payment processing and subscription management extension for DjangoCFG.

Part of DjangoCFG — modern Django framework for production-ready SaaS applications.

Features

  • 💳 Payment Processing - Handle cryptocurrency and fiat payments
  • 🔄 Subscription Management - Recurring billing and subscriptions
  • 💰 Multi-Currency Support - Support for multiple cryptocurrencies
  • 📊 Balance Tracking - Real-time balance and transaction history
  • 🔔 Webhook Integration - Receive payment notifications
  • 📈 Analytics Dashboard - Payment statistics and insights
  • 🔒 Secure Payments - PCI-compliant payment handling

Install

pnpm add @djangocfg/ext-payments

Usage

Provider Setup

import { PaymentsExtensionProvider } from '@djangocfg/ext-payments/hooks';

export default function RootLayout({ children }) {
  return (
    <PaymentsExtensionProvider>
      {children}
    </PaymentsExtensionProvider>
  );
}

Create Payment

import { usePaymentsContext } from '@djangocfg/ext-payments/hooks';

function CheckoutPage() {
  const { createPayment, isCreatingPayment } = usePaymentsContext();

  const handleCheckout = async () => {
    const payment = await createPayment({
      amount: 99.99,
      currency: 'USD',
      description: 'Premium subscription',
      success_url: '/success',
      cancel_url: '/cancel',
    });

    // Redirect to payment URL
    window.location.href = payment.payment_url;
  };

  return (
    <button onClick={handleCheckout} disabled={isCreatingPayment}>
      {isCreatingPayment ? 'Processing...' : 'Pay $99.99'}
    </button>
  );
}

Balance Management

import { useBalancesContext } from '@djangocfg/ext-payments/hooks';

function WalletPage() {
  const { balances, isLoadingBalances, refreshBalances } = useBalancesContext();

  return (
    <div>
      <h2>Your Balances</h2>
      <button onClick={refreshBalances}>Refresh</button>
      {balances?.map(balance => (
        <div key={balance.currency}>
          <strong>{balance.currency}:</strong> {balance.amount}
        </div>
      ))}
    </div>
  );
}

Currency Management

import { useCurrenciesContext } from '@djangocfg/ext-payments/hooks';

function CurrencySelector() {
  const { currencies, selectedCurrency, setCurrency } = useCurrenciesContext();

  return (
    <select
      value={selectedCurrency?.code}
      onChange={(e) => {
        const currency = currencies.find(c => c.code === e.target.value);
        if (currency) setCurrency(currency);
      }}
    >
      {currencies.map(currency => (
        <option key={currency.code} value={currency.code}>
          {currency.name} ({currency.symbol})
        </option>
      ))}
    </select>
  );
}

Payment History

import { usePaymentsContext } from '@djangocfg/ext-payments/hooks';

function TransactionsPage() {
  const { payments, isLoadingPayments } = usePaymentsContext();

  return (
    <div>
      <h2>Transaction History</h2>
      {payments.map(payment => (
        <div key={payment.id}>
          <span>{payment.description}</span>
          <span>{payment.amount} {payment.currency}</span>
          <span>Status: {payment.status}</span>
          <span>{new Date(payment.created_at).toLocaleDateString()}</span>
        </div>
      ))}
    </div>
  );
}

Payment Overview

import { useOverviewContext } from '@djangocfg/ext-payments/hooks';

function DashboardPage() {
  const { overview, isLoadingOverview } = useOverviewContext();

  if (isLoadingOverview) return <div>Loading...</div>;

  return (
    <div>
      <h2>Payment Overview</h2>
      <div>
        <p>Total Revenue: ${overview.total_revenue}</p>
        <p>Pending Payments: {overview.pending_count}</p>
        <p>Completed Payments: {overview.completed_count}</p>
        <p>This Month: ${overview.current_month_revenue}</p>
      </div>
    </div>
  );
}

API Reference

Payments Context

  • payments - List of all payments
  • createPayment(data) - Create new payment
  • getPaymentById(id) - Get payment details
  • cancelPayment(id) - Cancel payment
  • isLoadingPayments - Loading state

Balances Context

  • balances - User's cryptocurrency balances
  • refreshBalances() - Refresh balance data
  • isLoadingBalances - Loading state

Currencies Context

  • currencies - Available cryptocurrencies
  • selectedCurrency - Currently selected currency
  • setCurrency(currency) - Set active currency
  • getCurrencyByCode(code) - Get currency details

Overview Context

  • overview - Payment statistics and analytics
  • refreshOverview() - Refresh overview data
  • isLoadingOverview - Loading state

Root Payments Context

  • currencies - Global currencies list
  • refreshCurrencies() - Refresh currency data
  • isLoadingCurrencies - Loading state

License

MIT

Links