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

  1. The business signs the checkout response as a detached JWS in header..signature form. The signing input includes the protected JWS header and the JCS-canonicalized checkout object, with the ap2 field excluded from that object. Select the public key by kid when verifying the signature.
  2. 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.
  3. In the completion request, put the Checkout Mandate in ap2.checkout_mandate and the composite token carrying the Payment Mandate in the corresponding payment.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

CodeFirst check
mandate_requiredAP2 was negotiated and the completion request omitted ap2.checkout_mandate.
agent_missing_keyThe platform profile lacks a valid key.
mandate_invalid_signatureCredential signature verification failed.
mandate_expiredThe credential’s exp has passed.
mandate_scope_mismatchThe credential refers to a different checkout.
merchant_authorization_invalidVerification of the business signature failed.
merchant_authorization_missingThe 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