AP2
ReadyAgent Payments Protocol — Google
Overview
AP2 is Google's Agent Payments protocol that enables AI agents to transact with service providers within Google's ecosystem. It provides a credential-based payment framework where agents receive budget-capped credentials from their principals (users or organizations) and spend them autonomously across a network of 180+ partner service providers.
How It Works
In the AP2 model, a "principal" (the user or organization controlling the agent) issues credentials to the agent with embedded spending limits, time constraints, and scope restrictions. When the agent needs to pay for a service, it presents these credentials to the service provider. The provider verifies the credentials with Google's AP2 infrastructure, processes the request, and charges the principal's account.
AP2 supports delegated authority chains — Agent A can delegate a portion of its budget to Agent B, which can further delegate to Agent C. Each delegation narrows the spending scope, creating a tree of constrained budgets that prevents runaway spending.
The protocol integrates with Google Pay for consumer-facing payments and Google Cloud Billing for enterprise accounts, giving it access to Google's existing payment infrastructure and compliance framework.
How SettleGrid Integrates
SettleGrid acts as an AP2 credentials provider. When a Google-ecosystem agent presents AP2 credentials, SettleGrid validates them against Google's AP2 infrastructure, checks the embedded budget cap, executes your tool, and records the charge. Developers do not need to implement any AP2-specific logic — the SettleGrid protocol adapter handles credential verification, budget checking, and settlement transparently.
Key Specs
| Protocol | AP2 — Agent Payments Protocol |
| Backer | |
| Detection Header | Authorization: AP2 <credential> |
| Identity Type | ap2-credential |
| Payment Type | delegated-budget |
| Status | Ready |
Code Example
Here is how a developer's tool works with AP2 via SettleGrid:
import { settlegrid } from '@settlegrid/mcp'
const sg = settlegrid.init({
toolSlug: 'document-analysis',
pricing: { defaultCostCents: 15 },
// AP2 credentials are validated automatically
// Google agents pay via delegated budgets
})
const analyze = sg.wrap(async (args: { documentUrl: string }) => {
const summary = await analyzeDocument(args.documentUrl)
return { content: [{ type: 'text', text: summary }] }
}, { method: 'analyze-document' })Start monetizing with SettleGrid
Free forever — 50,000 ops/month, progressive take rate. Add billing to your AP2 tool in under 5 minutes.
Get Started Free