Most developers treat Shopify APIs as single-store tools. You get an token for one merchant, call the Admin or Storefront API for that shop, and stay inside its walls.

Shopify's endpoint and Storefront UCP () break that assumption open. You can search live inventory across independent Shopify merchants, verify real cart-level pricing and shipping rules per store, and hand shoppers straight into each merchant's native checkout without touching payment details.

To test how far those APIs go in a consumer app, I spent a few days building Hold'em. Hold'em turns Black Friday shopping into a quick card game. Type what you want (like selvedge denim under $150 or coffee gifts under $100), swipe right to keep items in your Pack, swipe left to pass, and check out on each store.

Below is the real architecture behind Hold'em, including the trick I used to surface automatic Black Friday cart discounts that never show up on product pages.

01

Cross-merchant discovery with one JSON-RPC call

The starting point is Shopify's Global Catalog endpoint (https://catalog.shopify.com/api/ucp/mcp). Without scraping storefronts or stitching together merchant feeds, Hold'em calls search_catalog over JSON-RPC 2.0 with a UCP agent profile, price bounds, and shipping destination filters.

TypeScript worker/lib/shopify-catalog.ts
const res = await fetch('https://catalog.shopify.com/api/ucp/mcp', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
    Authorization: `Bearer ${env.SHOPIFY_CATALOG_TOKEN}`,
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: crypto.randomUUID(),
    method: 'tools/call',
    params: {
      name: 'search_catalog',
      arguments: {
        meta: { 'ucp-agent': { profile } },
        catalog: {
          query: 'selvedge denim',
          context: {
            address_country: 'US',
            postal_code: '10013',
          },
          filters: {
            available: true,
            ships_to: { country: 'US', postal_code: '10013' },
            price: { max: 15000 }, // minor units ($150.00)
          },
          pagination: { limit: 20 },
        },
      },
    },
  }),
});

One call returns structured product candidates across independent Shopify stores, complete with variant IDs, pricing, merchant domains, and store UCP handles.

Passing ships_to right in discovery filters out obvious international mismatches early. Hold'em also layers a small LLM planner (Claude Haiku 5.5 via ) on top to turn prompts and swipes into follow-up catalog queries. The planner enforces store diversity so one merchant never floods a hand.

02

Resolving each store's UCP endpoint safely

Once you have a product's shopUcpDomain and providerVariantId, you can talk directly to that merchant's Storefront UCP endpoint.

There is an important security detail here if your app also lets users save arbitrary store links (Hold'em has a companion Chrome extension for dropping any Shopify product into your Pack). Never blindly fetch a user-supplied domain from your server without blocking private hosts and redirects.

In Hold'em, *.myshopify.com domains fast-path directly to /api/ucp/mcp, while custom domains resolve through /.well-known/ucp:

TypeScript worker/lib/shopify-ucp-checkout.ts
export async function resolveStoreUcpEndpoint(shopUcpDomain: string): Promise<string> {
  const cleanHost = shopUcpDomain
    .replace(/^https?:\/\//i, '')
    .replace(/\/.*$/, '')
    .trim()
    .toLowerCase();

  if (!isSafePublicHost(cleanHost)) {
    throw new Error('Store does not expose a valid public domain.');
  }

  if (cleanHost.endsWith('.myshopify.com')) {
    return `https://${cleanHost}/api/ucp/mcp`;
  }

  try {
    const res = await fetch(`https://${cleanHost}/.well-known/ucp`, {
      method: 'GET',
      headers: { Accept: 'application/json' },
      redirect: 'manual',
      signal: AbortSignal.timeout(6000),
    });
    if (res.ok) {
      const manifest = await res.json();
      const mcp = manifest?.ucp?.services?.['dev.ucp.shopping']?.find(
        (svc: { transport?: string; endpoint?: string }) =>
          svc.transport === 'mcp' && typeof svc.endpoint === 'string',
      );
      if (mcp?.endpoint) {
        return assertSafeHttpsUrl(mcp.endpoint).href;
      }
    }
  } catch {
    // Fall back to standard storefront UCP path below.
  }

  return `https://${cleanHost}/api/ucp/mcp`;
}

That gives you a clean, predictable Storefront UCP endpoint on each merchant's shop with zero per-store OAuth setup.

03

The Black Friday trick: probing hidden automatic cart discounts

Here is the problem that motivated Hold'em.

During Black Friday, plenty of smaller Shopify stores do not edit compare_at_price on every . Those stores turn on an automatic cart discount (like 25% off at checkout or sitewide holiday markdowns). Reading only static catalog prices misses those real deals completely while surfacing fake crossed-out .

With Storefront UCP, you do not have to guess. For products in a dealt hand that show zero listed markdown in the catalog, Hold'em probes the merchant's create_checkout tool in parallel with a strict 3.5-second timeout:

TypeScript worker/lib/shopify-catalog.ts
export async function enrichLiveCheckoutSavings<T extends CatalogProduct>(
  env: Env,
  products: T[],
  maxProbes = 5,
): Promise<T[]> {
  const probeTargets = products
    .filter((p) => p.savingsMinor === 0 && p.shopUcpDomain && p.providerVariantId)
    .slice(0, maxProbes);

  if (probeTargets.length === 0) return products;

  const probed = new Map<string, Partial<CatalogProduct>>();

  await Promise.allSettled(
    probeTargets.map(async (item) => {
      const controller = new AbortController();
      const timer = setTimeout(() => controller.abort(), 3500);

      try {
        const snap = await createStoreCheckout(
          env,
          {
            shopUcpDomain: item.shopUcpDomain,
            currency: item.priceCurrency || 'USD',
            lines: [{ variantId: item.providerVariantId, quantity: 1 }],
          },
          (input, init) => fetch(input, { ...init, signal: controller.signal }),
        );

        if (snap.discountMinor > 0 && snap.subtotalMinor > snap.discountMinor) {
          const originalPriceMinor = snap.subtotalMinor;
          const discountedPriceMinor = snap.subtotalMinor - snap.discountMinor;
          const savingsMinor = originalPriceMinor - discountedPriceMinor;
          const savingsPercent = Math.round((savingsMinor / originalPriceMinor) * 100);

          probed.set(item.key, {
            originalPriceMinor,
            priceAmountMinor: discountedPriceMinor,
            savingsMinor,
            savingsPercent,
            savingsSource: 'live_checkout',
          });
        }
      } catch {
        // Keep the catalog price if a store times out or blocks anonymous checkout.
      } finally {
        clearTimeout(timer);
      }
    }),
  );

  return products.map((p) => {
    const patch = probed.get(p.key);
    return patch ? { ...p, ...patch } : p;
  });
}
  1. 01
    Cap concurrency and timeouts. A 3.5-second AbortController per store and Promise.allSettled guarantee one slow merchant never stalls the whole card deal.
  2. 02
    Never invent savings. If a store does not return a positive discountMinor below subtotalMinor, Hold'em leaves the listed price alone.
  3. 03
    Zero dead UI time. Shoppers see real automatic cart discounts right on the swipe card before clicking into a store.

Three design details keep the prober fast and honest in production:

04

Background ZIP shipping checks and zero-PCI checkout handoff

That Storefront UCP layer handles the rest of the shopping flow once a shopper swipes right to hold an item in their Pack:

  • Background shipping eligibility: When you save a ZIP code or full address, Hold'em runs a non-blocking create_checkout check with your destination on each held item. If a merchant cannot ship that variant to your ZIP, you find out immediately in your Pack before filling out a checkout form.
  • Promo code validation: Inside each store card in your Pack, Hold'em tests discount codes via update_checkout and updates your live subtotal and savings.
  • Direct merchant handoff: Hit Checkout on a store card, and Hold'em builds a Storefront UCP checkout for every item you kept from that store. The worker pre-fills your saved shipping address and opens that merchant's native continue_url. Hold'em never touches payment details or takes on .

The app runs on , , , and React, with search sorting and background refills offloaded to a so swiping stays responsive on mobile.

05

What worked well and three things I would love to see next

Building end-to-end on Global Catalog and Storefront UCP felt fast and clean. The biggest surprise was how little glue code the flow needed to go from a cold search query to a real multi-merchant checkout link.

Three sharp edges stood out along the way:

  1. 01
    Automatic cart discounts in catalog results. Probing create_checkout works well and makes a fun pattern. A lightweight read-only quote tool or automatic-discount field directly on catalog hits would be much faster than opening anonymous checkouts to check prices.
  2. 02
    Store-scoped search by exact domain. Merchant display names collide more often than you expect across Shopify. Resolving a store's exact by matching its domain before passing filters.shops prevents cross-store mix-ups.
  3. 03
    Predictable shipping error codes. Storefront UCP surfaces unshippable addresses cleanly, though phrasing varies across merchant setups, so pairing structured error codes with fallback message checks saved a lot of edge cases.
Try It Live

Try Hold'em and tell me what breaks

Hold'em is live at holdem.showerthoughts.dev, and the companion Chrome extension is live on the Chrome Web Store. Guest mode is unlimited with no account needed through Cyber Monday, and free sign-in adds cross-device sync and up to 10 packs. (Click the playing cards in the top left for dark mode.)

If you are building on Shopify Global Catalog or Storefront UCP and want to compare notes, reply on X (@srbryers) or try the standalone shopify-ucp-prober starter code. If something breaks or feels clunky in Hold'em, let me know.

Try Hold'em live Chrome extension Starter repo on GitHub

-Seb