Fetch live spec:
site:ucp.dev specification ap2-mandates for the extension schemasite:ap2-protocol.org for the AP2 protocol specificationAP2 (Agent Payments Protocol) enables fully autonomous agent commerce — the agent can authorize payments cryptographically without requiring real-time human approval for each transaction. The user pre-authorizes spending parameters, and the agent proves authorization via signed credentials.
ap2.checkout_mandate): An SD-JWT+kb (Selective Disclosure JWT with Key Binding) credential that proves the user authorized the agent to complete this specific checkout at these specific terms.payment_data.token): A separate credential proving payment authorization, verified by the PSP (not the Business).Before the Platform generates mandates, the Business must sign the checkout terms:
.. The Business returns this merchant_authorization in the checkout response.
merchant_authorization (JWS detached content)complete_checkout callOnce AP2 is negotiated for a checkout session, a Security Lock is activated: neither party may revert to a standard (non-AP2) checkout flow for that session. This prevents downgrade attacks where a malicious actor could bypass the cryptographic mandate requirements by falling back to a simpler payment flow.
AP2-specific errors:
mandate_required — AP2 mandates needed but not providedagent_missing_key — Agent's signing key not foundmandate_invalid_signature — Signature verification failedmandate_expired — Mandate past validity windowmandate_scope_mismatch — Mandate doesn't match checkout termsmerchant_authorization_invalid — Business signature invalidmerchant_authorization_missing — Business didn't sign termsThis is the most complex UCP extension. Before implementing:
This extension is intended for advanced autonomous agent scenarios. Most initial implementations should start with standard payment handlers (Google Pay, Shop Pay) before adding AP2.
共 1 个版本
暂无安全检测报告