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.27

Published

Payments system extension for DjangoCFG

Downloads

252

Readme

DjangoCFG Extension Preview

View in MarketplaceDocumentationGitHub

@djangocfg/ext-payments

Wallet-style payment system extension for DjangoCFG with Apple-inspired UX.

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

Features

  • 💳 Wallet Page - Apple-style single page with balance and activity
  • 💰 Multi-Currency - Support for crypto (USDT, BTC, ETH) and fiat
  • 📊 Real-time Balance - Live balance updates via WebSocket
  • 🔄 Withdrawals - Request withdrawals with status tracking
  • 📜 Transaction History - Full payment and withdrawal history
  • 🎨 Ready Components - BalanceHero, ActivityList, PaymentSheet

Install

pnpm add @djangocfg/ext-payments

Exports

| Path | Description | |------|-------------| | @djangocfg/ext-payments | Main exports (WalletPage, components, types) | | @djangocfg/ext-payments/api | API client, fetchers, schemas | | @djangocfg/ext-payments/api/hooks | SWR hooks for API | | @djangocfg/ext-payments/config | Extension config (server-safe) |

Quick Start

Full Wallet Page

// app/wallet/page.tsx
import { WalletPage } from '@djangocfg/ext-payments';

export default WalletPage;

API Hooks

import {
  usePaymentsBalanceRetrieve,
  usePaymentsPaymentsList,
  usePaymentsWithdrawalsList,
  useCreatePaymentsPaymentsCreateCreate,
} from '@djangocfg/ext-payments/api/hooks';

function BalanceCard() {
  const { data: balance, isLoading } = usePaymentsBalanceRetrieve();

  if (isLoading) return <Skeleton />;

  return (
    <div>
      <h2>Balance: ${balance?.amount}</h2>
      <p>Currency: {balance?.currency}</p>
    </div>
  );
}

API Client

import { apiPayments } from '@djangocfg/ext-payments/api';

// Direct API calls
const balance = await apiPayments.payments.balanceRetrieve();
const payments = await apiPayments.payments.paymentsList({ page: 1 });

Individual Components

import {
  BalanceHero,
  ActivityList,
  AddFundsSheet,
  WithdrawSheet,
  PaymentSheet,
  WithdrawalSheet,
} from '@djangocfg/ext-payments';

function CustomWallet() {
  const [addFundsOpen, setAddFundsOpen] = useState(false);

  return (
    <div>
      <BalanceHero
        onAddFunds={() => setAddFundsOpen(true)}
        onWithdraw={() => {}}
      />
      <ActivityList limit={10} />
      <AddFundsSheet
        open={addFundsOpen}
        onOpenChange={setAddFundsOpen}
      />
    </div>
  );
}

Context Provider

import { WalletProvider, useWallet } from '@djangocfg/ext-payments';

// Wrap your app
<WalletProvider>
  <MyWalletPage />
</WalletProvider>

// Use in components
function MyComponent() {
  const { balance, payments, withdrawals, isLoading } = useWallet();
  // ...
}

API Reference

SWR Hooks

| Hook | Description | |------|-------------| | usePaymentsBalanceRetrieve() | Get user balance | | usePaymentsCurrenciesList() | Get available currencies | | usePaymentsCurrenciesEstimateRetrieve(code, { amount }) | Get payment estimate | | usePaymentsPaymentsList({ page, page_size }) | List payments | | usePaymentsPaymentsRetrieve(id) | Get payment details | | usePaymentsWithdrawalsList({ page, page_size }) | List withdrawals | | usePaymentsWithdrawalsRetrieve(id) | Get withdrawal details | | useCreatePaymentsPaymentsCreateCreate() | Create payment mutation | | useCreatePaymentsWithdrawalsCreateCreate() | Create withdrawal mutation | | useCreatePaymentsWithdrawalsCancelCreate() | Cancel withdrawal mutation |

Components

| Component | Description | |-----------|-------------| | WalletPage | Full wallet page with all features | | BalanceHero | Balance display with action buttons | | ActivityList | Combined payments + withdrawals list | | AddFundsSheet | Sheet for adding funds | | WithdrawSheet | Sheet for withdrawing | | PaymentSheet | Payment details sheet | | WithdrawalSheet | Withdrawal details sheet | | CurrencyCombobox | Currency selector |

Types

import type {
  Balance,
  PaymentDetail,
  PaymentList,
  PaymentCreateRequest,
  PaymentCreateResponse,
  WithdrawalDetail,
  WithdrawalList,
  WithdrawalCreateRequest,
  Currency,
  Transaction,
} from '@djangocfg/ext-payments';

License

MIT

Links