Logo vun Ap2 Payment Mandate

Ap2 Payment Mandate

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

Iwwersiicht

EditeurOrcaQubits
Repositoryagentic-commerce-skills-plugins
Skill-Nummap2-payment-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 Payment 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-payment-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-payment-mandate .claude/skills/ap2-payment-mandate
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Ap2 Payment 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 Payment 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 Payment 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 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.

Heefeg gestallte Froen

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

Firwat Ap2 Payment Mandate op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Ap2 Payment 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 Payment 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-payment-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 Payment 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 Payment Mandate benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Ap2 Payment 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 Payment 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 👇