ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified finance Safety 3/5

x402

Internet-native payments using the HTTP 402 Payment Required standard. Set up as a buyer to pay for API access, or as a seller to monetize your APIs.

Why use this skill?

Enable autonomous, frictionless payments for your AI agents using the x402 standard. Monetize APIs or purchase data automatically.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/notorious-d-e-v/x402-enhanced
Or

What This Skill Does

The x402 skill brings the HTTP 402 Payment Required standard to your AI agent, enabling it to act as both a consumer and a provider of digital resources. By leveraging blockchain-native payments, this skill allows your agent to handle programmatic, automated transactions with servers that require compensation for data or compute services. It eliminates the need for legacy account setups, API keys, or subscription management, moving instead toward a frictionless, pay-per-use model that runs directly on EVM and Solana chains.

Installation

To integrate the x402 payment protocol, run the following command in your terminal: clawhub install openclaw/skills/skills/notorious-d-e-v/x402-enhanced Ensure you have configured your environment variables, specifically EVM_PRIVATE_KEY or SVM_PRIVATE_KEY if you intend to make payments, and EVM_ADDRESS or SVM_ADDRESS if you are monetizing your own endpoints. You will also need to specify the FACILITATOR_URL to handle the verification of payments on the blockchain.

Use Cases

  • Autonomous Data Sourcing: Your agent can purchase premium data sets, real-time market insights, or weather feeds from protected endpoints without needing pre-existing accounts.
  • API Monetization: Transform your own AI agent's outputs or API endpoints into revenue-generating assets by requiring a small payment for access.
  • Decentralized Infrastructure: Pay for compute power or specialized inference services on the fly using stablecoins.
  • Micro-transaction Markets: Facilitate high-frequency, low-cost interactions between agents where traditional payment rails would be prohibitively expensive due to processing fees.

Example Prompts

  1. "Fetch the latest seismic data from the resource server at http://localhost:4021 and handle the 402 payment automatically using my connected wallet."
  2. "Monitor the endpoint /weather-premium. If they require a 402 payment, execute the transaction using my Base mainnet configuration and store the response."
  3. "Set up my local API as an x402 server, requiring a 0.01 USDC payment on the Polygon network for every successful data request."

Tips & Limitations

  • Security: Always manage your private keys in a secure environment; do not hardcode them directly into your agent scripts. Use environment files (.env) and secure vaulting.
  • Gas Costs: While x402 has zero protocol fees, always account for blockchain network gas fees, which vary significantly between chains like Base, Solana, and Ethereum.
  • Network Compatibility: Ensure the server and the agent are communicating on the same network (e.g., if the server expects Base Sepolia, do not send payments from Solana Mainnet).
  • Facilitators: Verify that your chosen facilitator is trustworthy, as they play a central role in validating the transaction flow between client and server.

Metadata

Stars1287
Views0
Updated2026-02-22
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-notorious-d-e-v-x402-enhanced": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#payments#blockchain#web3#automation#api
Safety Score: 3/5

Flags: network-access, external-api, code-execution