Correlates a built AP2 CartMandate (ART-595: cart_root, cart_items, merchant) against an x402_spend_evidence pack (assembled from the x402-spend-evidence chain): does the cart total (sum(quantity×unit_price) per currency), converted to the token's atomic units with the required token_decimals, equal authorization.value exactly; does merchant map to authorization.to. The cart hash-chain is independently re-verified here, never trusted from the CartMandate's own self-reported flag.
AP2 ↔ x402keccak256 + RFC 8785 canon (vendored, no hand-rolled crypto)Correlation, not verification
🔒 All inputs are processed locally in your browser. No data is transmitted. Do not enter real personal data — use synthetic or anonymised inputs only.
What This Does and Does Not Prove
Google has not shipped an AP2-compatible x402 extension. No kernel anywhere in this repo, and no published AP2 spec text, defines a cryptographic binding between an AP2 mandate and an x402 payment authorization. This tool observes that the cart total and merchant identity are consistent with the x402 authorization's amount and recipient. It does not cryptographically bind the two: no signature, hash, or on-chain reference ties this specific CartMandate to this specific x402 authorization. A party could present a valid CartMandate alongside an unrelated valid x402 authorization and this check would still report CORRELATED.
CartMandate Fields
Leave cart_root blank and use "Fill Worked Example" below to see a fully CORRELATED run.
Required, 0–18. An EIP-3009 value is denominated in the token's atomic base units, so the cart total is converted with this exponent and the two sides are compared as exact integers. Without it a correct 1 USDC payment (value"1000000") against a 1.00 cart reads as a mismatch.
x402 Spend Evidence
Only authorization.to and authorization.value are read by this correlation check, and value must be a non-negative integer in the token's atomic units (a decimal figure is reported as indeterminate, never rounded). The rest of the pack (digest, domain checks, signer recovery) is the x402-spend-evidence chain's own concern, echoed here for reference only.
Copy this paragraph into Claude, OpenClaw, or any MCP-aware agent to run this exact tool, with this sample, and verify the artifact.
Run the AINumbers MCP tool `correlate_ap2_cartmandate_x402`. Task: Correlate a built AP2 CartMandate against an x402_spend_evidence pack: cart total vs authorization value, merchant vs authorization recipient, and an independently re-derived cart hash-chain check.
Call it with arguments: {"policy_parameters":{"cart_root":"0x4e1a3b0922583d53d2c4090386f3438fd367bb08d5e12716bdf4a790eeb1dd92","cart_items":[{"sku":"SKU-100","description":"Widget","quantity":2,"unit_price":0.25,"currency":"USD"},{"sku":"SKU-200","description":"Gadget","quantity":1,"unit_price":0.5,"currency":"USD"}],"merchant":"0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667","token_decimals":6,"x402_spend_evidence":{"authorization":{"from":"0x7e5f4552091a69125d5dfcb7b8c2659029395bdf","to":"0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667","value":"1000000","validAfter":"0","validBefore":"2000000000","nonce":"0x0000000000000000000000000000000000000000000000000000000000000001"},"digest":"0xb5edd5c45c7ad92459eb789ae4449a9e2a79ce09a9a4122388ae91d7b938d972","recovered_signer":"0x7e5f4552091a69125d5dfcb7b8c2659029395bdf","verdict":"AUTHORIZATION_VALID","disclosure":"ev"}}}
Verify before trusting: call `verify_execution_hash` on mcp.ainumbers.co (https://mcp.ainumbers.co/mcp) with the parameter `claimed_hash` set to the returned `execution_hash`, passing the full artifact the run returned (the object containing `policy_parameters` + `output_payload` + `execution_hash`; equivalently `policy_parameters` + `output_payload` with `claimed_hash`), not the bare hash string, or re-run the in-page WebMCP tool `correlate_ap2_cartmandate_x402`.
Return the ledger link https://ledger.ainumbers.co/ so a human can re-verify without contacting us.
PII rule: All inputs are processed locally in your browser. No data is transmitted. Do not enter real personal data — use synthetic or anonymised inputs only.
Open the tool with the sample prefilled: https://ainumbers.co/chaingraph/art-596-ap2-x402-cart-correlation.html#p=v1.H4sIAAAAAAAA_wE4A8f8eyJjYXJ0X3Jvb3QiOiIweDRlMWEzYjA5MjI1ODNkNTNkMmM0MDkwMzg2ZjM0MzhmZDM2N2JiMDhkNWUxMjcxNmJkZjRhNzkwZWViMWRkOTIiLCJjYXJ0X2l0ZW1zIjpbeyJza3UiOiJTS1UtMTAwIiwiZGVzY3JpcHRpb24iOiJXaWRnZXQiLCJxdWFudGl0eSI6MiwidW5pdF9wcmljZSI6MC4yNSwiY3VycmVuY3kiOiJVU0QifSx7InNrdSI6IlNLVS0yMDAiLCJkZXNjcmlwdGlvbiI6IkdhZGdldCIsInF1YW50aXR5Ijox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