pay-for-servicevon coinbase

Call paid APIs on Base with automatic USDC payment via x402 protocol. Executes HTTP requests (GET, POST, etc.) to x402-enabled endpoints with atomic USDC payments handled automatically Supports request customization through method, JSON body, query parameters, and custom headers Includes payment controls: set maximum USDC amount per request and group related operations with correlation IDs Requires wallet authentication and sufficient USDC balance; validates all user input to prevent shell...

npx skills add https://github.com/coinbase/agentic-wallet-skills --skill pay-for-service

Making Paid x402 Requests

Use the npx [email protected] x402 pay command to call paid API endpoints with automatic USDC payment on Base.

Confirm wallet is initialized and authed

npx [email protected] status

If the wallet is not authenticated, refer to the authenticate-wallet skill.

Command Syntax

npx [email protected] x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json]

Options

OptionDescription
-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
--jsonOutput as JSON

USDC Amounts

X402 uses USDC atomic units (6 decimals):

Atomic UnitsUSD
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).

Input Validation

Before constructing the command, validate all user-provided values to prevent shell injection:

  • url: Must be a valid URL starting with https:// or http://. Reject if it contains spaces, semicolons, pipes, backticks, or shell metacharacters.
  • data (-d): Must be valid JSON. Always wrap in single quotes to prevent shell expansion.
  • max-amount: Must be a positive integer (^\d+$).

Do not pass unvalidated user input into the command.

Examples

# Make a GET request (auto-pays)
npx [email protected] x402 pay https://example.com/api/weather

# Make a POST request with body
npx [email protected] x402 pay https://example.com/api/sentiment -X POST -d '{"text": "I love this product"}'

# Limit max payment to $0.10
npx [email protected] x402 pay https://example.com/api/data --max-amount 100000

Prerequisites

  • Must be authenticated (npx [email protected] status to check, see authenticate-wallet skill)
  • Wallet must have sufficient USDC balance (npx [email protected] balance to check)
  • If you don't know the endpoint URL, use the search-for-service skill to find services first

Error Handling

  • "Not authenticated" - Run awal auth login <email> first, or see authenticate-wallet skill
  • "No X402 payment requirements found" - URL may not be an x402 endpoint; use search-for-service to find valid endpoints
  • "Insufficient balance" - Fund wallet with USDC; see fund skill

Mehr Skills von coinbase

authenticate-wallet
by coinbase
Email OTP-based wallet authentication with validation and status checking. Two-step login flow: initiate with email to receive a 6-digit OTP, then verify with the flowId and code to complete authentication Includes input validation rules for email, flowId, and OTP to prevent shell injection before executing commands Provides status checking, balance queries, address retrieval, and wallet window access via companion CLI commands All commands support --json output for machine-readable...
fund
by coinbase
Deposit USDC to wallet via Coinbase Onramp or direct transfer. Opens a companion UI where users select preset amounts ($10, $20, $50) or custom values and choose from Apple Pay, debit card, bank transfer, or Coinbase account funding Supports multiple payment methods with varying settlement times: instant for card and Apple Pay, 1–3 days for ACH bank transfers Deposits funds as USDC on the Base network; alternatively, users can send USDC directly to the wallet address via npx [email protected]...
monetize-service
by coinbase
Deploy a paid API endpoint that other agents can discover and pay for via x402 protocol. Charges USDC per request on Base using HTTP 402 payment protocol; clients pay with signed transactions, no API keys or accounts required Automatically registers endpoints with the x402 Bazaar for agent discovery when you declare discovery extensions Supports multiple pricing tiers, wildcard routes, and multiple payment options per endpoint using Express middleware Built on @x402/express and @x402/core...
query-blockchain-data
by coinbase
Query onchain blockchain data on Base using the CDP SQL API via x402. Use when you or your user want to view onchain information about decoded blocks,…
query-onchain-data
by coinbase
Query onchain data on Base using SQL with per-query x402 payments. Access decoded events, transactions, and blocks via CoinbaseQL, a ClickHouse-based SQL dialect supporting joins, CTEs, subqueries, and standard functions Three main tables available: base.events (decoded smart contract logs), base.transactions (full transaction data), and base.blocks (block metadata) Requires filtering on indexed fields ( event_signature , address , block_timestamp ) in event queries to avoid full table...
search-for-service
by coinbase
Search and discover paid API services available on the x402 bazaar marketplace. Query the marketplace using BM25 relevance search, list all available resources, or inspect specific endpoints to see pricing and payment requirements without paying Supports filtering by network (base, base-sepolia) and output formats (human-readable or JSON) Results are cached locally and auto-refresh every 12 hours; no authentication required for any search or discovery operation Use as a fallback when no...
send-usdc
by coinbase
Transfer USDC to Ethereum addresses or ENS names on Base. Accepts both hex addresses (0x...) and ENS names (.eth) as recipients, with automatic ENS resolution Supports flexible amount formats: dollar notation ($5.00), decimal (1.50), or atomic units (1000000) Requires wallet authentication via the authenticate-wallet skill and sufficient USDC balance before sending Includes input validation to prevent shell injection and optional JSON output for programmatic use
trade
by coinbase
Execute token swaps on Base network using flexible amount formats and built-in token aliases. Supports three common token aliases (USDC, ETH, WETH) plus arbitrary contract addresses; amounts can be specified as dollar values, decimals, whole numbers, or atomic units with automatic decimal detection Includes configurable slippage tolerance (in basis points) and JSON output option for programmatic integration Requires wallet authentication via the authenticate-wallet skill; validates all user...

NotebookLM Web Importer

Importieren Sie Webseiten und YouTube-Videos mit einem Klick in NotebookLM. Vertraut von über 200.000 Nutzern.

Chrome-Erweiterung installieren