Cart API

This guide describes how to integrate with the Universal Commerce Protocol (UCP) Cart API, allowing users to build and manage a shopping cart across Google surfaces, including AI Mode in Google Search and Gemini. This capability is designed for basket building before the user has expressed explicit intent to check out.

Overview

The UCP Cart API (Capability Name: dev.ucp.shopping.cart ) enables the transfer of a user's shopping cart from Google surfaces, such as AI Mode in Google Search and Gemini, directly to your website. This API supports Google's Universal Cart feature by allowing a one-way population of the cart on your system, primarily through the CreateCart endpoint.

This initial release is limited to cart creation and transfer using the CreateCart method. Features like updating, deleting, or synchronizing cart contents between Google and your system are not supported.

Key Benefits

Key Benefits of Implementing CreateCart:

  • For Users: A seamless transition from product discovery on Google to a prepopulated cart on your website.
  • For Merchants: Receive user carts directly from Google, simplifying the initial purchase steps for customers and providing opportunities for upselling and cross-selling on your website.

Prerequisites

  • Ensure your system is set up to handle UCP version 2026-04-08.
  • Publish your UCP profile at /.well-known/ucp and include the dev.ucp.shopping.cart capability, as described in the UCP Profile guide. The endpoint specified in your profile (for example, https://business.example.com/ucp/v1) will be used as the base URL for these API calls.

Authentication

For details on securing your Cart API endpoints, including supported authentication methods like API keys and OAuth 2.0, see the Authentication & Security guide.

Service level objectives and capacity planning

While formal Service Level Objectives (SLOs) are not enforced for the POST /carts endpoint, we strongly recommend that you meet the following targets to ensure a seamless cart transfer experience for users:

  • Latency: respond as quickly as possible, ideally in under one second. Responses taking longer than one second don't cause the transfer flow to fail, but higher latency can degrade the user experience.
  • Capacity planning: plan your endpoint capacity according to the referral traffic you expect during your peak campaigns. The POST /carts calls are driven entirely by user intent (triggered when a user clicks to transfer their cart) and request volume is based on user traffic.
  • Rate limiting: gracefully throttle requests by returning standard HTTP 429 (Too Many Requests) responses if your system receives traffic that exceeds its rate limits. For more information, see Error codes.

Next steps

View the API payloads and technical implementation details for the UCP Cart API: