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, OAuth 2.0, and Mutual TLS (mTLS), see the Authentication 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.

Shipping costs on your cart page

Cart transfer is a one-way handoff. After Google redirects the user to your continue_url, standard Google Merchant Center shipping and checkout policies govern your cart and checkout pages. UCP doesn't add any display requirements for shipping.

When a user transfers items that Google showed with free shipping to your cart:

  • Order-level calculation: you don't need to show shipping costs item by item. Your cart can calculate shipping at the order level.
  • $0 standard shipping option: users must be able to select at least one $0 standard direct-to-individual shipping option at checkout, without undisclosed handling, delivery, or carrier fees. You can still offer paid expedited shipping options.
  • Guest users: if free shipping isn't tied to a loyalty program in Merchant Center, the $0 standard shipping option must be available to users who aren't signed in or aren't loyalty members.
  • Merged carts: if your site merges transferred items with items already in the user's cart, your order-level shipping can reflect the full combined cart.
  • Conditional free shipping: if free shipping depends on a minimum order value, region, or loyalty membership, configure those conditions in Merchant Center (for example, with the free_shipping_threshold attribute) so that Google shows accurate shipping costs before the transfer.

For more information, see the following Merchant Center Help Center articles:

Next steps

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