The problem
How it works
Google announced the Agent Payments Protocol as an open, payment-agnostic extension for the Agent2Agent protocol that also works alongside MCP. It records a user's instructions as cryptographically signed mandates. When the user is present, they approve a specific cart, which produces a cart mandate. For delegated purchases, the user signs a detailed intent mandate with limits such as price and timing up front, and the agent creates the cart mandate when the conditions are met. The GitHub repository holds the specification, an SDK and sample scenarios in Python, Go and Android.
Results and limitations
This is a protocol announcement and code samples, not a reported deployment. Google says it is working with more than 60 organisations, naming companies such as Mastercard, PayPal, American Express and Adyen. The repository describes its contents as samples and demos, and says a PyPI package will come later.
Before you try it
Use the samples only with test credentials and sandbox payment methods, and keep a person approving every real purchase until you trust the limits in your intent mandates. A signed mandate shows what was approved, not that the item, price or merchant is right, so checking those stays with you. The samples use Google's Agent Development Kit and a Gemini API key or Vertex AI, though the protocol itself does not require them. Results depend on your setup and were not independently reproduced by Top 200 Repos.
Tools and repositories
No ranked repository is involved. This use case still stands on its own source.
- Tools
- AP2 SDK and samples · Google ADK with a Gemini API key or Vertex AI (for the samples) · Python 3.11 and uv
- Prerequisites
- Python 3.11 or later with uv, and a Google AI Studio key or Vertex AI project to run the samples.
Try it yourself: Design the approval rules for an agent purchase
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
I am prototyping an AP2 shopping agent for [Kind of store] using test data only. Help me draft the intent mandate fields for this request: [What the user wants]. Include a maximum total of [Spending limit], allowed merchants, an expiry time and the conditions under which the agent may build a cart. Then describe the human-present flow where I see the exact cart and approve it before any payment step. List what the agent must refuse to do without a fresh approval, such as changing the merchant, exceeding the limit or adding items. Do not use real card numbers or credentials in any example.Keep prototypes on sandbox payment methods and review the mandate limits with whoever owns payments.
Sources
- Announcing Agent Payments Protocol (AP2) (opens in a new tab)
Vendor post · cloud.google.com · Published 16 Sept 2025 · Source checked 12 Nov 2026, 03:31 UTC
What this source supports
- AP2 is an open protocol for agent-led payments that can extend A2A and MCP and is payment-agnostic
- Addresses authorisation, authenticity and accountability for agent purchases
- Intent mandates and cart mandates are signed with verifiable credentials and form an audit trail
- Supports human-present approval of a cart and delegated purchases under pre-signed limits
- Developed with more than 60 organisations, including Mastercard, PayPal, American Express and Adyen
- google-agentic-commerce/AP2 README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 12 Nov 2026, 03:31 UTC
What this source supports
- Repository holds the specification, a Python SDK and samples in Python, Go and Android
- Samples use Google ADK and Gemini with a Google API key or Vertex AI; the protocol does not require them
- Scenarios run from a run.sh script; requires Python 3.11+ and uv
- Describes its contents as code samples and demos; PyPI package to follow; Apache-2.0 licence