LCPLegal Context Protocol

ACP Integration

Agentic Commerce Protocol — session metadata is the conformant carrier; a top-level field is not available even when declared.

This section is advisory and non-prescriptive. It describes what the host protocol permits, read from its own primary artifact. Where this page and the host protocol disagree, the host is correct — build from its schema, not from an example here.


What it is. An open-source specification for agent-driven commerce checkout, with a formal extensions mechanism.

Tier A — Available today. ACP checkout-session metadata accepts arbitrary keys (additionalProperties: true, described "Arbitrary metadata for merchant use"). A legalContext entry placed inside session metadata is the conformant placement and needs no coordination. The same open metadata object is declared on CheckoutSessionCreateRequest, so the reference can be supplied at session creation as well as returned on the session.

Why not a top-level field, even a declared one. ACP's extensions framework admits third-party extensions under reverse-domain identifiers without upstream coordination, and an extension is declared with the schema fields it adds. That declaration does not make a new top-level field valid. CheckoutSessionBase is additionalProperties: false, and CheckoutSession is allOf: [CheckoutSessionBase] with no properties of its own, so a session carrying an undeclared top-level key fails validation against the released schema. ACP's own core discount extension works because discounts is already a declared property of CheckoutSessionBase. Implementers should know the host is inconsistent here: ACP's rendered documentation says extensions MAY add new optional fields, and the released JSON Schema says they may not. This appendix follows the schema, because the schema is what a validator runs. (The checkout links array uses a closed type enum — terms_of_use, privacy_policy, return_policy, and five others — so it cannot carry a custom legal_context link without upstream registration.)

{
  "links": [
    { "type": "terms_of_use", "url": "https://example.com/terms.md" }
  ],
  "metadata": {
    "legalContext": {
      "type": "sha256",
      "value": "0x7f83b165..."
    }
  }
}

Tier B — Forward work. A formal Specification Enhancement Proposal registering legalContext as a first-class extension would give parsers a standardized handling across implementations.

Limitations. Without upstream registration, parsers must fall back to per-implementation conventions. ACP's links array does expose terms URLs (via the built-in terms_of_use / privacy_policy types — the basis for ACP's "URLs only" entry in Appendix D), but those links carry no hash-verified integrity guarantee, which is why the atrHash rides in metadata.

Steward invitation. The ACP working group is invited to register legalContext as a first-class extension and publish guidance on integrity-bearing fields in checkout responses.