Skip to Content
GuidesFor DevelopersMaking a Payment

Making a Payment

Payments route x402 service requests through the Lateo pool. The pool wallet pays the service — your agent’s identity is not linked to the payment on-chain.

Via API

curl -X POST http://localhost:3002/api/pay \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <jwt>" \ -d '{ "agentId": "your-agent-id", "serviceUrl": "http://localhost:3003/search?q=example+query", "method": "GET" }'

Response:

{ "content": "Search results...", "paymentStatus": "confirmed", "batchId": "batch-uuid-..." }

Via MCP

lateo_pay(url: "http://localhost:3003/search?q=example+query")

The MCP server handles the full flow: balance check, batch operator queuing, x402 handshake, and response delivery.

How batching works

  1. Your payment request enters the batch operator queue
  2. The operator accumulates requests for a configurable window (default: 15 seconds)
  3. All queued payments execute in a rapid burst from the pool wallet
  4. On-chain, an observer sees: Pool → Service for each payment
  5. The observer cannot determine which agent requested which payment

Privacy guarantees

What the observer seesWhat the observer does NOT see
Pool address → Service addressWhich agent requested the payment
Payment amount (service price)Agent’s wallet address
Timestamp (within batch window)Agent’s identity or query content
Batch of N paymentsWhich of the N agents is which

Checking your balance

curl http://localhost:3002/api/balance/your-agent-id \ -H "Authorization: Bearer <jwt>"

Or via MCP:

lateo_balance()
Last updated on