Logotipo de Ap2 Checkout Mandate

Ap2 Checkout Mandate

Organización
OrcaQubits
ap2-checkout-mandate

Implement the AP2 Checkout Mandate — the credential authorizing completion of a checkout, in its open (constrained) and closed (merchant-verified) forms, with merchant-signed checkout payloads, checkout hashes, and user confirmation on a trusted surface. Formerly called the Cart Mandate. Use when building cart/checkout authorization, signing, and verification.

Descripción general

EditorOrcaQubits
Repositorioagentic-commerce-skills-plugins
Nombre de la habilidadap2-checkout-mandate
Estrellas
40
Forks
17
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por OrcaQubits en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Ap2 Checkout Mandate en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-checkout-mandate
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/OrcaQubits/agentic-commerce-skills-plugins.git /tmp/agentic-commerce-skills-plugins
mkdir -p .claude/skills
cp -r /tmp/agentic-commerce-skills-plugins/ap2-agentic-payments/skills/ap2-checkout-mandate .claude/skills/ap2-checkout-mandate
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Ap2 Checkout Mandate en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Ap2 Checkout Mandate automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Ap2 Checkout Mandate no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

AP2 Checkout Mandate

Renamed. This credential was called the Cart Mandate in earlier AP2 releases. If you are reading older samples, blog posts, or tutorials that say "Cart Mandate", they are describing this object — but the structure changed along with the name, so do not port field names across. Fetch the live schema.

Before writing code

Fetch live docs:

  1. Fetch https://ap2-protocol.org/ap2/checkout_mandate/ for the current Checkout Mandate schema — open and closed forms.
  2. Fetch https://ap2-protocol.org/ap2/agent_authorization/ for the open/closed mandate model this sits inside. Read that first if you have not; the mandate makes little sense without it.
  3. Fetch https://ap2-protocol.org/glossary/ to catch any further renames.
  4. Web-search site:github.com google-agentic-commerce AP2 code sdk mandate checkout for the current type definitions under code/.

Conceptual Architecture

What it authorizes

The Checkout Mandate authorizes completing a checkout transaction. It is the credential that says "this user agreed to buy this."

It exists in two forms, matching the open/closed model from the Agent Authorization Framework:

FormBound to a transactionUsed for
OpenNo — carries constraintsHuman-not-present: the user authorizes a shape of purchase in advance
ClosedYes — merchant-verifiedHuman-present, or the resolution of an open mandate

Open mandate constraints

An open Checkout Mandate bounds what a valid closed mandate may contain:

  • Allowed merchants — which merchants may use the mandate
  • Line items — acceptable products and quantities

These constraints are the security boundary for autonomous purchasing. The verifier must enforce them; do not rely on the agent to police itself.

Closed mandate shape

The closed form carries the merchant's commitment:

  • vct — the credential type identifier
  • checkout_jwt — base64url-encoded, serialized, merchant-signed JWT of the checkout payload
  • checkout_hash — cryptographic hash identifying the specific checkout
  • iat / exp — issued-at and expiry

Read the live schema for the exact vct value and the full field list; both have changed between releases.

Who creates and signs what

  • The Shopping Agent creates the mandate content.
  • The Trusted Surface displays that content to the user. This is not the agent conversation — it is a surface the user can trust to show them what they are actually agreeing to.
  • For closed mandates, the Merchant creates a signed Checkout object that is embedded in the mandate content.

So there are two distinct commitments in play, and conflating them is the classic mistake:

  1. Merchant signature — an entity-level guarantee that the products are available, the prices are accurate, and the merchant will fulfill at those terms. Signed by the merchant organization, not by its AI agent.
  2. User approval — captured on the trusted surface, providing non-repudiation for dispute resolution.

Signing and canonicalization

The merchant's signature covers a canonicalized form of the checkout payload so that serialization differences cannot change what was signed. Verify against the live spec:

  • the current canonicalization scheme,
  • the permitted signing algorithms,
  • the required JWT header claims (key identification matters — a verifier needs to know which key signed),
  • and how checkout_hash is computed and what it must match.

Do not implement any of the above from memory or from an older sample. Signature verification that is "close enough" is a security defect.

Flow (human-present)

  1. Shopping Agent assembles the intended purchase.
  2. Merchant produces and signs the Checkout object.
  3. Checkout Mandate content is presented to the user on the trusted surface.
  4. User reviews and confirms.
  5. Closed mandate is bound to the transaction and presented to the verifier.
  6. Verifier validates and returns a signed receipt.

For the human-not-present path, the user signs an open mandate at step 3 and the agent later produces the closed mandate — see ap2-human-not-present-flow.

Best Practices

  • Present all line items with individual prices, not just a total. The user is signing what they were shown.
  • Validate the full signature chain — merchant signature, user approval, and key binding — before processing payment. A closed mandate alone proves nothing.
  • Enforce open-mandate constraints at the verifier, independently of the agent.
  • Store the complete signed chain for dispute resolution (see ap2-dispute-accountability).
  • Handle rejection as a first-class path; never force or retry a signature the user declined.
  • Set exp deliberately — an unexpiring checkout authorization is a standing liability.

Related

ap2-agent-authorization (the framework), ap2-payment-mandate (authorizes the payment itself), ap2-vdc-framework (credential formats), ap2-human-present-flow, ap2-human-not-present-flow.

Preguntas frecuentes

¿Qué hace la habilidad de IA Ap2 Checkout Mandate?

Implement the AP2 Checkout Mandate — the credential authorizing completion of a checkout, in its open (constrained) and closed (merchant-verified) forms, with merchant-signed checkout payloads, checkout hashes, and user confirmation on a trusted surface. Formerly called the Cart Mandate. Use when building cart/checkout authorization, signing, and verification.

¿Por qué usar Ap2 Checkout Mandate en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Ap2 Checkout Mandate está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Ap2 Checkout Mandate en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-checkout-mandate. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Ap2 Checkout Mandate?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Ap2 Checkout Mandate?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Ap2 Checkout Mandate con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Ap2 Checkout Mandate?

Sí. OrcaQubits la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇