Dev.to
7/21/2026

ACP vs AP2: the two AI-checkout protocols, and what your store actually has to build
Short summary
OpenAI's ACP and Google's AP2 are two competing protocols for AI-agent checkout, solving the same problem in opposite ways. ACP gives agents a server-side checkout session with shared payment tokens; AP2 uses signed JWTs with canonical JSON cart hashes for price guarantees. The author implemented both and shares field notes, including a subtle canonical-JSON gotcha that cost a day of debugging.
- •ACP (OpenAI): server-side checkout sessions with integer minor units and shared payment tokens via Stripe
- •AP2 (Google): signed JWT cart guarantees with decimal major units and canonical JSON (RFC 8785) for hash consistency
- •Key gotcha: AP2 cart_hash requires byte-identical canonical JSON across all SDKs or verification fails
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



