- Standard x402 settlement (“pay-per-request” style)
- Nevermined’s programmable x402 extension (
nvm:erc4337scheme with smart accounts + session keys + contract settlement)
For the complete technical specification, see the x402 Smart Accounts Extension Spec.
What is x402?
x402 standardizes a payment-enforced HTTP flow:- Client calls an endpoint normally
- Server responds with HTTP 402 Payment Required and
payment-requiredheader - Client builds a payment authorization (locally signed)
- Client retries the request including the x402 token in the
payment-signatureheader - Server delegates verification and settlement to the Facilitator
- Server returns response with
payment-responseheader (settlement receipt)
Why use a Facilitator?
A facilitator is the third party that:- verifies payment proofs
- simulates/enforces what is allowed (amount, plan, merchant/agent binding)
- executes settlement on-chain
- returns a canonical receipt (e.g., transaction hash)
How it works
Nevermined’s programmable x402 extension
Standard x402 is often implemented as an “exact transfer” authorization (e.g., EIP-3009). Nevermined extends x402 to support:- Smart Accounts (ERC-4337) and delegated session keys
- Smart-contract settlement (credits, subscriptions, PAYG, dynamic charging)
- Policy enforcement (merchant allowlists, spend caps, validity windows)
Facilitator responsibilities
Verification
- x402 envelope structure/version
- signature authenticity
- session key validity + scoped permissions
- plan state + subscriber balance
- simulation of allowed on-chain actions (UserOps)
Settlement
After the server completes its work, the facilitator can execute the settlement action permitted by the payment payload, such as:order(purchase/top-up)redeem/burn(consume credits)- “exact” transfers (when using standard x402)
Getting started
Express.js Integration
One-line payment protection with Express middleware
How It Works
End-to-end flow (client + server) with x402 headers and facilitator calls
Payment Models
Credits, subscriptions, and dynamic pricing using programmable settlement
x402 Protocol
Integrate x402 into your API/agent
Google A2A
Use x402 with A2A + AP2-style payment intent messaging