← Articles

UCP: Extending Discount Capability to Cart

UCP Commerce Capability March 10, 2026 · Ilya Grigorik

Source: PR #246

The Change

Ilya Grigorik opens PR #246 to extend UCP's discount capability from checkout-only to also support cart operations. The change adds dev.ucp.shopping.cart extension to the discount schema, updates discovery examples, and introduces a cart-to-checkout continuity requirement for discount codes.

Author Context

Ilya Grigorik is a principal engineer at Google and the primary architect behind UCP. His background includes extensive work on web performance (co-authored QUIC papers, led Chrome's performance team) and, more recently, defining how AI agents interact with commerce systems. He's been driving the UCP specification since its public unveiling in late 2025.

Why This Matters

The original discount capability landed with checkout support only — a reasonable MVP scope. But real-world shopping experiences show discounts earlier: "Apply code SAVE20" appears on cart pages, not just at checkout. This gap created a UX mismatch for AI agents trying to replicate natural shopping flows.

The fix addresses this in three ways:

Technical Details

The change is backwards compatible. Businesses that don't support cart discounts simply don't advertise the extension. The extends mechanism (already used elsewhere in UCP) lets capabilities opt-in to supporting additional operations.

The continuity requirement is the subtle-but-important piece: if an agent applies "SAVE20" to a cart, and the user proceeds to checkout, the discount code must persist. This prevents frustrating scenarios where users lose their discount mid-flow.

Capability Composition

UCP's extends pattern lets capabilities layer functionality without breaking existing implementations. A discount capability that only supports checkout continues working; adding cart support is additive.

The Pattern

This PR exemplifies healthy protocol evolution: the discount capability shipped, implementations provided feedback ("we need cart support"), and the spec adapts. The backwards-compatible approach means existing integrations don't break.

Compare this to the catalog capabilities PR from two days ago — UCP is filling in the practical gaps that emerge when AI agents actually try to shop.

Related Changes This Week

UCP has been busy with capability refinements:

The theme: making the cart→checkout flow robust for AI agents.

Implications for Implementers

If you're building UCP-compatible commerce:

Links