What is x402?
x402 is a payment protocol that uses the HTTP402 Payment Required status code to enable machine-to-machine payments. When an agent hits a paywalled endpoint, the server responds with payment requirements; the agent’s wallet signs a USDC payment, and the request is retried with the payment proof attached.
This gives AI agents a payment rail that works like an API call — no card forms, no browser sessions, no human in the loop.
How It Works
Payment Requirements
The 402 response includes everything the agent needs to construct a payment:| Field | Description |
|---|---|
scheme | Payment scheme (exact for fixed amount) |
network | Blockchain network (base for Base mainnet) |
maxAmountRequired | Amount in USDC atomic units (6 decimals, so 25000000 = $25.00) |
payToAddress | Merchant’s receiving address |
validUntil | Payment window expiration |
Payment Execution
The agent signs a USDC payment using its wallet and includes the proof in theX-PAYMENT header:
Three Use Cases
1. Companion Order Payments
The most common flow: agents create a companion order and pay for it via x402. The concierge model means the user pays Podium in USDC, and Podium handles purchasing from the retailer and shipping.create_order tool creates the companion order and the initiate_order tool guides the user through providing shipping details.
2. Standard Commerce Payments
For orders in Podium’s core commerce system (not companion orders), x402 works the same way:3. Pay-Per-Call API Access
Podium’s x402 middleware can gate any endpoint behind a crypto paywall. Agents pay per-request in USDC to access premium data or services:Wallet Options
Privy Server Wallets (Automated)
For bots and backend agents that need to pay without user interaction:Privy Embedded Wallets (User-Controlled)
For consumer-facing apps where the user funds and controls the wallet:USDC on Base
All x402 payments settle in USDC on Base L2:| Network | USDC Address |
|---|---|
| Base Mainnet | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Base Sepolia | Deployed MockUSDC per environment |
https://facilitator.x402.org (Coinbase) handles payment verification and settlement.
Payment States
| State | Description |
|---|---|
PENDING | Payment requirements sent, awaiting proof |
VERIFIED | Facilitator confirmed the payment proof |
SETTLED | USDC transferred on-chain |
FAILED | Payment verification or settlement failed |

