x402-layer
x402-layer helps agents pay for APIs with USDC, deploy monetized endpoints, manage credits/webhooks/marketplace listings, and handle ERC-8004 registration/reputation on Base/Solana. Use this skill when the user asks to "create x402 endpoint", "deploy monetized API", "pay for API with USDC", "check x402 credits", "consume API credits", "list endpoint on marketplace", "buy API credits", "topup endpoint", "browse x402 marketplace", "set up webhook", "receive payment notifications", "manage endpoint webhook", "verify webhook payment", "verify payment genuineness", "register ERC-8004 agent", "register Solana 8004 agent", "submit on-chain reputation feedback", "rate ERC-8004 agent", use "Coinbase Agentic Wallet (AWAL)", or manage x402 Singularity Layer operations on Base or Solana networks.
Why use this skill?
Learn to use the x402-layer skill for agent API monetization, USDC payments, and ERC-8004 registration on Base and Solana in OpenClaw.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ivaavimusic/x402-layerWhat This Skill Does
x402-layer serves as the foundational bridge for decentralized commerce within the OpenClaw ecosystem. By implementing the HTTP 402 Payment Required standard, this skill enables seamless, automated interactions between autonomous agents and paid API services. It acts as an orchestrator for both consumers who need to pay for requests using USDC on Base or Solana, and providers who aim to monetize their data or AI endpoints. Beyond simple payments, it manages credit systems, webhook integration for real-time payment verification, and the lifecycle of marketplace listings. Furthermore, it provides the tools necessary to participate in the broader agent economy through ERC-8004 and Solana-8004 agent registration, allowing agents to establish on-chain identities and gather reputation scores through transparent feedback loops.
Installation
To integrate x402-layer into your agent environment, execute the following command: clawhub install openclaw/skills/skills/ivaavimusic/x402-layer. Once installed, ensure that your local dependencies are satisfied by running pip install -r {baseDir}/requirements.txt. Configuration requires either providing explicit PRIVATE_KEY and SOLANA_SECRET_KEY environment variables or setting X402_USE_AWAL=1 to leverage the Coinbase Agentic Wallet (AWAL) for enhanced security and simplified key management.
Use Cases
The x402-layer is highly versatile, supporting diverse scenarios such as: automated research agents purchasing real-time stock data from paid APIs, SaaS providers launching monetized API services without a centralized database, and developers building reputation-backed agent swarms that require verifiable on-chain metrics. Whether you are building an agent that needs to purchase credits, a platform owner listing an endpoint on the x402 marketplace, or a developer requiring cryptographically secure webhook verification, this skill provides the necessary abstractions.
Example Prompts
- "Create a new x402 endpoint for my sentiment analysis API and list it on the marketplace."
- "Check my current credit balance and top up my endpoint with 50 USDC worth of credits."
- "Verify the latest webhook payment notification to ensure the transaction on the Base network is legitimate."
Tips & Limitations
Always prioritize using the Coinbase Agentic Wallet (AWAL) over raw private keys for production deployments to reduce the risk of key exposure. Remember that .env files are not auto-loaded; ensure all environment variables are exported in your terminal session before execution. Be aware that on-chain actions like registry feedback incur gas fees on the respective networks; monitor your wallet balance periodically. Finally, for production webhook implementations, always utilize the verify_webhook_payment.py script to prevent spoofing attacks.
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-ivaavimusic-x402-layer": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api, code-execution
Related Skills
email-security
Protect AI agents from email-based attacks including prompt injection, sender spoofing, malicious attachments, and social engineering. Use when processing emails, reading email content, executing email-based commands, or any interaction with email data. Provides sender verification, content sanitization, and threat detection for Gmail, AgentMail, Proton Mail, and any IMAP/SMTP email system.
x402-compute
This skill should be used when the user asks to "provision GPU instance", "spin up a cloud server", "list compute plans", "browse GPU pricing", "extend compute instance", "destroy server instance", "check instance status", "list my instances", or manage x402 Singularity Compute / x402Compute infrastructure. Handles GPU and VPS provisioning with USDC payment on Base or Solana networks via the x402 payment protocol.