Skip to main content
UCP Integration Banner

What is UCP?

Universal Commerce Protocol (UCP) is an open standard that creates a common language between platforms, AI agents, and businesses. It standardizes the entire commerce lifecycle — from product discovery through checkout to post-purchase support — so the ecosystem can interoperate through one protocol, without custom builds for every connection. Before UCP, every AI agent that wanted to buy something from a store needed a custom integration for that specific store. With UCP, any agent can transact with any merchant that implements the protocol — the same way HTTP lets any browser talk to any website.
UCP was co-developed by Google, Shopify, Etsy, Wayfair, Target, and Walmart, and endorsed by over 30 companies including Stripe, Visa, Mastercard, PayPal, Klarna, Best Buy, Sephora, and more. It is built on industry standards — REST and JSON-RPC transports with Agent Payments Protocol (AP2), Agent2Agent (A2A), and Model Context Protocol (MCP) support built-in.

How It Works

A UCP transaction follows a clear lifecycle:
  1. Discovery — The agent hits /.well-known/ucp on the merchant domain to learn what’s supported (products, payment handlers, shipping methods).
  2. Checkout — The agent creates a checkout session, adds items, applies discounts, sets shipping, and selects fulfillment options — all through standardized REST endpoints.
  3. Payment — The agent completes the purchase using the merchant’s supported payment handlers with cryptographic proof of user consent.
  4. Order Management — After purchase, the agent tracks shipment, receives webhook updates, and can initiate returns or refunds.

Core Capabilities

Checkout

Create and manage checkout sessions with support for complex cart logic, dynamic pricing, tax calculations, and discount codes across any UCP merchant.

Identity Linking

OAuth 2.0–based account connections let agents access loyalty programs, saved addresses, and order history without sharing credentials.

Order Management

Track orders, receive real-time webhook updates on shipment status, and handle returns and refunds through standardized endpoints.

Demo: Shopify Store via UCP

An Upsonic agent browsing a Shopify store, adding items to cart, and completing checkout — entirely through UCP:

Upsonic’s UCP Python Client

Upsonic maintains ucp-client — a Python client library that wraps the UCP protocol into LLM-friendly tools your agents can call directly.

Quick Start

Use with Upsonic Agent

Pass the UCPAgentTools instance directly to an Upsonic Agent with add_tools — all UCP methods become available as agent tools automatically:

Available Tools

Local Mock Server

Spin up a local UCP-compliant mock server for development and testing:
This starts a fully functional UCP endpoint at http://localhost:8182 with a product catalog, checkout sessions, mock payment processing, and order tracking. Use "success_token" as the payment_token to simulate a successful payment.

Why UCP Matters for AI Agents


Resources

UCP Shopping Agent Example

Complete Upsonic agent that browses, carts, and checks out through UCP — with Streamlit UI.

ucp-client on GitHub

Python client library with LLM-friendly tools and a built-in mock server.

UCP Specification

Full protocol spec — checkout flows, identity linking, order management, and payment handlers.

Awesome UCP

Curated list of UCP resources, tools, and implementations from the community.