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) match authorization.value; 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.
Only authorization.to and authorization.value are read by this correlation check. 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":"0x2eeb01a35e5facd325ab3b60ba97fe4d26222584419fdf93106d3ca3575729fb","cart_items":[{"sku":"SKU-100","description":"Widget","quantity":2,"unit_price":9.99,"currency":"USD"},{"sku":"SKU-200","description":"Gadget","quantity":1,"unit_price":24.5,"currency":"USD"}],"merchant":"0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667","x402_spend_evidence":{"authorization":{"from":"0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667","to":"0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667","value":"44.480000000000004","validAfter":"0","validBefore":"2000000000","nonce":"0x0000000000000000000000000000000000000000000000000000000000000001"},"digest":"0xb68e5d60d6169bad9739d30399af8f8c7378d464d25f4d971911ab65ef0b014b","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_wHxAg79eyJjYXJ0X3Jvb3QiOiIweDJlZWIwMWEzNWU1ZmFjZDMyNWFiM2I2MGJhOTdmZTRkMjYyMjI1ODQ0MTlmZGY5MzEwNmQzY2EzNTc1NzI5ZmIiLCJjYXJ0X2l0ZW1zIjpbeyJza3UiOiJTS1UtMTAwIiwiZGVzY3JpcHRpb24iOiJXaWRnZXQiLCJxdWFudGl0eSI6MiwidW5pdF9wcmljZSI6OS45OSwiY3VycmVuY3kiOiJVU0QifSx7InNrdSI6IlNLVS0yMDAiLCJkZXNjcmlwdGlvbiI6IkdhZGdldCIsInF1YW50aXR5IjoxLCJ1bml0X3ByaWNlIjoyNC41LCJjdXJyZW5jeSI6IlVTRCJ9XSwibWVyY2hhbnQiOiIweDJhMTUzMGM0YzQxZGIwYjBiMmJiNjQ2Y2I1ZWIxYTY3YjcxNTg2NjciLCJ4NDAyX3NwZW5kX2V2aWRlbmNlIjp7ImF1dGhvcml6YXRpb24iOnsiZnJvbSI6IjB4MmExNTMwYzRjNDFkYjBiMGIyYmI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