Ap2 Payment Mandate logo

Ap2 Payment Mandate

Organization
OrcaQubits
ap2-payment-mandate

Implement the AP2 Payment Mandate — the VDC shared with payment networks and issuers to signal AI involvement and user authorization. Use when building payment authorization flows, tokenization, and network integration.

Overview

PublisherOrcaQubits
Repositoryagentic-commerce-skills-plugins
Skill nameap2-payment-mandate
Stars
40
Forks
17
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by OrcaQubits on GitHub. Read the source before you install it.

Installation

Install the Ap2 Payment Mandate AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-payment-mandate
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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-payment-mandate .claude/skills/ap2-payment-mandate
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ap2 Payment Mandate in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ap2 Payment Mandate on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ap2 Payment Mandate is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AP2 Payment Mandate

Before writing code

Fetch live docs:

  1. Fetch https://ap2-protocol.org/ap2/specification/ for the Payment Mandate schema
  2. Web-search site:github.com google-agentic-commerce AP2 payment mandate for type definitions
  3. Web-search site:github.com google-agentic-commerce AP2 src/ap2/types payment for Python types
  4. Fetch https://ap2-protocol.org/overview/ for Payment Mandate conceptual details

Conceptual Architecture

What the Payment Mandate Is

The Payment Mandate is a separate VDC specifically for the payment ecosystem — shared with payment networks (Visa, Mastercard) and issuers (banks). Unlike the Cart/Intent Mandates that focus on purchase authorization, the Payment Mandate provides visibility into the agentic nature of the transaction.

Purpose

The Payment Mandate serves three functions:

  1. Signals AI involvement — Tells the network/issuer that an AI agent initiated this transaction
  2. Signals user presence — Indicates whether the user was present (human-present vs human-not-present)
  3. Provides authorization proof — Includes user-signed authorization for the payment

Who Creates It

The Merchant Payment Processor (MPP) constructs the Payment Mandate from the transaction information after the user has authorized the purchase. The Shopping Agent does not create the Payment Mandate — it is assembled on the MPP side from the payment context.

Payment Mandate Contents

json
{
  "payment_mandate_contents": {
    "payment_mandate_id": "pm_unique_id",
    "payment_details_id": "order_id",
    "payment_details_total": {
      "amount": {
        "currency": "USD",
        "value": "29.99"
      },
      "refund_period": 30
    },
    "payment_response": {
      "request_id": "order_id",
      "method_name": "CARD",
      "details": {
        "token": "dpan_token_xyz"
      },
      "shipping_address": null
    },
    "merchant_agent": "MerchantAgentName",
    "timestamp": "2025-09-01T12:00:00Z"
  },
  "user_authorization": "eyJhbGc..."
}

Key Fields

  • payment_mandate_id — Unique identifier for this payment mandate
  • payment_details_id — Links back to the order/cart
  • payment_details_total — Transaction amount, currency, and refund period
  • payment_response — Selected payment method, tokenized credentials, shipping
  • merchant_agent — Identity of the merchant's agent
  • user_authorization — User's cryptographic signature
  • timestamp — When the mandate was created

How It Flows Through the System

1. User authorizes purchase on trusted device surface
2. Shopping Agent sends Checkout Mandate + user attestation to Merchant
3. Merchant submits payment to Merchant Payment Processor (MPP)
4. MPP constructs the Payment Mandate from the transaction context
5. MPP requests payment credentials from Credentials Provider (CP)
6. CP verifies and performs tokenization (if needed)
7. CP returns credentials to MPP
8. Network/Issuer evaluates the mandate for risk assessment
9. Payment authorized (or challenged)

Payment Method Tokenization

The Payment Mandate includes a tokenized payment method (DPAN — Digitized Primary Account Number):

  • The actual card number is never exposed to the Shopping Agent
  • Credentials Provider handles tokenization
  • The token is bound to the specific transaction
  • Network/Issuer can resolve the token to the real credentials

Relationship to Cart/Intent Mandates

  • Checkout Mandate → authorizes what's being purchased (user → merchant)
  • Intent Mandate → authorizes the shopping scope (user → agent)
  • Payment Mandate → authorizes the payment (user → payment ecosystem)

All three work together: the Cart/Intent Mandate proves the purchase is authorized; the Payment Mandate proves the payment is authorized and provides network visibility.

Refund Period

The refund_period field in the mandate specifies the refund window (in days). This is important for:

  • Dispute resolution timelines
  • Chargeback eligibility
  • Merchant liability assessment

Best Practices

  • Always include a valid user_authorization signature
  • Link the Payment Mandate to the corresponding Cart/Intent Mandate via IDs
  • Include accurate merchant_agent identification
  • Set realistic refund periods aligned with merchant policy
  • Store Payment Mandates for the full refund period for dispute resolution
  • Never expose raw payment credentials to Shopping Agents
  • Validate the payment method token before processing

Fetch the specification for exact Payment Mandate fields, token formats, and network integration requirements before implementing.

Frequently asked questions

What does the Ap2 Payment Mandate AI skill do?

Implement the AP2 Payment Mandate — the VDC shared with payment networks and issuers to signal AI involvement and user authorization. Use when building payment authorization flows, tokenization, and network integration.

Why use Ap2 Payment Mandate on TypingMind?

Because you install it once and use it with any model. Ap2 Payment Mandate is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ap2 Payment Mandate in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-payment-mandate. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Ap2 Payment Mandate?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ap2 Payment Mandate?

As many as you like. As long as a model supports skills, you can use Ap2 Payment Mandate with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ap2 Payment Mandate AI skill free?

Yes. It is published on GitHub by OrcaQubits under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇