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

x402

Use x402 protocol for HTTP-native crypto payments. Use when Clawdbot needs to pay for APIs, access paid resources, or handle 402 Payment Required responses. Supports USDC payments on Base, Ethereum, and other EVM chains via the x402 standard.

Why use this skill?

Enable your OpenClaw AI agent to make autonomous crypto payments for paid APIs, AI models, and premium data using the x402 protocol on EVM chains.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/0xterrybit/x402
Or

What This Skill Does

The x402 skill integrates the x402 payment protocol into your OpenClaw agent, enabling native, programmatic, and autonomous HTTP payments. By utilizing the standard 402 Payment Required HTTP status code, this skill allows your agent to handle pay-per-call APIs, gated data resources, and on-demand compute services seamlessly. When a server requests payment, the x402 skill intercepts the response, processes the payment requirements (amount, recipient, network), signs the transaction using your configured wallet, and automatically retries the request with the necessary proof. It supports major EVM-compatible chains, with a primary focus on USDC-denominated stablecoin transactions.

Installation

To integrate this capability into your environment, use the OpenClaw command-line interface. Run the following command in your terminal:

clawhub install openclaw/skills/skills/0xterrybit/x402

Ensure that you have your wallet private key configured in your environment variables (WALLET_PRIVATE_KEY) and the appropriate RPC endpoints established for the chains you intend to interact with, such as Base or Ethereum.

Use Cases

This skill is essential for agents that require access to premium data feeds, specialized AI inference endpoints, or metered web resources. Common use cases include:

  1. Autonomous research: Paying per-page or per-query to access high-quality academic or financial databases.
  2. AI Model Consumption: Accessing proprietary LLM endpoints that charge per token for specific high-performance tasks.
  3. Dynamic Resource Allocation: Scaling compute power by paying for ad-hoc API resources when base capacity is insufficient.
  4. Decentralized Service Provisioning: Interacting with various Web3 services that utilize the x402 protocol for permissionless access control.

Example Prompts

  1. "Check the current weather forecast using the x402-enabled weather API, handling the payment automatically if required."
  2. "Access the premium financial dataset at api.datamarket.com. Use my x402 wallet to pay the required fee and fetch the latest market trends."
  3. "Run a complex reasoning task using the specialized LLM endpoint that requires a 0.005 USDC payment via x402."

Tips & Limitations

Always ensure your connected wallet maintains a sufficient balance of the required network's gas token (e.g., ETH on Base) in addition to the USDC required for the resource payment. Because this skill interacts with blockchain transactions, double-check your environment's RPC stability. The protocol is designed for automated micro-payments; do not use it for high-value transactions without verifying the recipient's endpoint security. Be aware that failed transactions may still consume gas, so monitor your agent's transaction logs closely to prevent unintended drain of funds during high-frequency request cycles.

Metadata

Stars1054
Views0
Updated2026-02-16
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-0xterrybit-x402": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

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

Flags: network-access, external-api