What AP2 enables
AP2 makes a customer's purchase and payment approval verifiable by the systems involved. Signed mandates record which transaction an agent may perform. Merchants and payment services can compare the submitted action with that approval.
Connections with other protocols
- UCP integrates AP2 into checkout through a mandate extension. Purchase data and the corresponding approval can travel together.
- AP2 is also available as an A2A extension. Verifiable Intent describes a related approach to cryptographically verifiable delegation.
Versions and licence
- Published version
- 0.2.0 ·
- Working draft
- —
v0.2 uses Checkout Mandate and Payment Mandate, each open or closed. Check older terminology against this version.
- Licence / terms
- Apache-2.0
Licence and terms ↗
An example flow
- An agent prepares a purchase and presents the terms to the customer.
- Approval is recorded in the specified checkout and payment mandates.
- The agent submits the order with the corresponding evidence.
- The receiving systems verify the mandates and process the approved purchase.
SDKs and examples
These libraries and examples help you get started. Each entry lists the language, package and supported version.
From the protocol projectPython
AP2 Python reference SDK
Includes: Reference SDK and demos
Package / module: code/sdk/python/ap2
Version & compatibility: Check the repository revision against AP2 0.2.0
Practical integration
- In version 0.2.0 the two records are called Checkout Mandate and Payment Mandate. The first authorises the purchase and the second authorises payment.
- The reference project includes examples with a customer present and purchases delegated in advance.