Skip to main content

X402 Payments

X402 is an open payment protocol for machine-to-machine stablecoin payments. When your agent accesses a Prism-enabled API or service, x402 handles the payment flow automatically — the agent gets a payment request, the wallet pays, and the agent gets the resource. No human intervention. This page covers the Agent Wallet side — how your agent pays via x402. For the merchant/seller side (accepting payments), see Prism: X402 Protocol.

How It Works

X402 builds on the HTTP 402 Payment Required status code. The flow is straightforward: Step by step:
  1. Your agent makes a standard HTTP request to a Prism-protected endpoint
  2. The endpoint returns HTTP 402 Payment Required with payment details — amount, token, recipient address, and chain
  3. The agent’s wallet capability processes the payment — signing the stablecoin transfer inside the TEE
  4. The transaction settles on-chain
  5. Prism verifies the payment on behalf of the merchant
  6. The agent receives the requested resource or confirmation
From the agent’s perspective, this is seamless. The agent encounters a paywall, pays it, and gets what it asked for.

Using x402 with Your Agent

When your agent is connected via MCP and encounters a 402 payment requirement, the wallet handles it through the commerce payment capability. Example prompt:
“Access the premium data API at https://api.example.com/market-data
What happens behind the scenes:
  1. The agent calls the API
  2. Gets a 402 response with payment requirements (e.g., 0.50 USDC on Base)
  3. The agent uses the wallet’s payment capability to settle the required amount
  4. The agent retries the request with payment proof
  5. The agent receives the market data
Direct payment prompt:
“Pay 2 USDC to the merchant at 0xABC…123 on Base”
The agent can also make explicit payments to known merchant addresses without encountering a 402 flow first.

What Makes x402 Different

X402 is designed for machines paying machines, not humans clicking “Pay Now”:
FeatureTraditional Paymentx402
Interaction modelHuman clicks buttonsAgent handles automatically
SettlementDays (credit card)Seconds (on-chain)
CurrencyFiatStablecoins
IntermediariesPayment processor, bank, card networkDirect on-chain
API-nativeRequires separate payment integrationBuilt into HTTP itself
For AI agents, this matters because:
  • No browser needed — the payment happens in the HTTP flow, not in a checkout UI
  • No credentials to manage — the wallet signs the transaction; no credit card numbers or API payment keys
  • Instant settlement — the merchant can verify payment in seconds, not days
  • Micropayment friendly — stablecoin transactions can be very small (fractions of a dollar)

Supported Stablecoins

X402 payments through Agent Wallet support stablecoins on any chain where Prism merchants accept payments. Common options:
  • USDC — widely supported across EVM chains
  • FDUSD — supported on select chains
The specific tokens and chains available for x402 depend on what the merchant has configured via Prism. Your agent’s wallet needs to hold the required stablecoin on the required chain. See Supported Networks for the full chain and token details.

The Agent Wallet + Prism Connection

X402 is where the two Finance District products meet:
  • Agent Wallet is the buyer side — your agent has funds and wants to pay for services
  • Prism is the seller side — merchants accept stablecoin payments from AI agents
When an agent with an Agent Wallet pays a Prism merchant via x402, the entire transaction stays within one ecosystem. No intermediaries, no bridge services, no delays. The agent pays, Prism verifies, the merchant gets their funds.