Skip to main content

The 402 Flow

Your agent makes a normal HTTP request. If the service returns 200, done — xWell is never involved. If it returns 402 Payment Required, xWell steps in: checks agent permissions, signs the payment in a secure enclave, retries the request, and returns the result.

Roles

Builders control everything through the dashboard:
  • Create wallets and set signer-level policies
  • Create agents with per-agent spending limits
  • Approve or reject agent pairing requests
  • Monitor spending and transaction history
  • Revoke agent access or signer authorization at any time
Agents can only spend within the limits set by the builder:
  • Make paid API requests
  • Check their balance and spending
  • Discover available services
  • View their own transaction history
Agents cannot access private keys, change policies, create other agents, or modify spending limits.

Supported Protocols

ProtocolHow It WorksChains
x402Payment credential in 402 response. Agent signs and retries.Base, Ethereum, Arbitrum, Optimism
MPPChallenge–credential–receipt flow via HTTP auth headers.Tempo, Solana
Both protocols are handled automatically — your agent doesn’t need to know which one a service uses.