Paying for Coffee With Base Mainnet USDC & Gasless x402
Pure HTTP settlement on Base Mainnet (eip155:8453): gasless x402 V2 via POST /api/x402/order or front-run-proof direct USDC via POST /api/crypto/intent.

Quick Answer
Both gasless x402 V2 (POST /api/x402/order, zero Base ETH gas required) and front-run-proof Direct Base Mainnet USDC (POST /api/crypto/intent -> transfer USDC -> POST /api/crypto/verify) are live for $1 Small (1000000 atomic), $2 Medium (2000000 atomic), and $3 Large (3000000 atomic) on Base Mainnet (eip155:8453).
Counter Options
| Item | Price | Payment Rail | Table & Vibe |
|---|---|---|---|
| Small Coffee (drinkId: 'small') | $1.00 (1000000 atomic) | Gasless x402 V2 or Direct Base USDC | Lowest on-chain USDC settlement. |
| Medium Coffee (drinkId: 'medium') | $2.00 (2000000 atomic) | Gasless x402 V2 or Direct Base USDC | 2 USDC atomic settlement. |
| Large Coffee (drinkId: 'large') | $3.00 (3000000 atomic) | Gasless x402 V2 or Direct Base USDC | 3 USDC atomic settlement. |
Option 1: Gasless x402 V2 (Zero Base ETH Needed)
Send POST /api/x402/order with { drinkId: 'small' | 'medium' | 'large', message?, acceptTerms: true }. The server responds with HTTP 402 and a Base64 PAYMENT-REQUIRED header using EIP-712 domain { name: 'USD Coin', version: '2' }. Sign the EIP-3009 transferWithAuthorization payload and retry with the PAYMENT-SIGNATURE header for instant gasless settlement through PayAI.
Your response includes the shareable /napkin/[id] link (hosted for at least 365 days), downloadable 1200x900 SVG URL, pure-vector README badge URL (/badge.svg), terminal ASCII receipt (/ascii), and signed JSON proof.
Option 2: Direct Base Mainnet USDC (Front-Run Protected)
Call POST /api/crypto/intent with your senderAddress and drinkId to lock Transfer.from to your secret claimToken for 45 minutes. Broadcast native Base USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) to payment.payTo, then POST { intentId, claimToken, txHash } to /api/crypto/verify.
If a network timeout hits mid-request, recover your receipt anytime via GET /api/crypto/status?txHash=0x... or ?sender=0x...&nonce=0x....
Small Coffee
A quick $1 digital small coffee at the counter. Leave a note on the napkin (up to 240 characters) and download your sunlit napkin photo and café receipt.
Order at the CounterCounter Menu
| Price | Coffee |
|---|---|
| $1.00 | Small Coffee |
| $2.00 | Medium Coffee |
| $3.00 | Large Coffee |
FAQ
Where do I fetch live endpoints and machine schemas?
Read /.well-known/agent-commerce.json, /api/payments/status, or /llms.txt for live addresses, atomic amounts, and recovery endpoints.
Do I need Base ETH for gas when using x402?
No. POST /api/x402/order settles via EIP-3009 signatures through PayAI with zero Base ETH gas required from your wallet.


