Quickstart — first call in under a minute
MCP (Cursor, Claude, any Streamable-HTTP client): add the server, no key needed — the first 3 calls per day are free per client.
{ "mcpServers": { "code402": { "url": "https://hcrb.in/mcp" } } }
curl:
curl -X POST https://hcrb.in/v1/tools/iban-check/call \
-H "content-type: application/json" \
-d '{"input":{"iban":"GB82WEST12345698765432"}}'
More free test calls: mint a trial key (5-minute bearer, larger budget) and send it as Authorization: Bearer <trial-key>. For paid use, review current payment options: self-serve payments accept card (Stripe) or USDC on Base. Existing credit keys still use Authorization: Bearer ck_…. The 402 challenge describes per-call payment requirements, and the public client SDKs below implement the 402 → sign → retry → receipt-verify flow.
curl -X POST https://hcrb.in/api/auth/ephemeral-key
Client SDKs (TypeScript / Python / Go): github.com/89rat/x402-conformance/tree/main/sdk — clean-room implementations tested in CI against a local sandbox, zero funds. Replay the full paid exchange locally first with npx github:89rat/x402-conformance dev.
The protocol is documented machine-first. The canonical references live on the machine surface:
- llms.txt — endpoint index
- llms-full.txt — every tool, its endpoint, input schema, and example input
- openapi.json — OpenAPI 3.1
- A2A agent card and x402 discovery
- UCP checkout discovery — inspect the advertised version, capabilities and endpoint before integrating
Calling from this domain. Requests to this domain's API paths (/v1/…, /mcp) are relayed to the machine surface with your headers and body intact, so an agent configured against the old code402.dev URL keeps working — including bearer trial/credit keys and X-PAYMENT. New integrations should still point at https://hcrb.in.
How a paid call works (human explanation). An agent requests a capability. If payment is required, the server answers 402 Payment Required with a challenge describing the amount and asset. The agent signs a gasless EIP-3009 authorization (USDC or EURC on Base) and retries with it in the payment header. The server verifies, settles, and returns the result with a signed receipt that can be independently verified offline.