What is x402?
x402 is an open HTTP payment protocol. When a server needs payment before serving a request, it returns an HTTP402 Payment Required response with machine-readable payment instructions. The client pays, then resubmits the request with a payment receipt.
Float uses x402 as the payment rail for all agent-to-API transactions.
Why x402?
Traditional API access requires:- Create an account on the provider’s site
- Generate an API key
- Add the key to your environment
- Hope your agent doesn’t leak it
How Float implements x402
Float wraps x402 in a higher-level abstraction so your agents don’t need to implement the protocol themselves:- Probe — the agent calls a Float-registered service endpoint
- 402 received — Float intercepts the 402 response
- Payment — Float deducts from the agent’s wallet and broadcasts a Solana transaction
- Resubmit — Float attaches the
X-Paymentheader and resubmits the request - Done — the agent receives the
200 OKresponse as if nothing happened
The X-Payment header
After payment, Float attaches a signed receipt in the X-Payment header:
- Transaction signature (Solana)
- Amount and currency
- Timestamp
- Recipient address
Supported payment rails
| Rail | Status |
|---|---|
| Solana (USDC) | Live |
| Ethereum (USDC) | Coming soon |
x402 service registry
Float maintains a registry of x402-compatible services your agents can discover at runtime using thefind_service MCP tool. The registry includes:
- Float-native services (image generation, AI models)
- Third-party APIs that have adopted x402

