AGENT PAYMENTS · PROTOCOL GUIDE

What Is the x402 Protocol?

x402 is a machine-native payment protocol built on the long-dormant HTTP 402 Payment Required status code. When an AI agent calls a gated API endpoint, the server responds with HTTP 402 and a JSON payment requirement (destination address, amount, currency). The agent's payment middleware signs and submits an on-chain payment, then retries the original request with a payment proof header — no API key, no subscription, no signup form.

Quick facts

  • Status code reused: HTTP 402 has been reserved since HTTP/1.1 for “future use” — x402 is the first protocol to give it a real, standardized payment flow.
  • Chains supported elsewhere: most existing x402 implementations target EVM chains (Base, Ethereum) settling in USDC.
  • XRPL/Xahau implementation: mcp-x402-xrpl (npm: @scriptmasterlabs/mcp-x402) is the first x402 facilitator built for the XRP Ledger and Xahau, settling in XRP, RLUSD, or XAH in ~3 seconds.
  • Live example: SqueezeOS's MCP server gates several premium endpoints behind x402 RLUSD payments.

Frequently asked questions

Does x402 require an API key?

No — that's the entire point. An on-chain payment proof (a transaction hash) replaces the API key. There's no signup, no dashboard, no account to manage.

Which currencies can settle an x402 payment?

Depends on the implementation. EVM-based x402 typically settles in USDC. mcp-x402-xrpl settles in XRP (drops), RLUSD (Ripple's USD stablecoin, as an IOU), or XAH on Xahau.

Is x402 a blockchain itself?

No. x402 is a payment-negotiation protocol layered on top of HTTP. It relies on an existing settlement network (Base/Ethereum for EVM implementations, XRPL/Xahau for mcp-x402-xrpl) to actually move funds.

Where can I try a live x402 endpoint?

SqueezeOS's MCP server (https://squeezeos-api.onrender.com/mcp) implements x402-gated premium tools you can call today with an XRPL wallet.

Related