x402 · HTTP 402 · agentic payments

What Is x402?

x402 is an open payment protocol for machine-to-machine and agentic payments. It gives practical meaning to HTTP 402 Payment Required by defining how a resource server can describe a price, how a client can submit payment credentials, and how payment can be verified and settled.

Current SCRIPTMASTERLABS SqueezeOS rail:
x402 v2 → Coinbase CDP facilitator → Base mainnet (eip155:8453) → USDC
Live x402 discovery

How the x402 flow works

  1. Request: a client or AI agent calls a paid resource.
  2. Payment required: the resource server returns a machine-readable HTTP 402 challenge with accepted payment requirements.
  3. Authorization: the client creates the required payment credential under its own wallet and spend policy.
  4. Retry: the client retries the resource request with the payment credential.
  5. Verify and settle: the server or facilitator validates authorization and coordinates settlement.
  6. Response: on successful execution and settlement policy, the resource is returned with payment response or settlement evidence.

Important: x402 separates a request for payment from successful settlement. SCRIPTMASTERLABS does not count a local 402 challenge as proof of payment.

Core vocabulary

agentic paymentsmachine paymentsmachine-to-machine paymentsprogrammatic paymentspay-per-call APIAPI micropaymentspayment-as-authenticationresource serverx402 clientfacilitatorpayment challengepayment authorizationsettlementUSDC on BaseEIP-3009Coinbase CDPx402 Bazaarservice discovery

x402 and MCP monetization

Model Context Protocol (MCP) gives AI systems a standard way to discover and invoke tools. x402 can provide a payment layer around paid resources or tools, enabling patterns such as MCP tool monetization, paid MCP tools, pay-per-call MCP, metered tool access and agent-native API commerce. SCRIPTMASTERLABS exposes MCP at squeezeos-api.onrender.com/mcp.

x402 discovery and the Bazaar concept

Machine commerce depends on discovery as much as payment. x402 discovery metadata can describe resources, pricing and provider information so buyers can find services without a human reading a landing page. Complementary formats such as OpenAPI, MCP metadata, agents.json and llms.txt give retrieval systems additional structured context.

Canonical SCRIPTMASTERLABS entry points

References