Skip to main content
World's First AI B2B Platform
Payment Protocol · x402 v2 / Base L26 min readUpdated 2026-11-29

x402 & HTTP 402: Machine-Native Agent Payments on Base L2

Direct Technical SummaryFail-Closed · Base L2 Ready

x402 activates HTTP status code 402 ('Payment Required') so autonomous AI agents can pay for API resources or structured commerce data in stablecoins on Base L2 (eip155:8453) with zero API keys, zero credit-card forms, and zero human login flows. BoxNCase implemented @x402/next and fail-closed x402 v2 verification contracts (lib/agentic-commerce/x402.ts) starting April 20, 2026; the paid catalog-summary route remains fail-closed until a production Base mainnet facilitator is configured, while catalog search stays free via /mcp/mcp.

BoxNCase Implementation Specs
HTTP Status
402 Payment Required
Headers (x402 v2)
PAYMENT-REQUIRED / PAYMENT-SIGNATURE / PAYMENT-RESPONSE
Target Network
Base L2 Mainnet (eip155:8453)
SDK Stack
@x402/core, @x402/evm, @x402/next, @x402/extensions
Safety Model
Fail-closed verification separate from settlement saga
Free Alternative
Public catalog search at /mcp/mcp ($0)
x402 v2 Verification & Payment-Required Handshake
# Step 1: Agent requests a metered wholesale intelligence endpoint
GET /api/x402 HTTP/1.1
Host: www.boxncase.com

# Step 2: Server challenges with HTTP 402 + PAYMENT-REQUIRED payload
HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: <base64 exact eip155:8453 USDC quote + payTo + maxTimeoutSeconds>

# Step 3: Agent signs EIP-3009 transfer authorization & retries
GET /api/x402 HTTP/1.1
PAYMENT-SIGNATURE: <signed x402 v2 payload + payment-identifier>

# Step 4: Facilitator verifies & settles on Base L2 -> HTTP 200 + PAYMENT-RESPONSE

HTTP 402 was reserved in 1997—AI agents finally need it

Humans click 'Subscribe', enter a billing address, pass 3DS verification, and copy an API key. Autonomous procurement agents running dozens of supplier comparisons per minute cannot complete 40 separate SaaS signups just to check live inventory feeds or proprietary mineral/nutrition datasets.

The x402 protocol turns payment into a standard HTTP header handshake. An agent requests a resource, receives HTTP 402 with exact price and settlement details, signs a deterministic micro-payment on Base L2, and receives the JSON payload in a single round-trip.

Why BoxNCase enforces strict fail-closed verification on x402

After shipping an early x402 prototype on April 20, 2026 (PR #51–#52), BoxNCase upgraded the underlying architecture on August 8, 2026 (commit bc807edd) into a full x402 v2 contract in lib/agentic-commerce/x402.ts. Verification is cleanly decoupled from order settlement, payment identifiers are validated against replay, and the endpoint refuses to issue broken challenges unless an approved Base mainnet facilitator is configured.

Meanwhile, BoxNCase keeps core product search, pricing, collections, and water mineral data 100% free and unauthenticated on /mcp/mcp so AI shopping assistants face zero friction when recommending BoxNCase products.

Frequently Asked Questions

No. Searching BoxNCase's catalog via /mcp/mcp, /llms.txt, and /llms-full.txt is completely free and requires no authentication or crypto wallet. x402 is reserved for future metered machine-to-machine data and autonomous settlement flows.

Continue Exploring the Protocol Stack

Deep-dive technical guides across UCP, Stripe ACP, MCP, x402, BSIN, and BoxNCase's Wholesale OS.

All 8 Guides