Three sandbox merchants that speak the suite's exact response contracts. Rehearse the whole book-and-buy flow for $0.003 a run, then point the same code at the real thing.
git clone https://github.com/nirholas/x402-agent-sandbox && npm install && npm run dev| Route | Price | What you get back |
|---|---|---|
GET /town | free | Directory of the three merchants, their routes, prices, and what each one mirrors. Start here. |
POST /restaurant/book | $0.001 | Signed reservation confirmation in the x402-tablebook schema — table, refund terms, cancel token, base64 ICS invite. |
POST /hotel/book | $0.001 | Signed lodging confirmation — room, nightly + total price, refund terms, cancel token, base64 ICS invite. |
POST /store/buy | $0.001 | Signed artifact in the x402-storefront envelope — digital download URL + license, or order confirmation + fulfillment record. |
reads & cancels | free | /restaurant/availability, /hotel/search, /store/catalog, both cancel routes, /store/download/:token, /verify. |
Call a paid route. The server answers 402 Payment Required with an accepts array holding both rails.
The 402 offers two rails — USDC on Base and USDC on Solana. Your client signs whichever one its wallet supports and retries with X-PAYMENT.
That rail's facilitator verifies and settles on-chain. The server holds no key and pays no gas.
The signed confirmation arrives in the response body — the same shape the real merchant returns — with the receipt in X-PAYMENT-RESPONSE.
npm install && npm run dev # the town on :4038, both rails live open http://localhost:4038/ # human checkout demo # agent side — the whole flow, three paid calls, $0.003 total PRIVATE_KEY=0xAgentWallet npx tsx examples/agent-client.ts
| Rail | Network | Asset | Pays to | Facilitator |
|---|---|---|---|---|
| EVM | base-sepolia (default) · base | USDC | 0x40252CFDF8B20Ed757D61ff157719F33Ec332402 | x402.org/facilitator |
| Solana | solana (default) · solana-devnet | USDC | WwwuGbqHrwF5RG89KhUbmRWEvjnRH9k5kVM5p7T3WwW | facilitator.payai.network |
Both entries appear in every 402. Pay in USDC on Base or Solana — your client picks the rail. Set PAY_TO_ADDRESS / SOLANA_PAY_TO_ADDRESS to receive the funds yourself.
| Sandbox merchant | Routes | Mirrors |
|---|---|---|
| Chez Sandbox | /restaurant/availability · /restaurant/book · /restaurant/cancel/:id | x402-tablebook |
| The Sandbox Inn | /hotel/search · /hotel/book · /hotel/cancel/:id | x402-hotel-search offers + the suite lodging confirmation |
| Sandbox Supply Co. | /store/catalog · /store/buy · /store/download/:token | x402-storefront |
Field for field, not just in spirit. Client code written against this sandbox ports 1:1 to the real services — change the base URL and the route prefix, nothing else.
Confirmations are seeded by the request body. The same booking request always returns the same reservationId, the same cancelToken, and the same table or room assignment — only timestamps move. Assert on those fields in a test suite and they stay green; replay a failing conversation and it fails identically.
Agents find this service via skill.md and the machine-readable /.well-known/x402 manifest — indexable by x402scan.com, the x402 Bazaar, and agentic.market. Questions: nichxbt@gmail.com.