{
  "id": "ku_4e221f79da547d623ffda7b590d72cc0",
  "version": 1,
  "domains": [
    "x402",
    "buyer",
    "accounting",
    "settlement"
  ],
  "insight": {
    "summary": "The seller returned success and a transaction hash, but the settlement amount in the receipt is null or absent, so your books cannot say what was paid.",
    "detail": "In x402 the amount in the settlement response is optional, and MPP keeps settlement fields method specific. We recorded a successful standard receipt whose normalized amount was null, and two earlier sellers whose receipts also needed chain evidence to prove the amount.",
    "action": "Keep the null as null. Read the transaction on chain and take the amount from the one USDC Transfer from your payer to the seller's payTo. Count the payment as reconciled only when exactly one such transfer is final."
  },
  "context": {
    "languages": [
      "typescript"
    ],
    "frameworks": [
      "viem"
    ],
    "pattern": "payment-reconciliation"
  },
  "evidence": {
    "confidence": 0.75,
    "confirmations": 1,
    "first_observed": "2026-08-21T00:00:00Z",
    "last_confirmed": "2026-12-02T00:00:00Z"
  },
  "tier": "public",
  "created_by": "neomorphic:house",
  "flags": [],
  "extensions": {
    "neomorphic:title": "x402 settlement receipt has a transaction hash but no amount",
    "neomorphic:signature": {
      "surface": "x402",
      "provider": "x402",
      "code": "settlement-receipt-amount-null",
      "environment": "PAYMENT-RESPONSE on Base USDC",
      "key": "x402/x402/settlement-receipt-amount-null"
    },
    "neomorphic:status": "fixed",
    "neomorphic:fix": {
      "summary": "Keep the null as null. Read the transaction on chain and take the amount from the one USDC Transfer from your payer to the seller's payTo. Count the payment as reconciled only when exactly one such transfer is final.",
      "snippet": {
        "lang": "ts",
        "text": "import { createPublicClient, http, parseEventLogs, erc20Abi } from 'viem';\nimport { base } from 'viem/chains';\n\nconst USDC = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913';\nconst pc = createPublicClient({ chain: base, transport: http() });\nconst rcpt = await pc.getTransactionReceipt({ hash: receipt.transaction });\nconst transfers = parseEventLogs({ abi: erc20Abi, eventName: 'Transfer', logs: rcpt.logs })\n  .filter((l) => l.address.toLowerCase() === USDC.toLowerCase()\n    && l.args.from.toLowerCase() === payer.toLowerCase()\n    && l.args.to.toLowerCase() === payTo.toLowerCase());\nif (rcpt.status !== 'success' || transfers.length !== 1) throw new Error('settlement not proven');\nconst paidAtomic = transfers[0].args.value; // bigint, 6 decimals"
      }
    },
    "neomorphic:sources": [
      {
        "kind": "observation",
        "observed_at": "2026-08-21",
        "note": "Our buyer recorded a successful receipt with a null normalized amount, plus two earlier sellers that needed chain evidence; our buyer now requires exactly one final Base USDC transfer before reconciling."
      }
    ],
    "neomorphic:author": {
      "kind": "house",
      "name": "Neomorphic"
    },
    "neomorphic:escalation": "buyer",
    "neomorphic:observed_at": "2026-08-21",
    "neomorphic:updated_at": "2026-12-02",
    "neomorphic:stale_after": "2027-06-01"
  }
}
