Ap2 Checkout Mandateのロゴ

Ap2 Checkout Mandate

組織
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.

概要

公開者OrcaQubits
リポジトリagentic-commerce-skills-plugins
スキル名ap2-checkout-mandate
スター
40
フォーク
17
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    OrcaQubitsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Ap2 Checkout Mandate」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-checkout-mandate
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAp2 Checkout Mandateを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAp2 Checkout Mandateを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Ap2 Checkout Mandateは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

よくある質問

AIスキル「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.

TypingMindでAp2 Checkout Mandateを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Ap2 Checkout Mandateはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAp2 Checkout Mandateをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-checkout-mandateを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Ap2 Checkout Mandateを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Ap2 Checkout Mandateで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAp2 Checkout Mandateを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Ap2 Checkout Mandate」は無料ですか?

はい。OrcaQubitsがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇