Skip to Content
DocsGuidesAgentic Payments with FX402

Agentic Payments with FX402

FX402 was designed with autonomous agents and AI services in mind.
Agents can rent access to APIs, datasets, or models using x402-compatible microtransactions — no UI required.


🤖 1. Concept

In an agent-to-agent economy, bots can:

  • Discover resources via metadata
  • Parse 402 Payment Required responses
  • Automatically pay for short-term access
  • Cache receipts for re-use

This enables machine-level commerce — dynamic, automated, and verifiable.


⚙️ 2. Agent Flow

StepAction
1️⃣Agent requests data from API
2️⃣Receives R402 payload (pricing, tiers)
3️⃣Selects optimal tier automatically
4️⃣Pays and submits proof
5️⃣Receives JWT receipt and continues ops

🧩 3. Example: Agent R402 Request

{ "agent": "bot:market-analyzer", "action": "fetch-market-data", "r402": { "tiers": [ { "id": "hour", "price": "0.01", "currency": "USDC" }, { "id": "day", "price": "0.05", "currency": "USDC" } ], "modes": ["read"] } }

The agent can automatically select the cheapest tier for its operation window.


🔒 4. Rate Limits & Fairness

Facilitators can enforce agent-level rate limits such as:

  • Requests per second
  • Receipt reuse detection
  • Blacklisting expired receipts

Agents can also implement caching policies for efficient micro-purchases.


💡 5. Example Use Cases

AgentPurpose
Data CrawlersRent access to premium APIs temporarily
AI ModelsPay for inference windows (e.g., 1h access to weights)
IndexersStream data from blockchain providers under hourly plans
Automation BotsRent digital collectibles for short campaigns

🧭 6. Key Design Principles

  • Payments remain honor-system unless facilitator enforced.
  • No blockchain RPC calls needed — pure HTTP flow.
  • Works with Solana USDC, but can extend to Base or ETH.

📚 Next Steps

CDN Gating with JWT Receipts →

Last updated on