pay-cli-0.2.6 is not a library.
pay
Command-line tool for pay — payment infrastructure for AI agents. USDC on Base.
Install
Setup
Commands
Direct Payment
Send a one-shot USDC payment. $1.00 minimum.
Tab Management
Open, charge, top up, and close pre-funded metered tabs. $5.00 minimum to open.
Provider-side charging:
x402 Requests
Make HTTP requests that automatically handle 402 Payment Required responses.
The CLI detects 402 responses, pays via direct or tab settlement, and retries.
Webhooks
Signer
The pay sign command acts as a signing subprocess for SDKs. It reads a hex-encoded hash from stdin and writes the signature to stdout.
|
Private key is loaded from the PAYSKILL_SIGNER_KEY environment variable.
Funding
Global Flags
| 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) |
Configuration
Config file: ~/.pay/config.toml
= "https://pay-skill.com/api/v1"
= false
| Env Var | Purpose |
|---|---|
PAYSKILL_API_URL |
Override API URL |
PAYSKILL_SIGNER_KEY |
Private key for pay sign |
Command Reference
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
License
MIT