AI Shopping Agents Are Reaching Checkout. What Changes for Client-Side Security? - Source Defense
RESOURCES / BLOG

AI Shopping Agents Are Reaching Checkout. What Changes for Client-Side Security?

If your team is preparing a checkout redesign or adding a new payment integration, use that project to review how customer data moves through the purchase. Include any AI-assisted shopping journeys your business supports or plans to support.

An assistant might operate your website in a browser, exchange checkout information through an application programming interface (API), or hand the customer back to your site to finish the order. Each route puts data in different places and changes which systems your team needs to evaluate.

Start with one high-value journey. For its browser steps, verify which scripts execute, what sensitive data they can access, and whether your controls work as expected. Review API-only steps at the API and payment layers.

Start with the path to checkout

Treat agent-assisted shopping as a set of possible journeys. The Agentic Commerce Protocol, for example, defines merchant APIs that let agents create, update, and complete checkout sessions. That differs from an agent operating the merchant’s website through a browser.

Shopping pathWhere to focus your security review
An agent operates your website through a browserDetermine which pages and scripts execute, what data enters the page, and whether your browser controls operate in that environment.
An agent completes checkout through merchant APIsReview authentication, authorization, data handling, and transaction controls at the API and payment layers. Merchant-page JavaScript controls do not cover an API-only step.
An assistant hands the purchase back to the customerReview the destination page and the remaining browser journey, including login, address entry, payment, and confirmation.

A purchase can cross these boundaries. Map each step rather than assigning one security label to the entire transaction. An API integration may avoid loading your checkout page, while a later customer handoff brings website scripts back into the journey.

Control scripts wherever customer data reaches a page

Your browser review should establish which scripts can read page content, collect form values, or change the interface. OWASP’s third-party JavaScript guidance identifies sensitive-information disclosure and loss of control over application changes among the risks of external scripts.

Consider a hypothetical handoff to a retailer’s checkout. The customer enters an email address and delivery details on the merchant page, then pays through a provider’s embedded form. A marketing script configured to collect those address fields could send customer information to an unnecessary destination even if payment processing works correctly.

A payment provider’s form may sit inside a separate embedded page, called an iframe. When that frame and the merchant page have different origins, such as different domains, browser same-origin protections restrict direct access between them. Scripts on the surrounding page should not be assumed to have access to the frame’s fields. Data exposed elsewhere on the merchant page still needs its own controls.

Compromised code can also manipulate the surrounding interface, such as by displaying a fake form before the legitimate payment step. Your review needs to cover page changes as well as data collection. The entry point to this example journey was an assistant, but the exposure sits in the website code and data available during checkout.

What to evaluate before supporting a shopping journey

Choose one journey your business supports or is preparing to support and have your security and ecommerce teams walk through it together, using test accounts and synthetic customer data.

1. Record where the journey changes systems

Identify the pages, APIs, payment components, and the customer handoffs involved. At each step, record where sensitive data appears and who owns that component. Include steps after payment if they expose customer or order information. The result should show your teams exactly where browser controls are relevant.

2. Check what actually executes

Inventory the scripts observed during the browser steps, including code loaded through tag managers or other scripts. Check the journey after login and after relevant checkout actions, rather than relying on an initial page load. Remove unnecessary scripts and assign an owner and business purpose to the scripts that you keep.

3. Define the data each script needs

For each script, determine which fields and page elements it needs to access and where it sends information. An analytics service may need an event indicating that an address step is complete. That purpose does not establish a need to collect the address itself. Compare observed collection with the approved purpose.

4. Verify control coverage in the actual environment

Check if your controls only report script activity or can also restrict unauthorized access and page changes. In controlled testing, verify that the expected restrictions work and essential checkout functions still complete. Test the supported browser or agent environment directly; coverage in a customer’s usual browser does not establish coverage in every automated environment.

5. Give findings a response owner

Decide who investigates unexpected field access, disables a risky integration, and validates the fix. Keep a record of the affected step, script, data, and destination so responders can understand the issue. For API steps, involve the teams responsible for authentication and transaction authorization. ACP’s security documentation describes separate authentication and request-signing mechanisms for its API exchanges.

Keep PCI tied to the payment implementation

An AI-assisted purchase still needs a PCI DSS scope assessment based on the payment implementation and the systems involved. The presence of an agent alone does not determine which obligations apply.

For payment-page controls where applicable, PCI DSS 4.0.1 Requirement 6.4.3 addresses script authorization, integrity assurance, and an inventory with written business or technical justification. Requirement 11.6.1 addresses detection and alerting for unauthorized changes to security-impacting HTTP headers and payment-page content received by the consumer browser. PCI SSC’s payment-page security guidance explains these control objectives.

Validation also depends on your environment. PCI SSC FAQ 1588 distinguishes the SAQ A script-attack eligibility criterion for embedded payment forms from redirect-only and fully outsourced payment-link arrangements. Confirm your applicable validation path and responsibilities with your acquirer or other compliance-accepting entity. An API-based purchase should not be treated as a blanket PCI exemption.

Protect the browser steps in the transaction

AI shopping agents and client-side security meet wherever the purchase involves website code with access to customer information. Your next step is to identify those points and verify what the scripts can do.

Source Defense’s client-side security approach focuses on visibility into JavaScript behavior and controls over unauthorized script activity and sensitive-data access. Enforcement capabilities depend on the selected solution, tier, deployment, and configured policies. Apply that browser-side assessment alongside the separate controls governing agents, APIs, and payments.

Preparing a checkout change or a new payment integration? Talk to Source Defense about a focused assessment of one high-value customer journey. Identify where scripts can access sensitive data and which browser-side controls to evaluate before release.

Related Reads

Source Defense
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.