AP2 Mandates Extension
Basic information
This page covers 2026-08-25. The dev.ucp.common.payment.ap2_mandate extension inherits dev.ucp.shopping.checkout. Upstream extension · Pinned schema
Discovery and negotiation
The upstream business profile example below shows the capability declarations. A deployment supplies its checkout service and payment handlers. The platform also advertises support. Under the trusted platform provider model, its top-level keys array must include a valid public key.
{
"ucp": {
"version": "2026-08-25",
"services": {},
"capabilities": {
"dev.ucp.shopping.checkout": [
{
"version": "2026-08-25",
"spec": "https://ucp.dev/2026-08-25/specification/shopping/checkout",
"schema": "https://ucp.dev/2026-08-25/schemas/shopping/checkout.json"
}
],
"dev.ucp.common.payment.ap2_mandate": [
{
"version": "2026-08-25",
"spec": "https://ucp.dev/2026-08-25/specification/payment/extensions/ap2-mandates",
"schema": "https://ucp.dev/2026-08-25/schemas/common/payment_ap2_mandate.json",
"extends": "dev.ucp.shopping.checkout",
"config": {
"vp_formats_supported": {
"dc+sd-jwt": { }
}
}
}
]
},
"payment_handlers": {}
}
}An intersection containing this extension locks the checkout session into the AP2 flow. The business includes ap2.merchant_authorization in every checkout response. The platform verifies that signature before presenting the terms.
Mandate flow
- The business signs the checkout response as a detached JWS in
header..signatureform. The signing input includes the protected JWS header and the JCS-canonicalized checkout object, with theap2field excluded from that object. Select the public key bykidwhen verifying the signature. - The platform obtains a Checkout Mandate and a Payment Mandate for the approved terms. The Checkout Mandate embeds the complete checkout response, including the business signature. The authorization flow determines who signs the SD-JWT and how key binding applies.
- In the completion request, put the Checkout Mandate in
ap2.checkout_mandateand the composite token carrying the Payment Mandate in the correspondingpayment.instruments[*].credential.token. The business checks the embedded checkout ID, totals and line items against the current session and forwards the token to the payment processor.
Error codes
| Code | First check |
|---|---|
mandate_required | AP2 was negotiated and the completion request omitted ap2.checkout_mandate. |
agent_missing_key | The platform profile lacks a valid key. |
mandate_invalid_signature | Credential signature verification failed. |
mandate_expired | The credential’s exp has passed. |
mandate_scope_mismatch | The credential refers to a different checkout. |
merchant_authorization_invalid | Verification of the business signature failed. |
merchant_authorization_missing | The checkout response omitted the business signature. |
JSON Schema validates the message structure. Each verifier checks signatures separately as specified. The platform verifies the business signature before displaying the terms, the business verifies the Checkout Mandate at completion, and the payment processor verifies the Payment Mandate. Platform verification · Business and processor verification
The site’s REST example covers basic checkout. End-to-end AP2 signature and payment processor testing is pending. REST checkout · Integration order