DEV Community

Cover image for What is UCP? The Universal Commerce Protocol Explained for Developers
Peter
Peter

Posted on • Originally published at ucptools.dev

What is UCP? The Universal Commerce Protocol Explained for Developers

TL;DR

UCP (Universal Commerce Protocol) is an open standard that lets AI shopping agents like ChatGPT, Google AI Mode, and Microsoft Copilot discover and purchase from e-commerce stores. Think of it as robots.txt for commerce - a simple JSON file at /.well-known/ucp that tells AI agents how to shop on your store.


The Problem: AI Can't Shop (Yet)

AI assistants are becoming the new way people discover and buy products. ChatGPT can now complete purchases. Google AI Mode is launching with shopping capabilities. Microsoft Copilot can checkout on your behalf.

But here's the challenge: AI agents can't easily interact with most online stores.

Without a standard protocol, each AI platform would need custom integrations with every e-commerce site. That doesn't scale. Stores miss out on AI-driven traffic. Users get frustrated when their AI assistant can't complete a simple purchase.

Enter UCP

The Universal Commerce Protocol solves this by providing a standardized way for AI agents to:

  1. Discover your store's capabilities
  2. Browse your product catalog
  3. Complete purchases programmatically

Who's Behind It?

UCP was developed by Google and Shopify, announced at NRF 2026. It's backed by 25+ major companies:

  • Walmart, Target, Best Buy, Home Depot
  • Stripe, PayPal, Visa, Mastercard
  • Etsy, Wayfair, and more

This isn't a side project - it's an industry standard with serious backing.


How UCP Works

UCP is elegantly simple. Merchants publish a JSON file at a well-known location:

https://yourstore.com/.well-known/ucp
Enter fullscreen mode Exit fullscreen mode

This file contains:

{
  "ucp": {
    "version": "2026-01-15",
    "namespace": "https://yourstore.com",
    "capabilities": [
      {
        "type": "checkout",
        "endpoint": "https://yourstore.com/api/ucp/checkout",
        "version": "1.0"
      },
      {
        "type": "catalog",
        "endpoint": "https://yourstore.com/api/ucp/catalog",
        "version": "1.0"
      }
    ],
    "authentication": {
      "type": "oauth2",
      "authorization_url": "https://yourstore.com/oauth/authorize"
    },
    "signing_keys": [
      {
        "kid": "key-1",
        "kty": "OKP",
        "crv": "Ed25519",
        "x": "..."
      }
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

Key Components

Field Purpose
version UCP spec version (date format: YYYY-MM-DD)
namespace Your store's origin (must match hosting domain)
capabilities What your store supports (checkout, catalog, orders)
authentication How AI agents authenticate
signing_keys Ed25519 keys for request verification

UCP vs Schema.org

If you're already using Schema.org structured data, you might wonder: do I need UCP too?

Yes. They serve different purposes:

Schema.org UCP
Purpose Help search engines understand content Enable AI agents to transact
Capability Read-only (display rich snippets) Read-write (complete purchases)
Output Better search results AI-powered sales

Think of Schema.org as "read access" and UCP as "read-write access" for AI.

Most stores should use both:

  • Schema.org for SEO and rich snippets
  • UCP for AI commerce capabilities

Platform Support

Native Support

Shopify has native UCP built-in via Checkout Kit. Most Shopify stores have UCP enabled automatically.

Check yours:

curl https://yourstore.myshopify.com/.well-known/ucp
Enter fullscreen mode Exit fullscreen mode

Requires Implementation

Other platforms need manual setup or plugins:

  • WooCommerce - Plugin available, custom implementation possible
  • Magento - Custom module required
  • BigCommerce - API-based implementation
  • Wix - Velo custom code
  • Squarespace - Limited (code injection + external hosting)

Quick Implementation Guide

Step 1: Generate Your UCP Profile

You can generate a valid UCP profile using free tools like UCP.tools:

  1. Enter your store URL
  2. Configure capabilities
  3. Download the generated JSON

Step 2: Host the File

Place the file at /.well-known/ucp on your domain. The exact method depends on your platform:

Static hosting / Custom backend:

# Create directory
mkdir -p .well-known

# Add your ucp.json
mv ucp.json .well-known/ucp

# Ensure proper MIME type (application/json)
Enter fullscreen mode Exit fullscreen mode

Nginx config:

location /.well-known/ucp {
    default_type application/json;
    alias /var/www/html/.well-known/ucp;
    add_header Access-Control-Allow-Origin *;
}
Enter fullscreen mode Exit fullscreen mode

Step 3: Validate

Check your implementation:

# Should return your UCP profile
curl -I https://yourstore.com/.well-known/ucp

# Validate the response
curl https://yourstore.com/.well-known/ucp | python -m json.tool
Enter fullscreen mode Exit fullscreen mode

Or use an online validator like UCP.tools Validator.


Common Validation Errors

Error Cause Fix
UCP_MISSING_ROOT No ucp object in JSON Wrap content in {"ucp": {...}}
UCP_NS_ORIGIN_MISMATCH Namespace doesn't match domain Set namespace to your exact origin
UCP_ENDPOINT_NOT_HTTPS HTTP endpoints Use HTTPS for all endpoints
UCP_MISSING_SIGNING_KEYS No signing keys Generate Ed25519 keypair

Why This Matters Now

The AI commerce market is growing fast:

  • $20.9 billion in AI-assisted purchases expected in 2026
  • ChatGPT checkout is live with Target, Walmart, Etsy
  • Google AI Mode launching with UCP integration
  • Microsoft Copilot auto-enrolling Shopify stores

Stores without UCP will be invisible to AI shopping agents. When a user asks ChatGPT to "find me a blue widget under $50", your store won't be in the running if you don't have UCP.


Resources


What's Next?

  1. Check your current status - Visit yourstore.com/.well-known/ucp
  2. Validate - Use a validator to check for issues
  3. Implement - Follow platform-specific guides
  4. Test - Simulate AI agent interactions

The AI commerce revolution is here. The question isn't whether to implement UCP - it's how fast you can do it.


Have questions about UCP implementation? Drop a comment below or check out the platform-specific guides.


Disclaimer: UCP (Universal Commerce Protocol) is an open standard developed by Google and Shopify. UCP.tools is an independent, community-built validation tool - not affiliated with Google, Shopify, or the official UCP project.

Top comments (0)