Protocol Integration
AP2 Integration
Agent Payments Protocol integration via mandate metadata.
This section is advisory.
AP2 (Agent Payments Protocol) mandates — Cart, Intent, and Payment — support metadata fields where the legal context reference can be included.
Mandate Metadata
{
"legalContext": {
"type": "sha256",
"value": "0x7f83b165..."
}
}The legalContext object is included in the mandate metadata at each phase of the AP2 flow.
Integration Flow
| AP2 Phase | Legal Context Role |
|---|---|
| Cart | Terms reference included — agent can verify before proceeding |
| Intent | Terms hash confirmed — binding the intent to specific terms |
| Payment | Terms hash in receipt — confirmation of what was agreed |
The legal context reference travels through all three phases, providing consistency from discovery through payment.