Examples

Explore real-world examples of UCP integrations for e-commerce, payments, and product management. Each example demonstrates production-ready patterns.

Commerce
Production Ready
Open Source
Product Catalog Sync
Synchronize product data with Google Shopping and marketplaces
Next.js
Schema.org

A comprehensive example showing how to sync your product catalog with Google Merchant Center and other UCP-compatible platforms. Includes real-time inventory updates and pricing.

Features

  • • Real-time inventory sync
  • • Multi-currency pricing
  • • Schema.org Product markup
  • • Automatic feed generation

Tech Stack

  • • Next.js 14
  • • UCP Handler
  • • TypeScript
  • • Zod Validation
// Example: Product catalog sync
commerce.product(
  "sync_products",
  "Sync all products to UCP",
  { limit: z.number().optional() },
  async ({ limit = 100 }) => {
    const products = await db.products.findMany({ take: limit });
    return {
      content: products.map(p => ({
        type: "product",
        data: toSchemaOrgProduct(p),
        schema: "https://schema.org/Product"
      }))
    };
  }
);
Unified Payments
Single integration for Stripe, PayPal, and Google Pay
Payments
PCI Compliant

A unified payment integration that works with multiple providers through UCP's standardized payment interface. Supports subscriptions, one-time payments, and refunds.

Features

  • • Multi-provider support
  • • Subscription management
  • • Automatic currency conversion
  • • PCI-DSS compliance helpers

Supported Providers

  • • Stripe
  • • PayPal
  • • Google Pay
  • • Apple Pay
// Example: Create checkout session
commerce.payment(
  "create_checkout",
  "Create a UCP checkout session",
  { 
    items: z.array(z.object({
      productId: z.string(),
      quantity: z.number()
    })),
    successUrl: z.string().url(),
    cancelUrl: z.string().url()
  },
  async ({ items, successUrl, cancelUrl }) => {
    const session = await ucp.checkout.create({
      items,
      successUrl,
      cancelUrl
    });
    return {
      content: [{ type: "checkout", url: session.url }]
    };
  }
);
Complete Storefront
Full e-commerce storefront with UCP integration
Full Stack
Shopify

A complete e-commerce storefront demonstrating end-to-end UCP integration including product browsing, cart management, checkout, and order tracking.

Features

  • • Product search & filtering
  • • Shopping cart with persistence
  • • Guest & authenticated checkout
  • • Order history & tracking

Tech Stack

  • • Next.js 14 App Router
  • • UCP Handler
  • • Shopify Backend
  • • Tailwind CSS
Commerce Analytics
Real-time analytics and reporting through UCP
Analytics
Real-time

Unified commerce analytics that aggregates data from multiple sales channels through UCP. Includes dashboards for sales, inventory, and customer insights.

Features

  • • Multi-channel aggregation
  • • Real-time sales tracking
  • • Inventory forecasting
  • • Customer segmentation

Data Sources

  • • Google Shopping
  • • Shopify
  • • Amazon
  • • Direct website
Ready to Build Your Own?
Start integrating with the Universal Commerce Protocol and join the future of e-commerce.