The round trip#
- Call. The agent calls a paid tool without paying.
- 402. Roundlot answers with an x402 v2
PaymentRequiredobject: schemeexact, networkeip155:1952, asset USD₮0, the amount in atomic units andpayTo. - Sign. The agent signs an EIP-3009
TransferWithAuthorizationfor that amount. Nothing is sent on-chain yet, and the agent needs no gas. - Retry. The agent repeats the same call with the signed payload.
- Verify. Roundlot has the facilitator check the signature, the amount, the recipient and the time window, and simulate the transfer.
- Run. The tool runs. If it refuses (bad input, a size the pool can't fill, a paused token), the authorization is never submitted and nothing is charged.
- Settle. The facilitator submits
transferWithAuthorizationon X Layer testnet and pays the gas. - Receipt. The result comes back with the settlement receipt:
success,transaction,networkandpayer.
What gets signed#
The EIP-712 domain is USD₮0's: name USD₮0 (with the ₮ character, U+20AE), version 1, chain id 1952, contract 0x9e29b3aada05bf2d2c827af80bd28dc0b9b4fb0c. The message authorizes a transfer from the payer to Roundlot's payTo of exactly the quoted amount, valid for a short window (maxTimeoutSeconds is 120), with a random nonce the token contract refuses to reuse.
| Tool | Price | Amount in the challenge (6 decimals) |
|---|---|---|
session | $0.005 | 5000 |
quote | $0.01 | 10000 |
plan_trade | $0.02 | 20000 |
Where the payment travels#
- REST:
PAYMENT-REQUIREDheader on the 402,PAYMENT-SIGNATUREheader on the retry,PAYMENT-RESPONSEheader on the result. See x402 over REST. - MCP: either inside the tool result and
_meta, or as HTTP 402 headers, depending on the client. See x402 over MCP.
Any wallet that can sign EIP-712 typed data can pay. There are no API keys, sign-ups or subscriptions.