Skip to main content
NorenDocs← Main siteSandbox

Noren x402

x402 is HTTP 402 Payment Required turned into a working payment rail. A resource answers an unpaid request with a signed price quote, the caller pays, and the same request retried with an X-PAYMENT header returns the resource. Noren uses x402 in both directions: agents pay for external resources, and Noren exposes paid resources to other agents.

Status: the signing client is implemented in the repository, and Noren operates a live x402 gateway and facilitator on Robinhood Chain at gateway.usenoren.xyz. The Noren-signed trust-read seller described below is not live yet. To accept x402 payments in your own product, see Build with x402.

Both directions run through one accounting path. Settlement, budgeting, audit, and attestation are shared, so a paid call is a first-class, capability-gated, audited action rather than a side channel.

Crates

CrateRole
noren-x402Core types (PaymentRequirements, PaymentExtra), the Signer trait, and EvmSigner, which signs EIP-3009 authorizations over EIP-712 typed data.
noren-x402-signer-evmA stdin/stdout sidecar binary: read a PaymentRequirements JSON on stdin, get the base64 X-PAYMENT header value on stdout. Keeps the secp256k1 key out of the daemon process.

Money path (Robinhood Chain)

  • Network and asset: Robinhood Chain, chain id 4663, CAIP-2 id eip155:4663. The asset is USDG (an ERC-20 with 6 decimals that supports EIP-3009). Native gas is ETH.
  • Signature: the payer signs an EIP-3009 TransferWithAuthorization (from, to, value, validAfter, validBefore, nonce) over the token's EIP-712 domain. Signing is a local keccak and secp256k1 operation: no transaction is built and no RPC is needed.
  • Facilitator: a facilitator submits the signed authorization to the token's transferWithAuthorization and pays the ETH gas. Noren's facilitator is live at gateway.usenoren.xyz; today it settles with approve + transferFrom rather than an EIP-3009 authorization (see Build with x402).
  • Roles: the payer signs; the facilitator submits and settles; the recipient (payTo) receives the USDG. Payer and recipient are always distinct accounts.
  • Fail closed: if the signer cannot pin the token's EIP-712 domain, or the network is not an EVM network it recognizes, it refuses to sign. If the facilitator cannot settle, the caller receives a 402 and the resource is never released.

Paying for resources (outbound)

An agent reaches a paid provider through capability-gated MCP tools. The daemon signs the x402 payment with the agent funding key, debits the agent budget, writes a settlement receipt, and records the call in the hash-chained audit log. The agent never holds raw payment plumbing; it calls a tool and gets a result.

The noren-x402-signer-evm sidecar is the reusable primitive: feed it the PaymentRequirements from any 402 challenge and it returns the header to retry with.

export NOREN_X402_EVM_KEY=/path/to/funder.hex   # 32-byte secp256k1 secret as hex
echo "$payment_requirements_json" | noren-x402-signer-evm   # -> base64 X-PAYMENT header

A challenge for Robinhood Chain looks like this (the asset address is filled in once USDG is confirmed for the target network):

{
  "scheme":   "exact",
  "network":  "eip155:4663",
  "asset":    "<USDG token address>",
  "payTo":    "0x<recipient>",
  "maxAmountRequired": "10000",   // 0.01 USDG (6 decimals)
  "extra":    { "name": "<EIP-712 domain name>", "version": "<domain version>" }
}

Exposing a paid resource (inbound)

Noren's gateway at gateway.usenoren.xyz already serves paid routes that return a real 402 challenge and settle in USDG on Robinhood Chain; discovery is at /.well-known/x402. Noren-signed trust reads (attestations over a claim, reputation reads, and bond-receipt checks) are coming soon as paid routes, and no prices are published for them yet.

Unpaid, a paid route returns an x402 402 challenge: the exact scheme, network eip155:4663, USDG, and a payTo address. Pay and retry to receive the signed result. Returning a status of 400 or higher from the resource cancels settlement, so a caller is never charged for an error.

Related