
X402
Discover paid APIs in the x402 bazaar and call them with automatic USDC payments on Base from your coding agent.
Overview
x402 is an agent skill for the Build phase that discovers and calls paid HTTP APIs using the X402 protocol and USDC on Base via the awal CLI.
Install
npx skills add https://github.com/coinbase/agentic-wallet-skills --skill x402What is this skill?
- Search CDP bazaar by keyword with filters for network, scheme, and max price
- Inspect endpoint price, HTTP method, and input schema before paying
- Call x402 endpoints via `npx awal@2.10.0 x402` with automatic USDC settlement on Base
- Filter results across base, base-sepolia, polygon, and Solana networks
- JSON output mode for agent-parseable discovery and payment flows
- bazaar search returns 1–20 results via -k/--top
- awal CLI pinned at version 2.10.0 in docs
- network filters include base, base-sepolia, polygon, solana, solana-devnet
Adoption & trust: 3k installs on skills.sh; 110 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent needs a paid external API but you do not know which x402-listed service to use or how to satisfy payment requirements before calling it.
Who is it for?
Solo builders wiring Claude Code or Cursor agents to pay-per-request APIs on Base when tool choice is uncertain.
Skip if: Teams that only use free APIs, fixed MCP tools with no micropayments, or workflows that cannot run shell commands and wallet tooling.
When should I use this skill?
You lack a clear tool to choose, need to search the bazaar, call an x402 endpoint, discover payment requirements, or browse paid services.
What do I get? / Deliverables
You get bazaar search results, requirement inspection, and a paid API call path your agent can repeat with documented awal x402 commands.
- Bazaar search result set
- Endpoint requirement summary
- Executed paid API response from x402 call
Recommended Skills
Journey fit
Paid API discovery and invocation is integration work while wiring agents and backends to external services. The skill centers on CLI workflows to search bazaar, inspect schemas, and execute x402-paid HTTP calls—not greenfield product design.
How it compares
Use for protocol-native paid API discovery and calls—not as a generic REST client or Stripe checkout integration skill.
Common Questions / FAQ
Who is x402 for?
Indie developers and small teams building AI agents that must discover and pay for third-party API endpoints on Base using USDC through the awal CLI.
When should I use x402?
Use it during Build when integrating agent tooling: search the bazaar when you lack a clear tool, inspect x402 payment requirements, or execute a paid endpoint call the user names.
Is x402 safe to install?
It documents CLI flows that move real USDC; review the Security Audits panel on this Prism page and treat wallet keys, spend limits, and endpoint trust as your responsibility before running payments.
SKILL.md
READMESKILL.md - X402
# x402 Payment Protocol Use the `npx awal@2.10.0 x402` commands to discover, inspect, and call paid API endpoints using the X402 payment protocol. Payments are made in USDC on Base. ## Workflow The typical x402 workflow is: 1. **Find a service** - Search the bazaar or get details for a known endpoint 2. **Check requirements** - Inspect price, method, and input schema 3. **Make the request** - Call the endpoint with automatic USDC payment ## Commands ### Search the Bazaar Find paid services by keyword using CDP's vector search: ```bash npx awal@2.10.0 x402 bazaar search <query> [-k <n>] [--network <network>] [--scheme <scheme>] [--max-price <price>] [--json] ``` | Option | Description | | ----------------------- | ------------------------------------------------------------------------ | | `-k, --top <n>` | Number of results, 1–20 (default: 20) | | `--network <name>` | Filter by chain (base, base-sepolia, polygon, solana, solana-devnet) | | `--scheme <scheme>` | Filter by payment scheme: `exact` or `upto` | | `--max-price <price>` | Maximum price in USD (e.g. `0.01`) | | `--asset <address>` | Filter by payment asset address | | `--pay-to <address>` | Filter by recipient wallet address | | `--extensions <type>` | Filter by extension type (e.g. `outputSchema`, `bazaar`) | | `--json` | Output as JSON | ### List Bazaar Resources Browse all available resources: ```bash npx awal@2.10.0 x402 bazaar list [--network <network>] [--full] [--refresh] [--json] ``` | Option | Description | | ------------------ | -------------------------------------------------------------------- | | `--network <name>` | Filter by chain (base, base-sepolia, polygon, solana, solana-devnet) | | `--full` | Show complete details including schemas | | `--refresh` | Re-fetch resource index from CDP API | | `--json` | Output as JSON | ### Discover Payment Requirements Inspect an endpoint's x402 payment requirements without paying: ```bash npx awal@2.10.0 x402 details <url> [--json] ``` Auto-detects the correct HTTP method (GET, POST, PUT, DELETE, PATCH) by trying each until it gets a 402 response, then displays price, accepted payment schemes, network, and input/output schemas. ### Make a Paid Request Call an x402 endpoint with automatic USDC payment: ```bash npx awal@2.10.0 x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json] ``` | Option | Description | | ----------------------- | -------------------------------------------------- | | `-X, --method <method>` | HTTP method (default: GET) | | `-d, --data <json>` | Request body as JSON string | | `-q, --query <params>` | Query parameters as JSON string | | `-h, --headers <json>` | Custom HTTP headers as JSON string | | `--max-amount <amount>` | Max payment in USDC atomic units (1000000 = $1.00) | | `--correlation-id <id>` | Group related operations