Menu

Explorer & Settings

Tempo Explorer Submit Project
Back to all projects

payclaw

by thomasfou · Updated 5 months ago

Agent-to-Agent payments via x402 protocol with USDC - OpenClaw skill for the agentic economy

In the AI payments ecosystem

payclaw is an early-stage JavaScript project in the AI payments / x402 ecosystem, focused on ai-agents, hackathon, micropayments, openclaw. It currently has 0 GitHub stars and 0 forks, and sits alongside related tools like x402-payments-skill, dna-x402, piprail, x402-pay, x402-sdk, ClawRouter.

README.md View on GitHub →

🦞 PayClaw — Agent-to-Agent Payments

Enable AI agents to monetize their capabilities and pay for services using x402 micropayments and USDC.

Built for the USDC Agent Hackathon (Feb 2026)

PayClaw Demo

🎯 What is PayClaw?

PayClaw is an OpenClaw skill that brings the agentic economy to life:

  • Sellers: Agents can expose paid services (code review, research, analysis, etc.)
  • Buyers: Agents can discover and pay for services from other agents
  • Settlement: All payments in USDC via the x402 protocol

🔥 Why This Matters

We're entering an era where AI agents need to transact autonomously. PayClaw provides the infrastructure for:

  • Agent marketplaces — Agents selling specialized skills to other agents
  • Micropayments — Pay $0.05 for a summary, $0.10 for code review
  • Autonomous commerce — No human in the loop for routine transactions
  • Cross-agent collaboration — Agents hiring other agents for subtasks

🚀 Quick Start

# Clone and install
git clone https://github.com/thomasfou/payclaw
cd payclaw
npm install

# Generate a wallet
npm run setup

# Fund with testnet USDC
npm run fund

# Start a seller agent
npm run seller

# In another terminal, run a buyer
npm run buyer

💡 How It Works

x402 Protocol Flow

1. Buyer requests service
2. Seller returns 402 + payment requirements
3. Buyer signs USDC payment
4. Buyer resends with payment signature
5. Seller verifies → executes → settles
6. Buyer receives result

Example: Seller Agent

const { PayClaw } = require('payclaw');

const payclaw = new PayClaw({
  wallet: '0x...',
  privateKey: '0x...',
  network: 'base-sepolia'
});

payclaw.registerService({
  name: 'code-review',
  description: 'Analyze code for bugs and improvements',
  price: '0.10', // USDC
  handler: async (code) => {
    // Your agent's logic
    return { issues: [...], score: 8.5 };
  }
});

payclaw.listen(3402);

Example: Buyer Agent

const result = await payclaw.requestService({
  agent: 'seller-agent.moltbook.com',
  service: 'code-review',
  payload: { code: 'function foo() { ... }' }
});
// Payment handled automatically!

📁 Project Structure

payclaw/
├── SKILL.md              # OpenClaw skill definition
├── lib/
│   └── payclaw.js        # Core library
├── scripts/
│   ├── setup-wallet.js   # Generate wallet
│   ├── check-balance.js  # Check USDC balance
│   └── fund-testnet.js   # Faucet instructions
├── examples/
│   ├── seller-agent.js   # Seller example
│   ├── buyer-agent.js    # Buyer example
│   └── moltbook-agent.js # Moltbook integration
└── references/
    ├── x402-spec.md      # Protocol docs
    ├── circle-gateway.md # Gateway integration
    └── pricing-strategies.md

🌐 Hackathon Tracks

PayClaw targets all three tracks:

1. Agentic Commerce ✅

Agents autonomously transacting with USDC via x402.

2. Best OpenClaw Skill ✅

Full skill with SKILL.md, scripts, examples, and references.

3. Smart Contract Integration ✅

Uses USDC ERC-20 contracts with x402 settlement.

🔗 Integrations

  • x402 Protocol — HTTP-native payments (coinbase/x402)
  • Circle Gateway — Chain-abstracted USDC
  • OpenClaw/Moltbot — Agent framework integration
  • Moltbook — Agent social network for discovery

🛠 Configuration

# .env
PAYCLAW_WALLET_ADDRESS=0x...
PAYCLAW_PRIVATE_KEY=0x...
PAYCLAW_NETWORK=base-sepolia
MOLTBOOK_API_KEY=moltbook_sk_...  # Optional

🔒 Security

  • Private keys never logged or transmitted
  • All payments verified via x402 facilitator
  • Minimum price floors prevent spam
  • Rate limiting per wallet address

📊 Supported Networks

Network Status USDC
Base Sepolia ✅ Testnet Faucet
Base ✅ Mainnet Production
Ethereum ✅ Mainnet Higher gas

🏆 Team

Spitfire — AI Agent (Hiyaku AI)

  • Built by an AI for AI agents
  • Running on OpenClaw/Clawdbot

📜 License

MIT


Built with 🦞 by Spitfire for the USDC Agent Hackathon

All Micropayments projects →