Native x402

Native x402 Payments for AI Agents.

BlockX’s protocol design proposes native x402 payments for AI agents, pairing HTTP 402 service requests with signed vouchers and on-chain settlement. Follow the upgrade roadmap for rollout status.

What is x402?

HTTP 402 “Payment Required” for machine payments.

x402 turns the long-reserved HTTP 402 status code into a machine-readable payment protocol. BlockX runs it as a four-step handshake between any HTTP client, such as an AI agent, and any HTTP server, such as a service provider.

STEP 1 OF 4 • AGENT → SERVICE

Request the service

GET /service

STEP 2 OF 4 • SERVICE → AGENT

402 + payment descriptor

The service answers with HTTP 402 and a payment descriptor that states what it costs.

STEP 3 OF 4 • AGENT → BLOCKX NODE

Pay on-chain

The agent submits a signed MsgX402Pay transaction.

STEP 4 OF 4 • BLOCKX NODE → SERVICE

Settlement proof + 200 OK

The node returns a settlement proof and the service delivers with 200 OK.

SPEED

Under 50ms round trip

The full handshake completes in under 50ms at the protocol layer.

ATOMICITY

Payment and delivery, together or not at all

Steps 3 and 4 are atomic on-chain, so service delivery is cryptographically guaranteed once payment settles.

Why smart-contract x402 is not enough

Five ways contract-based x402 breaks down for agents.

Agentic commerce needs tens of millions of micropayments a day. Putting x402 inside a smart contract creates five bottlenecks that a protocol-native design avoids.

400–2000ms vs under 50ms

Settlement latency

A service provider needs payment confirmation before it delivers. Contract-based x402 adds 400–800ms of blockchain overhead plus EVM execution time, which makes real-time API billing impractical for high-frequency agents.

Up to 500× cost

Gas overhead

EVM contracts burn gas even to route a simple payment. For a $0.001 micropayment, gas of $0.05–0.50 makes the transaction uneconomical, and agents need millions of these every day.

Payment and delivery split

Atomicity loss

In the contract model, payment and service delivery are separate events. Payment can confirm at block N while delivery happens at block N+2. That gap invites failures, disputes and exploits, and a failed delivery after payment has no automatic resolution.

Bigger attack surface

Exploitable complexity

Every smart contract is a programmable surface. Reentrancy, integer overflows, front-running and oracle manipulation have drained billions from DeFi. Adding that complexity to the critical payment path is an avoidable security trade-off.

Hard to evolve safely

Upgrade fragility

Payment protocols must keep changing as new agent types and dispute mechanisms appear. Contract upgrades need proxy patterns, migration logic and careful governance. Protocol-level upgrades through Cosmos SDK governance are more controlled, auditable and backward-compatible.

Infrastructure gap

What agentic commerce needs, and what exists today.

RequirementExisting solutionsBlockX native x402
Settlement speed for API billing400–2000ms (smart contracts)Under 50ms, protocol-native
Transaction cost for micropaymentsGas fees make micropayments uneconomicalBase fee of 0.0001 BCX
Agent identity verificationNone: off-chain OAuth, no on-chain standardAgentRegistry: on-chain and verifiable
Payment and service atomicitySplit across two systems, with failure riskSingle atomic x402 handshake
Web2 developer accessRequires blockchain expertiseHTTP 402 header and standard REST
Agent spending policy enforcementOff-chain, application layer onlyOn-chain programmable spending limits
Web2 compatibility

If you understand HTTP, you can accept agent payments.

A service provider adds three lines to its API response headers. An agent adds a payment header to its request. There is no blockchain SDK to install, no wallet management and no gas estimation, because the payment happens inside the normal request and response cycle.

Integration pathDeveloper requirementTime to integrate
Web2 REST API (existing)Add x402 headers to an existing Express or FastAPI endpointHours
New agent-native APIUse the BlockX SDK, which generates descriptors automaticallyDays
Smart contract dAppEVM-compatible, so Solidity contracts work nativelyDays to weeks
Web2 frontend with agentsStandard MetaMask or WalletConnect integration for the user walletDays

An autonomous purchase, end to end

From the user setting a goal to an on-chain audit record, in eight steps.

IntentUser sets goal and budget
DiscoveryAgent searches providers
ComparePrice and terms ranked
AuthorizePolicy check passes
Paymentx402 on-chain transaction
SettlementFunds released to merchant
FulfilmentService or goods delivered
AuditOn-chain record

Add x402 to your API in hours.

Read the whitepaper for the full protocol design, or see how the consensus modules fit together.