OpenChainGraph Suite · ART-596 · AP2 / x402 Agent Commerce Correlation

AP2 x402 Cart Correlation

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.
Non-empty ordered array. Each item needs sku, description, quantity (positive number), unit_price (non-negative number), currency.
x402 Spend Evidence
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.
Checks
cart_chain_intact (independently re-derived)
cart_total_matches_authorization_value
merchant_matches_authorization_to
Disclosure

Execution Hash (SHA-256)