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

x402-stakefy-sdk

v3.0.1

Published

The most feature-rich x402 payment SDK for Solana - 10x lower fees (0.1%), social payments, session budgets, payment channels, React hooks, and Express middleware

Readme

x402-stakefy-sdk

npm version npm downloads License: MIT

The only x402 SDK with enterprise features, cryptographic receipts, and 90% lower fees than competitors.

🚀 Live Demo · 📖 GitHub · �� 6 Examples


🔥 Why Stakefy Beats PayAI

| Feature | Stakefy | PayAI | |---------|:-------:|:-----:| | Fees | 0.1% | 1-2% | | Receipt Verification | ✅ SHA-256 | ❌ | | Enterprise Features | ✅ Full | ❌ | | Social Payments | ✅ payToX() | ❌ | | Budget Presets | ✅ 4 types | ❌ | | Solana Primitives | ✅ Escrow, Drift | ❌ | | Live Examples | ✅ 6 apps | ❌ |

Full Comparison →


⚡ Quick Start

npm install [email protected]

Basic Payment

import { StakefyX402Client } from 'x402-stakefy-sdk';

const client = new StakefyX402Client({
  apiUrl: 'https://stakefy-x402-production.up.railway.app',
  network: 'mainnet-beta'
});

const payment = await client.createPayment({
  amount: 0.1,
  merchantId: 'YOUR_WALLET',
  reference: 'order-123'
});

Social Payments

import { payToX } from 'x402-stakefy-sdk';

// Pay by username!
await payToX(client, '@creator', 0.25);

Budget Presets

import { oneShot, perMinute, perMonth } from 'x402-stakefy-sdk';

await oneShot(client, merchant, user, 100, 0.01);  // 100 payments
await perMinute(client, merchant, user, 0.1, 60);  // $0.10/min
await perMonth(client, merchant, user, 9.99);      // $9.99/month

🏢 NEW: Enterprise Features

import { createEnterpriseClient } from 'x402-stakefy-sdk';

const enterprise = createEnterpriseClient(API_URL);

// Organization badges
const badge = await enterprise.getOrgBadge('org-123');

// Usage quotas
const quota = await enterprise.getQuota('org-123', 'project');

// Analytics
const metrics = await enterprise.getMetrics('org-123', 'project', 'month');

// Invoices
const invoice = await enterprise.generateInvoice('org-123', '2024-10', receipts);

Enterprise Docs →


🔐 NEW: Receipt Verification

import { verifyReceipt, verifySession } from 'x402-stakefy-sdk';

// Cryptographic proof with SHA-256
const receipt = await verifyReceipt({
  signature: 'TX_SIG',
  expectedAmount: 0.1,
  expectedMerchant: 'WALLET'
}, connection);

console.log(receipt.proof);     // SHA-256 hash
console.log(receipt.verified);  // true

Receipt Spec →


🚀 NEW: Solana Primitives

Fast Escrow

import { FastEscrow } from 'x402-stakefy-sdk';

const escrow = new FastEscrow(connection);
await escrow.create({ buyer, seller, amount: 10, timeout: 3600 });
await escrow.release(escrowId);

Partial Settlement

import { PartialSettler } from 'x402-stakefy-sdk';

const settler = new PartialSettler();
await settler.settle({ channelId, amount: 1.0, nonce: 1, merchant });

Drift Protocol

import { DriftX402 } from 'x402-stakefy-sdk';

const drift = new DriftX402('MERCHANT', 0.01);
const trade = await drift.trade({ market: 'SOL-PERP', side: 'long', size: 1, leverage: 10 });

🎮 6 Live Examples

Copy-paste ready applications:

  1. Next.js Paywall - Content paywall
  2. Stripe Clone - Subscription billing
  3. Content Paywall - Pay-per-view + tips
  4. Gaming Microtx - Session budgets
  5. QR POS - Point-of-sale
  6. SaaS Seats - Team billing

View All Examples →


📦 What's Included

// Core
import { StakefyX402Client, payToX, oneShot, perMinute, perMonth } from 'x402-stakefy-sdk';

// Enterprise
import { createEnterpriseClient, OrganizationBadge, UsageQuota } from 'x402-stakefy-sdk';

// Receipts
import { verifyReceipt, verifySession, PaymentReceipt } from 'x402-stakefy-sdk';

// Solana Primitives
import { FastEscrow, PartialSettler, DriftX402 } from 'x402-stakefy-sdk';

// React
import { PaymentButton, Paywall, usePayment } from 'x402-stakefy-sdk';

// Express
import { stakefyPaywall, stakefyBudget } from 'x402-stakefy-sdk';

💰 Pricing Comparison

| Monthly Volume | Stakefy (0.1%) | PayAI (1-2%) | You Save | |----------------|:--------------:|:------------:|:--------:| | $10,000 | $10 | $100-200 | $1,080-2,280/year | | $100,000 | $100 | $1,000-2,000 | $10,800-22,800/year |


📖 Documentation


🎯 What's New in v3.0.0

✅ Enterprise features (badges, quotas, analytics, invoices)
✅ Receipt verification (SHA-256 cryptographic proofs)
✅ Budget presets (oneShot, perMinute, perMonth, nonceOnce)
✅ Social payments (payToX)
✅ Fast escrow for secure transactions
✅ Partial settlement for streaming payments
✅ Drift Protocol integration
✅ 6 production-ready examples


💬 Support


📄 License

MIT © Stakefy Team


The only x402 SDK built for enterprises. 90% lower fees. 10x more features.

PayAI doesn't have receipts, enterprise features, or our Solana primitives. See why →