Command-line tool for Pay -- the complete x402 payment stack for AI agents. USDC on Base. Designed for programmatic use by AI agents: JSON output by default, mainnet by default.
cargo install pay-clipay init # Create ~/.pay/config.toml
pay status # Check balance and open tabsSend a one-shot USDC payment. $1.00 minimum.
pay direct 0xprovider... 5.00
pay direct 0xprovider... 1.50 --memo "task-42"Open, charge, top up, and close pre-funded metered tabs. $5.00 minimum to open.
pay tab open 0xprovider... 20.00 --max-charge 0.50
pay tab list
pay tab topup tab_abc123 10.00
pay tab close tab_abc123Provider-side charging:
pay tab charge tab_abc123 0.30Make HTTP requests that automatically handle 402 Payment Required responses.
pay request https://api.example.com/dataThe CLI detects 402 responses, pays via direct or tab settlement, and retries.
pay webhook register https://myapp.com/hooks
pay webhook list
pay webhook delete wh_abc123The pay sign command acts as a signing subprocess for SDKs. It reads a hex-encoded hash from stdin and writes the signature to stdout.
echo "deadbeef..." | pay signPrivate key is loaded from the PAYSKILL_SIGNER_KEY environment variable.
pay fund # Open Coinbase Onramp funding page
pay withdraw 0xrecipient... 50.00 # Get withdrawal link| Flag | Env Var | Purpose |
|---|---|---|
--json |
— | Output JSON instead of human-readable format |
--api-url |
PAYSKILL_API_URL |
Override API URL (default: https://pay-skill.com/api/v1) |
Config file: ~/.pay/config.toml
api_url = "https://pay-skill.com/api/v1"
testnet = false| Env Var | Purpose |
|---|---|
PAYSKILL_API_URL |
Override API URL |
PAYSKILL_SIGNER_KEY |
Private key for pay sign |
pay init First-time setup
pay status Balance + open tabs
pay direct <to> <amount> Send USDC ($1 min)
pay tab open <provider> <amount> Open tab ($5 min)
--max-charge <amount> Max per-charge limit
pay tab charge <tab_id> <amount> Charge a tab (provider-side)
pay tab close <tab_id> Close a tab
pay tab topup <tab_id> <amount> Add funds to open tab
pay tab list List open tabs
pay request <url> x402 request (auto-pay)
-X <METHOD> HTTP method (default: GET, POST if -d)
-H "Key: Value" Add header (repeatable)
-d <body> Request body (@file reads from file)
-o <file> Write response to file
-v / -s Verbose / silent
--no-pay Skip x402 payment handling
pay webhook register <url> Register webhook endpoint
pay webhook list List registered webhooks
pay webhook delete <id> Remove a webhook
pay sign Signer subprocess (stdin/stdout)
pay fund Open funding page
pay withdraw <to> <amount> Withdraw USDC
MIT
Pay is the complete x402 payment stack -- gateway, facilitator, SDKs, CLI, and MCP server -- that lets AI agents pay for APIs with USDC on Base.
- Documentation
- Architecture
- SDK -- Python + TypeScript
- pay-gate -- x402 payment gateway
- MCP Server -- Claude Desktop / Cursor / VS Code
- Protocol -- Smart contracts