Install
openclaw skills install ucp-ap2-mandatesImplement UCP AP2 Mandates extension — cryptographic payment mandates for fully autonomous agent commerce using SD-JWT credentials, merchant authorization signatures, and the Agent Payments Protocol. Use when building autonomous agent payment flows without human-in-the-loop.
openclaw skills install ucp-ap2-mandatesFetch 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.
Checkout Mandate (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 Mandate (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:
<header>..<signature>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.