Documentation
Quickstart — evaluation before payment
Start with the supplied-record comparison contract and inspectable exception report. No wallet is needed. This is not independent settlement or delivery verification.
Published LangChain client
Install @code-402/langchain@0.1.1 and @langchain/core. Start without a signer and with maxAmountMinor: "0". Follow the published quickstart. Paid Base calls require a separate explicit allowMainnet: true opt-in. Version 0.1.1 provides a per-call cap, not an aggregate multi-agent budget or durable paid-recovery journal. After an ambiguous timeout, do not blindly invoke a fresh paid call.
Existing REST and MCP tools
MCP (Cursor, Claude, any Streamable-HTTP client): add the server, no key needed to start. A daily free allowance is available without a wallet. Check the current allowance and scope before use.
{ "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: available payment methods are shown by the live checkout. 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. Inspect the full challenge and explicitly approve payment before signing a gasless EIP-3009 authorization (USDC or EURC on Base) and retrying with it in the payment header. Successful settlement and tool execution are separate outcomes. Where the route returns a signed receipt, verify its signature and request/result binding; an absent receipt is not verified evidence. An ambiguous response requires the recovery contract for that exact route and client version, not a fresh payment.