No-money x402 rehearsal

Agent Commerce Sandbox

Trial agent can-pay, x402 payment challenge, facilitator verify, and simulated settlement flows without live deploy credentials, funded wallets, or on-chain writes.

Sandbox Surfaces

Basehttps://sandbox.ontarioprotocol.com
Demohttps://ontarioprotocol.com/sandbox/demo
Manifesthttps://sandbox.ontarioprotocol.com/.well-known/x402.json or https://ontarioprotocol.com/.well-known/x402-sandbox.json
Can-payPOST https://ontarioprotocol.com/api/agent/can-pay with {"sandbox": true} or a sandbox endpoint URL
Facilitatorhttps://sandbox.ontarioprotocol.com/facilitator/verify and https://sandbox.ontarioprotocol.com/facilitator/settle
SignupPOST https://ontarioprotocol.com/api/sandbox/signup stores a hashed email only, for sandbox access tracking

Integration Tutorial

1Open /sandbox/demo and run the allow, review, and deny fixtures.
2Call /api/agent/can-pay with {"sandbox": true} before signing any payment payload.
3Parse decision, reasons, and x402.payment_requirements into the agent wallet policy.
4Send fixture payloads to https://sandbox.ontarioprotocol.com/facilitator/verify and https://sandbox.ontarioprotocol.com/facilitator/settle.
5Move to production endpoints only after the sandbox deny path fails closed in CI.

Deterministic Scenarios

Allow

allow at 0.01 USDC.

https://sandbox.ontarioprotocol.com/x402/allow

Review

review at 0.25 USDC.

https://sandbox.ontarioprotocol.com/x402/review

Deny

deny at 2.5 USDC.

https://sandbox.ontarioprotocol.com/x402/deny

Can-pay Rehearsal

curl -s -X POST https://ontarioprotocol.com/api/agent/can-pay \
  -H "Content-Type: application/json" \
  -d '{"sandbox": true, "endpoint": "https://sandbox.ontarioprotocol.com/x402/allow", "max_usdc": "0.05", "agent_policy": "strict"}'

Fake Settlement Rehearsal

curl -s -X POST https://sandbox.ontarioprotocol.com/facilitator/settle \
  -H "Content-Type: application/json" \
  -d '{
    "paymentPayload": {"x402Version": 1, "scheme": "exact", "network": "base-sandbox", "payload": {"signature": "sandbox-valid", "authorization": {"from": "0xAgent", "to": "0x0000000000000000000000000000000000000420", "value": "10000", "nonce": "demo"}}},
    "paymentRequirements": {"scheme": "exact", "network": "base-sandbox", "maxAmountRequired": "10000", "resource": "https://sandbox.ontarioprotocol.com/x402/allow", "payTo": "0x0000000000000000000000000000000000000420", "asset": "0x0000000000000000000000000000000000000402"}
  }'

Sample Code

Use the Python sample at /static/sdk/agent_sandbox_example.py to rehearse allow, review, deny, verify, and fake settle branches in CI.

Sandbox Signup

curl -s -X POST https://ontarioprotocol.com/api/sandbox/signup \
  -H "Content-Type: application/json" \
  -d '{"email": "dev@example.com", "use_case": "agent wallet policy tests", "agent_type": "mcp-host"}'