All docs

Hedera · x402 & Agentic Commerce

What ships

  • executeAgentPayment loads the capability token, enforces every guard (cap, expiry, allowlist, nonce), and records hedera_tx_id + a HashScan URL for one-click auditability.
  • x402 challenge shape (matches coinbase/x402 v1 spec):
{
  "x402Version": 1,
  "accepts": [{
    "scheme": "exact",
    "network": "hedera-testnet",
    "maxAmountRequired": "100000000",
    "payTo": "0.0.OPERATOR",
    "resource": "/api/agent/paid",
    "description": "Agent API call fee"
  }]
}

Settlement proof: client submits X-PAYMENT: base64(json({transactionId})); Ognef verifies against Mirror Node (GET /api/v1/transactions/{id}) before releasing the resource.

Honest caveats

  • hedera-testnet is not a natively listed x402 network in the current spec — Ognef presents this as "x402 pattern applied to Hedera via Mirror Node settlement verification", not spec compliance.
  • The actual TransferTransaction runs inside the Node signer service (@hashgraph/sdk is Node-only). The browser never holds the operator key.

Win condition

  • Live HBAR tx during the demo. HashScan opens. Judge sees the memo.
  • Judge tries to reuse the same replay_nonce → server returns 402 Payment Required again.
/docs/hedera-x402