UCP Buyer Consent Extension
Before writing code
Fetch live docs:
- Fetch
https://ucp.dev/latest/specification/shopping/extensions/buyer-consent/ for the canonical Buyer Consent extension spec
- Web-search
site:ucp.dev buyer consent for related pages and examples
- Web-search
site:github.com Universal-Commerce-Protocol buyer consent for SDK support and samples
- Fetch
https://ucp.dev/latest/specification/overview/ for how extensions integrate with the core spec
Conceptual Architecture
What Buyer Consent Does
The Buyer Consent extension adds privacy-compliant consent collection to UCP checkout sessions. It enables merchants to collect and record buyer consent for data processing, marketing, and terms acceptance — satisfying GDPR, CCPA, and other privacy regulations.
Why It Exists
Agentic commerce introduces a new challenge: an AI agent acts on behalf of the buyer. Regulations require explicit, informed consent for data processing. This extension standardizes how consent is requested, granted, and recorded across the UCP protocol.
Extension Identity
- Layer: Extension (composable add-on to the Checkout capability)
- Parent capability: Checkout
- Discovery: Negotiated via
capabilities.extensions[] like all UCP extensions
Key Concepts
- Consent fields — The spec defines exactly four boolean consent fields:
analytics — consent for analytics/measurement data collection
preferences — consent for personalization and preference storage
marketing — consent for marketing communications
sale_of_data — consent for sale/sharing of personal data
- Consent values — Each field is a simple boolean (
true/false). There is no status enum.
- All fields are optional — The protocol communicates consent declaratively; it does not enforce compliance
How It Works in Checkout
- Merchant declares consent fields — In the checkout session response, the merchant includes consent fields it wants to collect
- Agent presents consent to buyer — The agent shows consent requests to the human buyer (this is a human-in-the-loop step)
- Buyer sets consent values — The buyer decides true/false for each consent field
- Agent submits consent — In the next session update, the agent includes the buyer's consent boolean values
- Consent communicated — The protocol communicates consent declaratively; it does not enforce compliance. Merchants are responsible for their own compliance logic
Interaction with Checkout Status
All consent fields are optional booleans. The protocol does not define consent as blocking checkout. Merchants may choose to enforce consent requirements in their own business logic, but the UCP spec itself does not mandate that missing consent prevents checkout completion.
Privacy Regulations Addressed
| Regulation |
Requirement |
How Buyer Consent Helps |
| GDPR (EU) |
Explicit consent for data processing |
Structured consent collection with audit trail |
| CCPA (California) |
Right to know, right to opt-out |
Consent types for data collection and sale |
| LGPD (Brazil) |
Legal basis for processing |
Consent as legal basis documentation |
| PIPEDA (Canada) |
Meaningful consent |
Human-readable consent text |
Extension Negotiation
Like all UCP extensions:
- Platform includes
buyer_consent in capabilities.extensions[]
- Business confirms support in the response
- If not negotiated, consent fields are absent from the session
Use Cases
- E-commerce checkout with GDPR-required consent (analytics, marketing, sale_of_data)
- Marketing opt-in collection during purchase (marketing field)
- Personalization preferences during checkout (preferences field)
- Data sharing consent for third-party fulfillment (sale_of_data field)
Best Practices
- Always collect consent from the human buyer, never auto-grant via the agent
- Store consent records with timestamps for audit compliance (your application should track this; the protocol does not include a consent_timestamp field)
- Make consent context clear, specific, and in the buyer's language
- The protocol communicates consent declaratively; it does not enforce compliance. Your application is responsible for enforcement logic.
- Support consent withdrawal post-purchase (per GDPR Article 7)
- Test with different regulation scenarios (EU buyer, US buyer, etc.)
Fetch the Buyer Consent extension specification for exact field names, consent type enumerations, and schema structure before implementing.
1---2name: ucp-buyer-consent-23description: Implement the UCP Buyer Consent extension — GDPR/CCPA consent collection, consent fields in checkout sessions, and privacy-compliant consent management. Use when adding consent flows, privacy compliance, or data processing agreements to UCP checkout.4allowed-tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch5metadata:6 source: https://skillmd.com/skills/orcaqubits/ucp-buyer-consent-27---89# UCP Buyer Consent Extension1011## Before writing code1213**Fetch live docs**:141. Fetch `https://ucp.dev/latest/specification/shopping/extensions/buyer-consent/` for the canonical Buyer Consent extension spec152. Web-search `site:ucp.dev buyer consent` for related pages and examples163. Web-search `site:github.com Universal-Commerce-Protocol buyer consent` for SDK support and samples174. Fetch `https://ucp.dev/latest/specification/overview/` for how extensions integrate with the core spec1819## Conceptual Architecture2021### What Buyer Consent Does2223The Buyer Consent extension adds **privacy-compliant consent collection** to UCP checkout sessions. It enables merchants to collect and record buyer consent for data processing, marketing, and terms acceptance — satisfying GDPR, CCPA, and other privacy regulations.2425### Why It Exists2627Agentic commerce introduces a new challenge: an AI agent acts on behalf of the buyer. Regulations require explicit, informed consent for data processing. This extension standardizes how consent is requested, granted, and recorded across the UCP protocol.2829### Extension Identity3031- **Layer**: Extension (composable add-on to the Checkout capability)32- **Parent capability**: Checkout33- **Discovery**: Negotiated via `capabilities.extensions[]` like all UCP extensions3435### Key Concepts3637- **Consent fields** — The spec defines exactly four boolean consent fields:38 - `analytics` — consent for analytics/measurement data collection39 - `preferences` — consent for personalization and preference storage40 - `marketing` — consent for marketing communications41 - `sale_of_data` — consent for sale/sharing of personal data42- **Consent values** — Each field is a simple **boolean** (`true`/`false`). There is no status enum.43- **All fields are optional** — The protocol communicates consent declaratively; it does not enforce compliance4445### How It Works in Checkout46471. **Merchant declares consent fields** — In the checkout session response, the merchant includes consent fields it wants to collect482. **Agent presents consent to buyer** — The agent shows consent requests to the human buyer (this is a human-in-the-loop step)493. **Buyer sets consent values** — The buyer decides true/false for each consent field504. **Agent submits consent** — In the next session update, the agent includes the buyer's consent boolean values515. **Consent communicated** — The protocol communicates consent declaratively; it does not enforce compliance. Merchants are responsible for their own compliance logic5253### Interaction with Checkout Status5455All consent fields are optional booleans. The protocol does not define consent as blocking checkout. Merchants may choose to enforce consent requirements in their own business logic, but the UCP spec itself does not mandate that missing consent prevents checkout completion.5657### Privacy Regulations Addressed5859| Regulation | Requirement | How Buyer Consent Helps |60|-----------|-------------|------------------------|61| **GDPR** (EU) | Explicit consent for data processing | Structured consent collection with audit trail |62| **CCPA** (California) | Right to know, right to opt-out | Consent types for data collection and sale |63| **LGPD** (Brazil) | Legal basis for processing | Consent as legal basis documentation |64| **PIPEDA** (Canada) | Meaningful consent | Human-readable consent text |6566### Extension Negotiation6768Like all UCP extensions:691. Platform includes `buyer_consent` in `capabilities.extensions[]`702. Business confirms support in the response713. If not negotiated, consent fields are absent from the session7273### Use Cases7475- E-commerce checkout with GDPR-required consent (analytics, marketing, sale_of_data)76- Marketing opt-in collection during purchase (marketing field)77- Personalization preferences during checkout (preferences field)78- Data sharing consent for third-party fulfillment (sale_of_data field)7980### Best Practices8182- Always collect consent from the human buyer, never auto-grant via the agent83- Store consent records with timestamps for audit compliance (your application should track this; the protocol does not include a consent_timestamp field)84- Make consent context clear, specific, and in the buyer's language85- The protocol communicates consent declaratively; it does not enforce compliance. Your application is responsible for enforcement logic.86- Support consent withdrawal post-purchase (per GDPR Article 7)87- Test with different regulation scenarios (EU buyer, US buyer, etc.)8889Fetch the Buyer Consent extension specification for exact field names, consent type enumerations, and schema structure before implementing.