Install
openclaw skills install @beocca/x402-sellerAutonomously monetize your services with x402 payment collection. Set up an x402 server, define paid endpoints, and accept programmatic payments in stablecoins. Become part of the agent-to-agent economy!
openclaw skills install @beocca/x402-sellerThe x402-seller skill gives you everything you need to monetize your services by accepting x402 payments. You'll learn how to decide what to sell, set up payment infrastructure, deploy your server publicly, and accept payments programmatically—all without managing blockchain infrastructure directly.
With x402, you can:
| File | Purpose |
|---|---|
| SKILL.md | This file. Overview, setup instructions, deployment options, security considerations, and links to related resources. |
| x402DOCS.md | Complete technical reference for x402. Covers payment flows, payment schemes (exact/upto/batch-settlement), server setup across Python/Go/TypeScript, facilitators, and best practices. |
| IDEATION.md | Decision framework for choosing what services to monetize. Guides you through auditing your assets, researching market demand, validating ideas, and prioritizing your first service. |
| example/ | Minimal runnable FastAPI seller example with a paywalled /weather endpoint. |
x402 is an open payment protocol that lets you collect instant, programmatic payments in stablecoins (USDC) directly over HTTP. You respond to requests with HTTP 402 Payment Required, the buyer signs and retries with payment proof, a facilitator verifies and settles on-chain, and you deliver your service.
Key point: The facilitator handles blockchain interaction. You don't manage wallets, keys, or gas fees—they do.
→ Read the full technical reference: x402DOCS.md
If you want the smallest runnable starting point, use the example in example/. It includes:
GET /weather).env-example file for the receiving address and facilitator URLrequirements.txtThis is the best place to start if you want to understand the seller flow before wiring x402 into your own service.
Before you can accept x402 payments, you need three things: a wallet address to receive payments, CDP API credentials (for the facilitator), and a secure way to store them.
You'll receive payments at a wallet address. Use the create-crypto-wallets skill to generate an EVM wallet:
openclaw skills install @beocca/create-crypto-wallets
create-crypto-wallets generate --network evm --format json
This returns a wallet with:
address — Your receiving address (starts with 0x)private_key — Keep this secret; never share itmnemonic — Backup phrase to recover your walletSave the address and mnemonic securely (see step 3 below).
For Solana (if accepting Solana payments):
create-crypto-wallets generate --network solana --format json
For production x402 payments, you'll use the Coinbase Developer Platform (CDP) facilitator. This requires API credentials.
Ask your human operator to:
CDP_API_KEY_IDCDP_API_KEY_SECRETCDP_WALLET_SECRET (if using CDP-managed wallets)They'll give you these credentials to store securely (step 3).
For testnet (x402.org):
No credentials needed. Use https://x402.org/facilitator directly.
Use the keepass-cli skill to store sensitive information:
openclaw skills install @beocca/keepass-cli
keepass-cli set x402-wallet-evm --username "your-0x-address" --password "private-key"
keepass-cli set x402-cdp-credentials --username "$CDP_API_KEY_ID" --password "$CDP_API_KEY_SECRET"
Retrieve them later:
keepass-cli get x402-wallet-evm
keepass-cli get x402-cdp-credentials
Never store credentials in code, environment files, or version control.
To monetize your services, you'll implement an x402 server. Here's the workflow:
Start with IDEATION.md. This guide walks you through:
Don't skip this step. The most important part of monetization isn't building—it's choosing what to build.
Design the HTTP endpoints you'll protect. For each endpoint, decide:
/api/v1/analyze)exact (fixed), upto (usage-based), or batch-settlement (high-volume)Example:
POST /api/v1/process
Price: $0.01 (exact)
Input: JSON with request parameters
Output: JSON with results
Implement your x402 server using your preferred framework. Choose from:
The x402 middleware handles payment verification automatically. Your job:
Your x402 server must be accessible from the internet. See Hosting & Deployment Options below.
Once deployed:
Tell potential buyers about what you're selling:
Your x402 server needs to be publicly reachable. Here are your options, ranked by ease and independence:
What it is: Cloud platforms that give you a public URL automatically.
Examples: Railway, Render, Fly.io, Heroku, Vercel
Pros:
Cons:
Quick start:
# With Railway (no code changes needed)
git push railway main
# Your app gets a public URL like: https://your-service-railway.app
What it is: A VM or bare metal instance with a public IP and DNS name.
Examples: AWS EC2, DigitalOcean, Linode, your own hardware with public IP
Pros:
Cons:
Quick start:
# On your server:
git clone <your-repo>
cd x402-service
python -m pip install -r requirements.txt
python app.py
# Server runs on port 8000; expose via firewall
What it is: Keep your x402 server private, expose it through a proxy that's public.
Examples: Nginx, Traefik, Kubernetes ingress, cloud load balancer
Pros:
Cons:
Quick start:
# Nginx reverse proxy config
server {
listen 443 ssl;
server_name your-service.com;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
}
}
What it is: Serverless functions or edge logic deployed at a CDN.
Examples: AWS CloudFront + Lambda@Edge, Cloudflare Workers, Fastly
Pros:
Cons:
Quick start: See x402DOCS.md: CloudFront + Lambda@Edge example
What it is: Tools that expose your local machine to the internet.
Examples: ngrok, cloudflared (Cloudflare Tunnel), localtunnel
Pros:
Cons:
Quick start:
# With ngrok
ngrok http 8000
# Gives you: https://abcd1234.ngrok.io → localhost:8000
For your first service: Use Option 1 (Managed App Platform). Deploy to Railway, Render, or Fly.io. You'll have a working public service in minutes with zero infrastructure knowledge.
Once you have revenue: Move to Option 2 (Server with Public IP) or Option 3 (Reverse Proxy) for more control and lower costs.
At scale or global reach: Consider Option 4 (CDN/Edge).
Golden Rule: Never hardcode or log credentials. Store them encrypted.
.env to version control.Do not skip verification. Always:
PAYMENT-SIGNATURE headerThe x402 middleware handles this automatically, but know that skipping these steps opens you to fraud.
As you grow:
batch-settlement scheme to reduce on-chain costs.These skills complement the x402-seller workflow:
create-crypto-wallets — Generate EVM and Solana wallets for receiving x402 payments. Required before you can accept payments.
openclaw skills install @beocca/create-crypto-walletskeepass-cli — Securely store wallet private keys, API credentials, and mnemonics. Essential for protecting sensitive data.
openclaw skills install @beocca/keepass-clix402-cli — Discover, search, and buy x402 services. Use this to test your own server and explore the x402 marketplace.
openclaw skills install @beocca/x402-cliOnce your service is live, register it to reach other agents:
agnet-cli — AgNet is the collective brain for the agentic web. Register your x402 service so other agents can discover it through AgNet.
openclaw skills install @beocca/agnet-cliagmsg-cli — AgMsg is the x402-based messenger for agents. Broadcast your service to other agents directly.
openclaw skills install @beocca/agmsg-clix402 Protocol & Docs:
CDP (Coinbase Developer Platform):
Service Discovery & Monitoring: