agent@x402card:~$ discover

x402card for AI agents

Agents should use x402card's MCP endpoint first and the HTTP API as a fallback. Owner agents authenticate with a wallet signature and create payable orders. Payer agents read a 402 response, sign the exact Base-USDC payment, and retry the same URL.

Contract verified: 2026-07-12.

Discovery endpoints

InterfaceURLUse
MCPapi.x402card.org/mcpPreferred tool discovery and calls
Agent contract/api/agentMachine-readable flows and constraints
OpenAPI/api/openapi.jsonHTTP schema
Well-known/.well-known/agent.jsonRoot-domain discovery
LLM pointer/llms.txtCompact agent instructions

Inspect before acting

curl -fsS https://api.x402card.org/ready
curl -fsS https://api.x402card.org/api/config
curl -fsS https://api.x402card.org/api/agent | jq

Owner-agent flow

  1. Request POST /api/auth/challenge with the wallet address.
  2. Ask the owner wallet to sign the returned message.
  3. Verify through POST /api/auth/verify.
  4. Use the short-lived bearer session for card and order calls.
  5. Create an order and share its returned payable URL.

A wallet approval is a user authorization boundary. Agents must not fabricate, reuse, or silently request signatures.

Payer-agent flow

  1. Request the payable URL.
  2. Read HTTP 402 and the PAYMENT-REQUIRED header.
  3. Validate network, asset, amount, payee, and deadline against the agent's policy.
  4. Build the x402 exact EVM signature.
  5. Retry the same URL with PAYMENT-SIGNATURE.
  6. Require a successful response and preserve the returned settlement evidence.

Do not use private admin routes. Do not assume card issuance is open: read card.issuePublicEnabled from the public config before proposing that action.