Order questions and in-policy returns are settled in the chat, and every case that needs judgment reaches a person with the evidence attached.
AP2 Shopping Agents with a Mandate Ledger
Show who authorized an agent-led purchase, and prove it later, from stated intent to payment.
Shopping, merchant, and auditor agents trade signed mandates over A2A, and every step lands in a ledger nobody can edit.
Turns a shopper's request into signed mandates, negotiates the cart with a merchant agent, and binds payment to the agreed cart.
- Built by
- MongoDB Industry Solutions
- Contributed by
- MongoDB (Built the reference implementation and the ledger data layer)
- Industry
- Retail
- Audience
- B2C
Why this exists
When an AI agent starts a payment for a customer, the usual assumptions of commerce stop holding. A payment system cannot confirm that the customer authorized this purchase, that the request reflects what the customer actually wanted rather than an error, or who is accountable if it goes wrong: the customer, the agent's developer, the merchant, or the issuer.
Read more
Google's Agent Payments Protocol (AP2) answers with signed, tamper-evident mandates. A protocol alone does not help a retailer, though. Someone has to store those mandates, make sure they cannot be edited, and keep the chain reconstructable for disputes and audits.
What this demonstrates
- A full AP2 mandate chain stored as immutable records, with the agreed cart signed by both the shopping agent and the merchant agent.
- Updates and deletes are blocked; a change of state is written as a new versioned record, never as an edit.
- Role-based access by agent type, and idempotency keys so a network retry cannot charge the shopper twice.
Read more
- A read-only auditor agent can verify the whole chain without touching production data.
What you would add to ship it
- Connect a real credentials provider and payment processor in place of the sample credentials.
Architecture
The agents talk over the A2A protocol and follow the AP2 role model: a shopping agent that talks to the customer and signs mandates, a merchant agent that presents inventory and negotiates, a credentials provider that returns payment tokens rather than card numbers, a merchant payment processor, and a read-only auditor agent.
Read more
Between the merchant agent and the database sits the Mandate Ledger Service. Each request passes authentication by agent role, then validation, concurrency control, idempotency, and immutability checks, and schema validation in MongoDB Atlas blocks any update or delete.
Every transaction leaves a chain. The shopping agent signs an Intent Mandate. The merchant proposes a Cart Mandate, which is co-signed when the customer accepts and stored as a new version. A Payment Mandate then binds the agreed cart to a payment token, hashed to the accepted cart so the token cannot be replayed against another transaction.
All three mandate types live in one collection, alongside payment records, API keys, a 90-day audit log, and 24-hour idempotency records.
Resources
Take the code
This one is published in full. Read it, run it, fork it. Nothing here is behind a conversation.
Request an intro
MongoDB is behind this solution. Ask about keeping an auditable record of agent-led purchases, and the MACH Alliance will put you in touch with the person who can answer.
Not ready to talk to anyone? MACH Insider is the Alliance mailing list. New solutions, program openings, and the research behind them, once a month.
Everyone credited on this solution
- MongoDBBuilt the reference implementation and the ledger data layer
Every organization named here has a page listing the rest of its work on the Hub.
Related solutions
- Solution Studio

A merchant payment journey is assessed end to end with evidence, and without a questionnaire.
SPARk Payment Journey Assessment Agent

Gift shoppers who cannot phrase a keyword search get a curated recommendation out of a conversation instead.
Kate Spade AI Gift Concierge
Published case study
The detail on this page is drawn from a case study published by the contributor or the MACH Alliance. Any figures on this page are the ones that case study states.
What this page does not establish
- The agents are adapted from Google's public AP2 and A2A samples rather than written from scratch.
- The demo uses sample payment credentials, not live payment rails.
- No retailer runs this ledger in production yet.
Where this came from
Written from MongoDB's Solutions Library page, public repository, and blog post on the mandate ledger, and the write-up MongoDB sent the MACH Alliance in October 2026.
Built something worth showing?
Put your agentic solution in front of the enterprise leaders who use the hub to decide what to build next. Submissions are open to MACH Alliance Members, Collaborators, or Ambassadors.

