The situation

A cafe owner wants coffee beans reordered whenever stock runs low, from one of two roasters, at most once a week, without approving each order. The owner is not present when the buys. AP2 v0.2 covers this with its human-not-present mode: the user signs open Checkout and Payment that include the agent’s public key in cnf, and the agent later signs closed mandates with its own key.Source [1, 2]

This scenario is specified, not observed. Production use of AP2 mandates is unverified anywhere, including inside UCP, as of 2026-10-11.Source [3, 4]? unverified One third party self-reported a merchant-side AP2 v0.2 deployment in a GitHub issue on 2026-08-29; nobody has verified it.Source [5] No commit has reached the AP2 main branch since 2026-04-29, and specification work has moved to .Source [3, 6, 7, 8]

Actors

AP2 v0.2 defines five roles: , , Merchant, and .Source [2] Here “MPP” means Merchant Payment Processor, a role unrelated to the Machine Payments Protocol.Source [2, 9]

  • Cafe owner, present only when the open are signed.
  • Trusted Surface, which must be non-agentic.Source [2]
  • Shopping Agent, which is expected to be agentic, holding the key named in cnf.
  • Supplier, the merchant, which signs the checkout.
  • Credential Provider, for example a digital wallet or a payment network.Source [10]
  • Merchant Payment Processor, the supplier’s processor.

Step by step

All steps belong to AP2 v0.2. Catalog and checkout calls belong to the surrounding commerce protocol, which AP2 leaves open and designs to be compatible with UCP.Source [2]

  1. Task (no protocol). The owner states the task and the limits.
  2. Propose open mandates. The open requires vct (mandate.checkout.open.1), constraints and cnf, and its must include checkout.line_items.Source [11] The open requires vct (mandate.payment.open.1), constraints and cnf, and must include payment.reference.Source [12] Here the adds checkout.allowed_merchants, payment.amount_range, payment.agent_recurrence with WEEKLY, payment.budget and payment.allowed_payees.Source [11, 12]
  3. Consent. The shows the limits and authenticates the owner.
  4. Sign and leave. The Trusted Surface signs the open mandates with the user key. AP2 recommends the smallest exp that still lets the agent finish.Source [2]
  5. Shop (commerce protocol). When stock is low, the agent builds a cart with a supplier.
  6. Merchant-signed checkout. The supplier returns checkout_jwt, a merchant-signed JWT of the checkout.Source [13]
  7. Pre-check. All validation must run in deterministic code.Source [2] The agent must not present a new from the same until it receives a rejection receipt for the previous one.Source [2]
  8. Close the mandates with . The closed mandate is a key-binding JWT signed with the agent key named in cnf, and its sd_hash covers the user-signed open mandate it extends.Source [1, 14, 15] transaction_id in the Payment Mandate is the hash of checkout_jwt, which ties payment to this checkout.Source [16]
  9. Present the payment chain. The agent presents only the open-mandate disclosures needed to evaluate the closed mandates.Source [2]
  10. verifies. The verifier processes the chain, checks that the closed mandate keeps every value the open mandate fixed, and evaluates each constraint.Source [14] The budget check adds the requested amount to all earlier closed amounts.Source [17] The token is released only after the final Payment Mandate verifies.Source [18]
  11. Send the checkout chain. The agent sends the token and the open and closed Checkout Mandates to the supplier.
  12. Merchant verifies. The supplier checks that the hash of its checkout JWT matches checkout_hash and evaluates every open constraint.Source [2] A requirement must be matched without reusing an item.Source [19]
  13. Initiate payment. The supplier passes the token and both hashes to its processor.
  14. Processor verifies; . The processor must verify that the is scoped to the checkout, for example by finding the closed Payment Mandate inside it.Source [2] The Payment Receipt requires status, iss, iat, reference and payment_id, plus psp_confirmation_id and network_confirmation_id on success.Source [20]
  15. Checkout Receipt. It requires status, iss, iat and reference, plus order_id on success.Source [20] A receipt’s reference is the hash of the closed mandate, computed like sd_hash.Source [14, 20]
  16. Store and narrow. After a success receipt the agent stores the open mandate, closed mandate and receipt together and narrows the open mandate’s scope.Source [14]

Which protocol does what

StepsProtocolObject or messageSpec version
2 to 4AP2open , cnf, v0.2
5Commerce protocol (for example UCP)cart and checkout callsoutside AP2
6 to 10AP2checkout_jwt, closed mandates (sd_hash, transaction_id), verificationv0.2
11 to 16AP2merchant and processor verification, Checkout and Payment Receiptsv0.2

AP2 v0.2 was released on 2026-04-28.Source [21, 22] Each mandate type carries a vct with a numeric suffix that verifiers must match exactly.Source [2]

Where controls apply

  • Before authorization. Native caps are payment.amount_range and payment.budget; native scoping is checkout.allowed_merchants and payment.allowed_payees.Source [11, 12] A template can refuse wide .Source [12]
  • At signing. A deterministic signer that holds the key, separate from the language model, can refuse overlapping or out-of-budget closed . AP2 requires the rejection receipts it relies on to be integrity protected from the agent’s model.Source [18]
  • At the edge. The supplier’s verification runs before any , and an unknown constraint type always fails.Source [14]
  • At settlement. Recurrence and budget checks need the verifier to track earlier presentations.Source [17] Providers, networks or processors may reject overlapping mandates or invalidate earlier tokens.Source [18]
  • After the fact. Dispute verification recomputes the checkout_jwt hash, checks both receipt references against the closed mandates and verifies both mandates.Source [2] AP2 leaves retention, retrieval and adjudication outside the specification.Source [2]

What is observable from outside

Almost nothing. AP2 defines no public registry, explorer, indexer, event stream or .well-known path of its own.Source [2, 23] and receipts travel only among the , , merchant, processor and network.Source [2] digests are salted and decoys are allowed, so even a verifier sees only the it is shown.Source [18] From outside, a supplier that runs AP2 through UCP is visible only through its profile, which lists the AP2 .Source [24] The card authorization looks like any other card payment.

What can go wrong

  • A fails. The verifier answers unresolved_constraint, which may signal a fallback, while invalid_credential and invalid_mandate are terminal.Source [14] A failing check must come back as a carrying the error.Source [2]
  • The owner is needed after all. A human-not-present flow can turn into a human-present one when a verifier returns unresolved_constraint and the user approves closed .Source [1] There is no step-up in v0.2.Source [1, 14]
  • Double spend. The rejection-receipt rule exists so one cannot approve two checkouts at once.Source [2]
  • Leaked key. AP2 v0.2 defines no way to revoke a mandate before it expires.Source [10, 14] The short exp and the budget are the only bounds.
  • Ambiguous budget. payment.budget types max as a number with no stated unit, and the documentation example uses 1000.00, so the unit is unresolved in v0.2.Source [12, 17] A verifier and an agent that read it differently will disagree.
  • . AP2 assumes it cannot be prevented and treats every model and agent as a potential attacker.Source [18]
  • Who pays for a bad order. AP2 leaves liability to the payment networks.Source [3, 25]

Variants

  • Monthly instead of weekly. payment.agent_recurrence takes MONTHLY or other frequencies with an optional max_occurrences.Source [12] Note that the checkout side has only checkout.allowed_merchants and checkout.line_items, and one ’s line items cannot be split across several checkouts, so how one open serves repeated orders is not spelled out in v0.2.Source [11, 19]
  • Agent provider signs instead of the user. In the model the provider signs with a key the cannot use without the , and verifiers trust a list of providers instead of a user issuer.Source [2, 14]

Flow player: Autonomous restock while the user is away: AP2 v0.2 open mandates, agent-closed mandates, verification and receipts

A cafe owner signs open AP2 v0.2 Checkout and Payment Mandates that limit merchants, items, a per-order amount, a recurrence and a total budget, and bind them to the agent's key. While the owner is away the agent finds a checkout that fits, signs closed mandates with key binding (cnf, sd_hash), and presents them; the Credential Provider, the merchant and the Merchant Payment Processor verify the bindings and return signed receipts. Specified only: production use of AP2 is unverified anywhere as of 2026-10-11.

Spec version: AP2 v0.2 (2026-04-28).

Cafe owner (user)
Shopping Agent
Trusted Surface
Supplier (merchant)
Credential Provider
Merchant Payment Processor

Use the left and right arrow keys to step, space to play or pause, Home and End to jump.

Step 1 of 16Cafe owner (user) to Shopping Agent

Set the standing task

The owner asks the agent to reorder coffee beans from one of two suppliers whenever stock runs low, at most weekly, within a total budget, and then goes away. How the agent learns that stock is low is outside AP2.

Spec: Human Not Present, Phase 1a for step 1 (external link)

Spec version AP2 v0.2 (2026-04-28). Sources: [1], [2], [11], [12], [14], [17], [18], [19], [20]

Step 1 of 16: Cafe owner (user) to Shopping Agent. Set the standing task.

Which protocol owns each step

  • AP2
Steps, owning protocol, control points and outside visibility
StepFrom and toProtocolControl pointObservable from outside
1. Set the standing taskCafe owner (user) to Shopping AgentNot protocol-specificNonePrivate
2. Propose open Checkout and Payment MandatesShopping Agent to Trusted SurfaceAP2 Before authorization: refuse wide constraints (no allowed_merchants, high amount_range, long exp); keep exp as short as the task allows.Private
3. Show the limits, authenticate, get consentTrusted Surface to Cafe owner (user)AP2 Before authorization: the last point at which a human sees the limits; a controls layer can require a second approver for large budgets.Private
4. Return user-signed open mandates; the owner leavesTrusted Surface to Shopping AgentAP2None Private: open mandates stay with the agent until it presents the disclosures a verifier needs.
5. Stock runs low: build a cart (crosses a trust boundary)Shopping Agent to Supplier (merchant)Not protocol-specificNonePrivate
6. Merchant-signed checkout (checkout_jwt); mandate required (crosses a trust boundary)Supplier (merchant) to Shopping AgentAP2NonePrivate
7. Deterministic pre-check before signingShopping Agent to Shopping AgentAP2 At signing: an independent signer service holds the agent key and refuses overlapping or out-of-budget closed mandates.Private
8. Sign closed mandates with the agent key (cnf, sd_hash)Shopping Agent to Shopping AgentAP2NonePrivate
9. Present open and closed Payment Mandates (crosses a trust boundary)Shopping Agent to Credential ProviderAP2None Private: shared only with the Credential Provider and, if it asks, the network.
10. Verify the chain and constraints; issue a payment token (crosses a trust boundary)Credential Provider to Shopping AgentAP2 At settlement: the Credential Provider tracks budget and recurrence, may reject overlapping mandates and may invalidate earlier tokens.Private
11. Send the token and the open and closed Checkout Mandates (crosses a trust boundary)Shopping Agent to Supplier (merchant)AP2NonePrivate
12. Merchant verifies bindings and constraintsSupplier (merchant) to Supplier (merchant)AP2 At the edge: the merchant's deterministic verification decides before any charge.Private
13. Initiate payment with the token and both hashes (crosses a trust boundary)Supplier (merchant) to Merchant Payment ProcessorAP2NonePrivate
14. Processor verifies the Payment Mandates in the token; Payment Receipt (crosses a trust boundary)Merchant Payment Processor to Shopping AgentAP2 At settlement: processor fraud checks and network rules on the card authorization.Private
15. Checkout Receipt with order_id (crosses a trust boundary)Supplier (merchant) to Shopping AgentAP2None Private: receipts are signed JWTs returned to the parties, never published.
16. Store the tuple, add to the budget, narrow the open mandateShopping Agent to Shopping AgentAP2 After the fact: reconcile receipts against the budget; there is no way to revoke an open mandate before exp, so a short exp is the main stop.Private

Sequence diagram: Autonomous restock while the user is away: AP2 v0.2 open mandates, agent-closed mandates, verification and receipts

Diagram loads when it scrolls into view.

Generated from the flow definition (spec version AP2 v0.2, 2026-04-28). The player above uses the same data.

Text alternative

Sequence diagram: Autonomous restock while the user is away: AP2 v0.2 open mandates, agent-closed mandates, verification and receipts. 6 participants: Cafe owner (user), Shopping Agent, Trusted Surface, Supplier (merchant), Credential Provider, and Merchant Payment Processor. 16 steps, 8 crossing a trust boundary, 6 failure branches. Based on several protocols AP2 v0.2 (2026-04-28). Step 1: Cafe owner (user) to Shopping Agent: Set the standing task. Step 2: Shopping Agent to Trusted Surface: Propose open Checkout and Payment Mandates. If A constraint type a verifier does not know is included: Every verifier must treat it as failing, so the mandate can never be used. Step 3: Trusted Surface to Cafe owner (user): Show the limits, authenticate, get consent. Step 4: Trusted Surface to Shopping Agent: Return user-signed open mandates; the owner leaves. Step 5: Shopping Agent to Supplier (merchant): Stock runs low: build a cart. This step crosses a trust boundary. Step 6: Supplier (merchant) to Shopping Agent: Merchant-signed checkout (checkout_jwt); mandate required. This step crosses a trust boundary. Step 7: Shopping Agent to Shopping Agent: Deterministic pre-check before signing. If A previous closed mandate has neither a success nor a rejection receipt: The agent must wait; signing a second checkout would risk a double spend. Step 8: Shopping Agent to Shopping Agent: Sign closed mandates with the agent key (cnf, sd_hash). Step 9: Shopping Agent to Credential Provider: Present open and closed Payment Mandates. This step crosses a trust boundary. Step 10: Credential Provider to Shopping Agent: Verify the chain and constraints; issue a payment token. This step crosses a trust boundary. If Budget exceeded, too soon for the recurrence, or a payee not allowed: Payment Receipt with status Error and unresolved_constraint; the agent may bring the owner back to approve a closed mandate (human present). If The closed mandate is not signed by the key in cnf, or sd_hash does not match: invalid_credential, a terminal error. Step 11: Shopping Agent to Supplier (merchant): Send the token and the open and closed Checkout Mandates. This step crosses a trust boundary. Step 12: Supplier (merchant) to Supplier (merchant): Merchant verifies bindings and constraints. If The merchant is not allowed or a line item cannot be matched: Checkout Receipt with error unresolved_constraint. With that rejection receipt in hand, the agent may present a new closed mandate for a different checkout. Step 13: Supplier (merchant) to Merchant Payment Processor: Initiate payment with the token and both hashes. This step crosses a trust boundary. Step 14: Merchant Payment Processor to Shopping Agent: Processor verifies the Payment Mandates in the token; Payment Receipt. This step crosses a trust boundary. If A binding does not match or the card is declined: Payment Receipt with status Error, error and error_description. Step 15: Supplier (merchant) to Shopping Agent: Checkout Receipt with order_id. This step crosses a trust boundary. Step 16: Shopping Agent to Shopping Agent: Store the tuple, add to the budget, narrow the open mandate.

  1. Step 1: Cafe owner (user) to Shopping Agent: Set the standing task.
  2. Step 2: Shopping Agent to Trusted Surface: Propose open Checkout and Payment Mandates. If A constraint type a verifier does not know is included: Every verifier must treat it as failing, so the mandate can never be used.
  3. Step 3: Trusted Surface to Cafe owner (user): Show the limits, authenticate, get consent.
  4. Step 4: Trusted Surface to Shopping Agent: Return user-signed open mandates; the owner leaves.
  5. Step 5: Shopping Agent to Supplier (merchant): Stock runs low: build a cart. This step crosses a trust boundary.
  6. Step 6: Supplier (merchant) to Shopping Agent: Merchant-signed checkout (checkout_jwt); mandate required. This step crosses a trust boundary.
  7. Step 7: Shopping Agent to Shopping Agent: Deterministic pre-check before signing. If A previous closed mandate has neither a success nor a rejection receipt: The agent must wait; signing a second checkout would risk a double spend.
  8. Step 8: Shopping Agent to Shopping Agent: Sign closed mandates with the agent key (cnf, sd_hash).
  9. Step 9: Shopping Agent to Credential Provider: Present open and closed Payment Mandates. This step crosses a trust boundary.
  10. Step 10: Credential Provider to Shopping Agent: Verify the chain and constraints; issue a payment token. This step crosses a trust boundary. If Budget exceeded, too soon for the recurrence, or a payee not allowed: Payment Receipt with status Error and unresolved_constraint; the agent may bring the owner back to approve a closed mandate (human present). If The closed mandate is not signed by the key in cnf, or sd_hash does not match: invalid_credential, a terminal error.
  11. Step 11: Shopping Agent to Supplier (merchant): Send the token and the open and closed Checkout Mandates. This step crosses a trust boundary.
  12. Step 12: Supplier (merchant) to Supplier (merchant): Merchant verifies bindings and constraints. If The merchant is not allowed or a line item cannot be matched: Checkout Receipt with error unresolved_constraint. With that rejection receipt in hand, the agent may present a new closed mandate for a different checkout.
  13. Step 13: Supplier (merchant) to Merchant Payment Processor: Initiate payment with the token and both hashes. This step crosses a trust boundary.
  14. Step 14: Merchant Payment Processor to Shopping Agent: Processor verifies the Payment Mandates in the token; Payment Receipt. This step crosses a trust boundary. If A binding does not match or the card is declined: Payment Receipt with status Error, error and error_description.
  15. Step 15: Supplier (merchant) to Shopping Agent: Checkout Receipt with order_id. This step crosses a trust boundary.
  16. Step 16: Shopping Agent to Shopping Agent: Store the tuple, add to the budget, narrow the open mandate.

Source of truth: Human Not Present, Phase 1a (external link) Generated from src/content/flows/multi-autonomous-restock.json.

Actors and protocol boundaries

Autonomous restock: actors and protocol boundaries

Diagram loads when it scrolls into view.

AP2 v0.2 in human-not-present mode. The owner approves open mandates once on a Trusted Surface; afterward the agent closes them with its own key and three verifiers check the chain: the Credential Provider for payment and budget, the merchant for the checkout, and the Merchant Payment Processor for the bindings in the token. Checkout and catalog calls belong to the surrounding commerce protocol. Specified only: production use is unverified.

Text alternative

Flowchart. Before the purchase, the cafe owner approves limits on a non-agentic Trusted Surface, which returns user-signed open mandates with allowed merchants, line items, a budget and a recurrence to the Shopping Agent. Later the agent shops with the supplier through a commerce protocol such as UCP and receives a merchant-signed checkout JWT. A deterministic signer holding the agent key named in cnf produces closed mandates as key-binding JWTs with sd_hash. The agent sends the payment chain to the Credential Provider, which verifies it, tracks budget and recurrence and issues a token. The agent sends the token and the checkout chain to the supplier, which verifies the checkout chain and passes the token and hashes to its Merchant Payment Processor. The processor returns a Payment Receipt and the supplier a Checkout Receipt to the agent.

Source of truth: AP2 v0.2 specification, Autonomous (Human Not Present) mode (external link) Generated from src/content/diagrams/multi-autonomous-restock-context.mmd.

All scenarios

Sources

  1. AP2 Flow Examples (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  2. Agentic Payment Protocol (v0.2) specification (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  3. AP2 FAQ (external link)Google (google-agentic-commerce). Documentation, primary source. Published . Accessed .
  4. Beyond the Mandate: A Systematic Security Analysis of the Agent Payments Protocol (AP2) (external link)arXiv. Paper, primary source. Published . Accessed .
  5. Issue 345: Merchant-side AP2 v0.2 implementation report: Suede Agent Studio (external link)GitHub (JasonColapietro). Other. Published . Accessed .
  6. AP2 commit history on main (GitHub commits API) (external link)GitHub. Dataset, primary source. Accessed .
  7. AP2 - Agent Payments Protocol Documentation (external link)Google (google-agentic-commerce). Documentation, primary source. Accessed .
  8. Issue 268: Checkout JWT algorithm constraint forces dual keys under WBA (and conflicts with normative Security and Privacy guidance) (external link)GitHub (igrigorik). Other, primary source. Published . Accessed .
  9. AP2 Glossary (external link)Google (google-agentic-commerce). Documentation, primary source. Published . Accessed .
  10. AP2 Implementation Considerations (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  11. AP2 JSON Schema: Open Checkout Mandate (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  12. AP2 JSON Schema: Open Payment Mandate (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  13. AP2 JSON Schema: Checkout Mandate (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  14. AP2 Agent Authorization (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  15. Delegate SD-JWT (draft-gco-oauth-delegate-sd-jwt-00) (external link)IETF Datatracker (individual draft, G. Oliver). Standard, primary source. Published . Accessed .
  16. AP2 JSON Schema: Payment Mandate (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  17. AP2 Payment Mandate (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  18. AP2 Security and Privacy Considerations (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  19. AP2 Checkout Mandate (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  20. AP2 JSON Schemas: Payment Receipt and Checkout Receipt (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .
  21. AP2 GitHub releases v0.1.0 and v0.2.0 (external link)Google (google-agentic-commerce). Repository, primary source. Published . Accessed .
  22. AP2 CHANGELOG.md (external link)Google (google-agentic-commerce). Repository, primary source. Published . Accessed .
  23. AP2 repository (README, METADATA, LICENSE) at e1ea56d (external link)Google (google-agentic-commerce). Repository, primary source. Published . Accessed .
  24. UCP AP2 Mandates Extension (external link)Universal Commerce Protocol. Specification, primary source. Published . Accessed .
  25. AP2 specification at tag v0.1.0 (external link)Google (google-agentic-commerce). Specification, primary source. Published . Accessed .

Source details

    Loading the index.

    Enter open Esc close ? shortcuts