pay-for-serviceMake a paid API request to an x402 endpoint with automatic USDC payment. Use when you or the user want to call a paid API, make an x402 request, use a paid service, or pay for an API call. Use after finding a service with search-for-service.
Install via ClawdBot CLI:
clawdbot install 0xRAG/pay-for-serviceUse the npx awal@latest x402 pay command to call paid API endpoints with automatic USDC payment on Base.
npx awal@latest status
If the wallet is not authenticated, refer to the authenticate-wallet skill.
npx awal@latest x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json]
| Option | Description |
| ----------------------- | -------------------------------------------------- |
| -X, --method | HTTP method (default: GET) |
| -d, --data | Request body as JSON string |
| -q, --query | Query parameters as JSON string |
| -h, --headers | Custom HTTP headers as JSON string |
| --max-amount | Max payment in USDC atomic units (1000000 = $1.00) |
| --correlation-id | Group related operations |
| --json | Output as JSON |
X402 uses USDC atomic units (6 decimals):
| Atomic Units | USD |
| ------------ | ----- |
| 1000000 | $1.00 |
| 100000 | $0.10 |
| 50000 | $0.05 |
| 10000 | $0.01 |
IMPORTANT: Always single-quote amounts that use $ to prevent bash variable expansion (e.g. '$1.00' not $1.00).
# Make a GET request (auto-pays)
npx awal@latest x402 pay https://example.com/api/weather
# Make a POST request with body
npx awal@latest x402 pay https://example.com/api/sentiment -X POST -d '{"text": "I love this product"}'
# Limit max payment to $0.10
npx awal@latest x402 pay https://example.com/api/data --max-amount 100000
npx awal@latest status to check, see authenticate-wallet skill)npx awal@latest balance to check)search-for-service skill to find services firstawal auth login first, or see authenticate-wallet skillsearch-for-service to find valid endpointsfund skillGenerated Mar 1, 2026
A travel app uses this skill to fetch real-time weather data from a paid API for personalized trip recommendations. It automatically handles USDC payments to the x402 endpoint, ensuring seamless access without manual payment steps. This enables dynamic pricing based on data freshness and location granularity.
An e-commerce platform integrates this skill to analyze customer reviews via a paid sentiment analysis API. By making POST requests with review text, it pays per analysis in USDC, allowing scalable monitoring of product sentiment. This supports real-time insights for improving customer satisfaction.
A fintech startup uses this skill to retrieve stock market data from a paid API for investment analysis tools. It sets max payment limits to control costs while fetching real-time data via x402 endpoints. This automates payments in USDC, reducing operational overhead for data procurement.
A social media platform employs this skill to call a paid API for scanning user-generated content for inappropriate material. It uses GET or POST requests with content payloads, paying per scan in USDC atomic units. This ensures compliance and safety without manual payment handling.
Developers offer specialized APIs (e.g., weather, sentiment) where users pay per request via this skill. Revenue is generated from USDC micropayments for each API call, with pricing based on data complexity or volume. This model encourages low-barrier access and scalable usage.
Companies bundle access to multiple x402 endpoints with a monthly subscription, using this skill for on-demand calls within limits. Revenue comes from recurring USDC payments, with tiered plans based on request frequency or data types. This provides predictable income and user retention.
A platform offers basic analytics for free but charges for premium features like real-time data or advanced insights via this skill. Revenue is generated from USDC payments for premium API calls, upselling users based on usage needs. This model drives adoption while monetizing high-value services.
💬 Integration Tip
Always check wallet authentication and balance before invoking to avoid errors, and use the search-for-service skill first to find valid endpoints.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.