Skip to content

Agent Checkout Handoff

Magento 2.4.7 – 2.4.9 Luma Hyvä

A shopper asks a chat assistant for running shoes in size 42. The assistant finds them in the store's catalog and builds a cart over GraphQL – and then the shopper has to pay in their own browser, with that cart. Adobe Commerce and Magento Open Source have no storefront address that does this: the checkout shows only the browser's own cart, and the masked cart ID cannot simply travel in a link, because whoever holds it can keep changing the cart.

Agent Checkout Handoff is an extension for Magento Open Source and Adobe Commerce that closes that gap. The agent's backend calls one GraphQL mutation and receives a single-use link that expires in minutes. The shopper opens it and lands in checkout with the agent's cart, on Luma or Hyvä Theme. At that moment the guest cart gets a new cart ID, so the one the agent held stops working and nobody can change the cart behind the shopper's back.

Every browser state is handled: a guest or a signed-in shopper, a browser that already holds a cart of its own (replaced or merged, as configured), guest checkout switched off, a customer's own cart with a sign-in first. A link that is expired, used or opened on the wrong store view shows one generic message and attaches nothing.

The extension is deterministic and runs entirely in the store. It makes no external call and sends no data off-site; it adds one database table that holds only a hash of each link, purged a day after the link expires. Storefronts: Luma, Hyvä Theme (with native Magento checkout); Hyvä Checkout, the separate Magewire-based product, is not supported. It is free and open source.

Key Features

  • GraphQL mutation createAgentCheckoutHandoff: cart ID in, checkout link and expiry time out
  • Built for the backend of an AI shopping agent, called server to server
  • Single-use links that expire after 1 to 60 minutes, 15 by default
  • A new link for a cart revokes the earlier unused one
  • A guest cart gets a new cart ID when its link is opened; the agent's ID stops working
  • Guest browser with no cart: checkout with the agent's cart
  • Guest browser with its own cart: replaced or merged, per store view setting
  • Signed-in shopper: the items are merged into the account cart
  • Guest checkout off: sign-in page, then checkout with the cart
  • Customer cart: the owner lands on checkout, anyone else is refused
  • Shopper remembered by Persistent Shopping Cart: sign-in first, the link is kept
  • Magento's own cart access check for every cart
  • One generic message for every refusal, so nothing can be probed
  • Only a SHA-256 hash of each link is stored; links are purged a day after expiry
  • No-store, no-referrer and noindex headers on every link response
  • HTTPS only, and bound to the store view it was issued for
  • Minicart refreshed on Luma and Hyvä Theme without a reload
  • Enabled, link lifetime and cart policy per store view; own ACL resource

Versions

v1.0.0 Nov 18, 2026

First public release.

Show details

Added

  • A GraphQL mutation, createAgentCheckoutHandoff, for the backend of an AI shopping agent: it takes the cart ID of a cart the agent built and returns a single-use checkout link with its expiry time. It uses Magento's own cart access check – a guest cart needs a guest request, a customer cart needs that customer's token.
  • When the mutation refuses a link, its GraphQL error carries a stable, untranslated code in extensions.reason, next to the translated message: disabled (the extension is off for the store view), empty_cart (the cart has no items) or insecure (the storefront is not served over HTTPS). An agent can branch on it instead of the message; Magento's own cart errors carry none.
  • A storefront link that opens the agent's cart in the shopper's own browser and goes straight to checkout, on Luma and Hyvä Theme. It handles a guest or signed-in shopper, a browser that already holds a cart (replaced or merged, as configured), guest checkout switched off, a customer's own cart with a sign-in first, and a shopper remembered by Persistent Shopping Cart.
  • When a guest cart is opened, it gets a new cart ID: the ID the agent held stops working, so nobody can change the cart behind the shopper's back.
  • Links work once and expire after 1 to 60 minutes, 15 by default. A new link for a cart revokes the earlier unused one. Only a hash of each link is stored, every refusal shows the same message, and the link's responses are never cached, indexed or passed on as a referrer.
  • The minicart shows the agent's cart on the first page after the link, on Luma and Hyvä Theme, without a reload.
  • An hourly cron job deletes links 24 hours after they expire.
  • Configuration under Stores > Configuration > Webmaster Ramos > Agent Checkout Handoff, with its own ACL resource: "Enabled", "Link Lifetime (minutes)" and "Shopper's Own Cart", each per store view.
  • Webmaster Ramos links (site, contact, support) and the module identifier with its version at the foot of the configuration section.

FAQ

AI shopping agents – chat assistants, voice assistants, agent platforms – can already search a store and build a cart over GraphQL. What they cannot do is send the shopper to pay with that cart: the checkout of Adobe Commerce and Magento Open Source shows only the browser's own cart, and the cart ID must not travel in a link, because whoever holds it can keep changing the cart. This extension gives the agent a single-use link instead; the shopper opens it and lands in checkout with the agent's cart.

  • You run an AI shopping agent, or connect your store to one, and the agent builds carts over Magento's GraphQL API.
  • Your storefront is Luma or Hyvä Theme with the native Magento checkout, served over HTTPS.
  • Shoppers may already have a cart of their own, be signed in, or shop as guests – and the agent should not need to know which.
  • You want the agent's access to a guest cart to end the moment the shopper takes over.
  • Your storefront is headless or a PWA: those keep the cart ID in the browser's own storage and need a handoff of their own.
  • You use Hyvä Checkout (the Magewire checkout): it has not been tested.
  • The agent only needs to point shoppers at products, not at a ready cart: a plain product link does that.
  • Your agent talks to the store over REST only: the extension adds a GraphQL mutation and no REST endpoint.
  • One GraphQL mutation, createAgentCheckoutHandoff: the agent's backend sends a cart ID and receives a checkout link and its expiry time. Magento's own cart access check applies – a customer cart needs that customer's token.
  • One storefront link per cart, single use, valid 1 to 60 minutes (15 by default); a new link revokes the earlier unused one.
  • Opening the link attaches the cart to the browser and goes to checkout: for a guest, a signed-in shopper, a browser with its own cart (replaced or merged, per store view), guest checkout switched off, and a customer's own cart with a sign-in first.
  • A guest cart gets a new cart ID when it is opened, so the agent's ID stops working.
  • One generic message for every refusal, a hash-only table purged a day after expiry, and three settings per store view under Stores > Configuration > Webmaster Ramos.
  • It does not build carts, search the catalog or talk to any agent platform – the agent does that over Magento's own GraphQL API.
  • It does not change the checkout, take payments or place orders: the shopper checks out in the store's own checkout.
  • No REST endpoint, no admin grid of issued links, no analytics.
  • It does not rotate a customer cart's ID: access to a customer cart is the customer's token, not the ID.
  • Whoever opens a link first gets the cart's contents. Send links to the shopper only, like a password reset link.

Reviews

No reviews yet. Be the first to share your experience.

Sign in to write a review.