Hedera · x402 & Agentic Commerce
What ships
executeAgentPaymentloads the capability token, enforces every guard (cap, expiry, allowlist, nonce), and recordshedera_tx_id+ a HashScan URL for one-click auditability.- x402 challenge shape (matches
coinbase/x402v1 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-testnetis 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
TransferTransactionruns inside the Node signer service (@hashgraph/sdkis 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 returns402 Payment Requiredagain.