{"skill":{"slug":"pay-for-service","displayName":"Pay For Service","summary":"Make 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.","description":"---\nname: pay-for-service\ndescription: Make 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.\nuser-invocable: true\ndisable-model-invocation: false\nallowed-tools: [\"Bash(npx awal@latest status*)\", \"Bash(npx awal@latest balance*)\", \"Bash(npx awal@latest x402 pay *)\"]\n---\n\n# Making Paid x402 Requests\n\nUse the `npx awal@latest x402 pay` command to call paid API endpoints with automatic USDC payment on Base.\n\n## Confirm wallet is initialized and authed\n\n```bash\nnpx awal@latest status\n```\n\nIf the wallet is not authenticated, refer to the `authenticate-wallet` skill.\n\n## Command Syntax\n\n```bash\nnpx awal@latest x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json]\n```\n\n## Options\n\n| Option                  | Description                                        |\n| ----------------------- | -------------------------------------------------- |\n| `-X, --method <method>` | HTTP method (default: GET)                         |\n| `-d, --data <json>`     | Request body as JSON string                        |\n| `-q, --query <params>`  | Query parameters as JSON string                    |\n| `-h, --headers <json>`  | Custom HTTP headers as JSON string                 |\n| `--max-amount <amount>` | Max payment in USDC atomic units (1000000 = $1.00) |\n| `--correlation-id <id>` | Group related operations                           |\n| `--json`                | Output as JSON                                     |\n\n## USDC Amounts\n\nX402 uses USDC atomic units (6 decimals):\n\n| Atomic Units | USD   |\n| ------------ | ----- |\n| 1000000      | $1.00 |\n| 100000       | $0.10 |\n| 50000        | $0.05 |\n| 10000        | $0.01 |\n\n**IMPORTANT**: Always single-quote amounts that use `$` to prevent bash variable expansion (e.g. `'$1.00'` not `$1.00`).\n\n## Examples\n\n```bash\n# Make a GET request (auto-pays)\nnpx awal@latest x402 pay https://example.com/api/weather\n\n# Make a POST request with body\nnpx awal@latest x402 pay https://example.com/api/sentiment -X POST -d '{\"text\": \"I love this product\"}'\n\n# Limit max payment to $0.10\nnpx awal@latest x402 pay https://example.com/api/data --max-amount 100000\n```\n\n## Prerequisites\n\n- Must be authenticated (`npx awal@latest status` to check, see `authenticate-wallet` skill)\n- Wallet must have sufficient USDC balance (`npx awal@latest balance` to check)\n- If you don't know the endpoint URL, use the `search-for-service` skill to find services first\n\n## Error Handling\n\n- \"Not authenticated\" - Run `awal auth login <email>` first, or see `authenticate-wallet` skill\n- \"No X402 payment requirements found\" - URL may not be an x402 endpoint; use `search-for-service` to find valid endpoints\n- \"Insufficient balance\" - Fund wallet with USDC; see `fund` skill\n","tags":{"latest":"0.1.0"},"stats":{"comments":0,"downloads":1364,"installsAllTime":52,"installsCurrent":7,"stars":0,"versions":1},"createdAt":1770843401932,"updatedAt":1779076823287},"latestVersion":{"version":"0.1.0","createdAt":1770843401932,"changelog":"Initial release of pay-for-service skill.\n\n- Enables making paid API requests to x402 endpoints with automatic USDC payment on Base.\n- Provides command syntax and usage for npx awal@latest x402 pay.\n- Documents options for HTTP method, headers, data, query params, and max payment amount.\n- Outlines prerequisites: wallet authentication and sufficient USDC balance.\n- Includes usage examples and common error handling steps.\n- Designed to be used after discovering services via search-for-service.","license":null},"metadata":null,"owner":{"handle":"0xrag","userId":"s177z35qvmk01m4ec7et2y1rz18854my","displayName":"0xRAG","image":"https://avatars.githubusercontent.com/u/15928227?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779971335975}}