x402-server
Monetized API server using x402 payment protocol. Charges USDC on Base for AI agent services.
Why use this skill?
Deploy monetized AI APIs with the x402-server skill. Easily gate your agent services and collect USDC payments on the Base network.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bobdevibecoder/x402-serverWhat This Skill Does
The x402-server skill enables developers to deploy a production-ready, monetized API endpoint designed specifically for AI agents. By integrating the x402 payment protocol, this skill allows your services to automatically request and collect payments in USDC on the Base network. It effectively creates a micro-transaction economy where your agent's capabilities—such as market scanning or content generation—are gated behind cryptographically verifiable payments. This is the foundation for a truly autonomous, self-sustaining AI agent business model.
Installation
To integrate this skill into your local OpenClaw environment, use the following CLI command:
clawhub install openclaw/skills/skills/bobdevibecoder/x402-server
Once installed, ensure your project environment is prepared by running npm install express x402-express. Before launching, you must configure your environment variables, specifically the PAY_TO address, which should be set to your Coinbase Agentic Wallet or any Base-compatible address where you wish to receive USDC. Start your server using the node index.js command.
Use Cases
This skill is ideal for AI-as-a-Service (AaaS) platforms where you want to monetize specialized compute resources. Common use cases include:
- Providing real-time crypto research data to other automated agents.
- Offering high-frequency market scanners for DeFi traders.
- Charging per-generation for AI content creation models.
- Exposing agent capabilities as a paid marketplace listing.
Example Prompts
- "Check the current status of the x402-server and list all available paid endpoints with their corresponding USDC prices."
- "Install the x402-server skill and help me configure the environment variables so I can start receiving USDC payments for my market analysis service."
- "Debug my current implementation of the /api/crypto-research endpoint to ensure the x402 handshake is correctly triggering the 402 payment required response."
Tips & Limitations
To maximize the effectiveness of this skill, ensure your agent's private keys are managed securely, preferably using a dedicated agentic wallet. Note that this skill relies on the Base network for USDC transfers; ensure sufficient network connectivity for API handlers. Limitation: This skill currently focuses on standardized HTTP 402 responses. If your agent requires advanced payment logic or recurring subscriptions, you may need to extend the underlying middleware.
Metadata
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bobdevibecoder-x402-server": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api
Related Skills
affiliate-master
Full-stack affiliate marketing automation for OpenClaw agents. Generate, track, and optimize affiliate links with FTC-compliant disclosures and multi-network support.
tweet-ideas-generator
Generates 60 high-impact tweet ideas from reference content across 5 categories. Use when someone wants to extract engaging short-form statements from content for Twitter/X, organized by harsh advice, quotes, pain points, counterintuitive truths, and key insights.
ai-discoverability-audit
Audit how a brand appears in AI-powered search (ChatGPT, Perplexity, Claude, Gemini). Use when user mentions "AI search," "how do I show up in ChatGPT," "AI discoverability," "AEO," "LLM visibility," or wants to understand their brand's AI presence.
positioning-basics
Help founders and marketers nail their positioning. Use when someone mentions "positioning," "value proposition," "who is this for," "how do I describe my product," "messaging," "ICP," "ideal customer," or is struggling to articulate what makes their product different.
polymarket-correlation
Detect mispriced correlations between Polymarket prediction markets. Cross-market arbitrage finder for AI agents.