x402_echo
Validates an agent's x402 v1 client implementation against a TunnelMind surface end-to-end. Two operating modes:
mode: "demo"— HMAC over a nonce against a publicly-published secret. Does not move USDC. Smoke proves the WIRE works, not money movement.mode: "x402"— real Coinbase facilitator dispatch (gated on operator wallet provisioning; currently returns "facilitator not configured").
Without an X-PAYMENT header, the endpoint returns HTTP 402 with a standards-
compliant accepts[] array (USDC on Base, $0.001).
With a valid X-PAYMENT header (base64-encoded payment payload), echoes the
request body and returns an X-PAYMENT-RESPONSE settlement header.
Use this tool when:
You are validating your agent's x402 v1 client implementation against a real public endpoint.
You want to demonstrate the full 402 → retry → settle wire end-to-end.
Do NOT use this tool when:
You need a real paid operation — no TunnelMind production endpoint is gated behind x402 yet.
Inputs:
X-PAYMENT(header, optional): base64(JSON) per the x402 v1 spec. Without it, a 402 challenge is returned.Request body (optional): any JSON object to be echoed back on successful payment.
Returns:
On no header: HTTP 402 +
{ x402Version, accepts: [...] }.On valid payment: HTTP 200 +
{ ok: true, data: { echoed, paid_micro_usdc, x402 } }and anX-PAYMENT-RESPONSEheader carrying the settlement record.On invalid payment: HTTP 402 +
{ error: "invalid payment", reason }.
Discovery:
https://tunnelmind.ai/.well-known/x402.jsoncarries the public demo secret and the HMAC construction recipe.
Cost:
Free in demo mode (no USDC moved). $0.001 USDC in real-mode (when activated).
Latency:
Typical <100ms (demo mode); real mode is bounded by facilitator latency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| X-PAYMENT | No | base64(JSON) payment payload per the x402 v1 spec. Absent → 402 challenge. |