Logo vun Ap2 Checkout Mandate

Ap2 Checkout Mandate

Organisatioun
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.

Iwwersiicht

EditeurOrcaQubits
Repositoryagentic-commerce-skills-plugins
Skill-Nummap2-checkout-mandate
Stären
40
Forks
17
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum OrcaQubits op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Ap2 Checkout Mandate an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-checkout-mandate
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Ap2 Checkout Mandate an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Ap2 Checkout Mandate automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Ap2 Checkout Mandate net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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.

Firwat Ap2 Checkout Mandate op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Ap2 Checkout Mandate besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Ap2 Checkout Mandate an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-checkout-mandate an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Ap2 Checkout Mandate benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Ap2 Checkout Mandate benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Ap2 Checkout Mandate domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Ap2 Checkout Mandate gratis?

Jo. De Skill gëtt vum OrcaQubits ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇