> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Checkout for AI Agents with WebMCP

> Let browser AI agents read the order and show a UPI QR on Cashfree checkout through WebMCP tools, while the shopper approves every payment.

Checkout for Agents lets AI agents help shoppers pay on Cashfree checkout. An AI agent is an assistant that acts for the shopper in their browser, such as an assistant built into the browser or a browser extension. The checkout page publishes structured actions, called tools, through WebMCP. An agent calls these tools to read the order, find a payment method and show a UPI QR code, instead of reading the screen and simulating clicks. The shopper still approves every payment.

> [!NOTE]
>
> Cashfree is rolling out Checkout for Agents in phases. Browser support and the available tools can change.

## About WebMCP

WebMCP is a proposed web standard that lets a web page publish tools that an AI agent in the browser can call directly. Each tool has a name, a plain-language description and a defined set of inputs, and it returns a structured result.

The following cards compare how a browser agent pays with and without WebMCP:

> [card] Without WebMCP
>
> The agent pays the way a person would: it reads the screen, finds buttons and types into fields. This approach is slow, and it breaks easily when a pop-up appears or the page layout changes.

> [card] With WebMCP
>
> The agent calls a named tool and receives a clear, structured result, so it doesn't need to interpret the page.

WebMCP itself doesn't include an AI model. The agent reads the tool descriptions and decides which tools to call.

## How Checkout for Agents works

Cashfree checkout registers WebMCP tools on its own pages. The tools behave as follows:

> [card] Run in the shopper's tab
>
> Tools use the shopper's own checkout session. No API keys or servers are involved, and a tool can do only what the page can already do.

> [card] Follow the screen
>
> A tool is available only while the matching part of checkout is on the page, so the tool list changes as the checkout moves between pages.

> [card] Use the same code as the page
>
> Offers, fraud and risk checks, and error handling work as they do when the shopper clicks.

### How a payment works with an agent

The following diagram shows how a UPI QR payment works when a shopper uses an agent on Cashfree checkout:

```mermaid theme={"dark"}
sequenceDiagram
    actor Shopper
    participant Agent as AI agent
    participant Checkout as Cashfree checkout
    Shopper->>Agent: Asks the agent to pay
    Agent->>Checkout: get_checkout_summary
    Checkout-->>Agent: Order details
    Agent->>Checkout: list_payment_methods
    Checkout-->>Agent: Payment methods and their tools
    opt If the agent asks for confirmation
        Agent->>Shopper: Asks the shopper to confirm the payment
        Shopper-->>Agent: Confirms
    end
    Agent->>Checkout: show_upi_qr
    alt No prompt on the page
        Checkout-->>Agent: QR code shown
    else Fee, payment route or autopay prompt
        Checkout-->>Agent: Shopper must respond on the page
        Agent->>Shopper: Asks the shopper to respond on the page
        Shopper->>Checkout: Accepts the prompt
        Checkout-->>Shopper: QR code shown
    end
    Shopper->>Checkout: Scans the QR code and approves with UPI PIN
    Agent->>Checkout: get_payment_status
    Checkout-->>Agent: Payment status
```

The payment happens in the following order:

1. The agent reads the order details: the merchant, the order amount and the payable amount after offers.
2. The agent lists the payment methods available for the order and the tools that work for each one.
3. The agent can ask the shopper to confirm before it starts the payment step.
4. The agent shows the UPI QR code on the checkout page, as it appears when the shopper clicks **Click to see QR**. If checkout first asks the shopper to accept a convenience fee, choose a payment route or set up autopay, the agent learns that the shopper must respond on the page. The QR code appears after the shopper responds.
5. The shopper scans the QR code with any UPI app and approves the payment with their UPI PIN.
6. The agent reads the payment status. After a successful payment, checkout moves to the confirmation page as usual.

## Benefits

Checkout for Agents offers the following benefits:

* **No integration work.** The tools are part of the Cashfree checkout page, so merchants on a supported checkout get them without code changes.
* **Reliable agent payments.** Agents call tools instead of reading the screen, so payments don't break when the layout, theme or pop-ups change.
* **Faster checkout.** A single tool call replaces many screenshots and clicks.
* **Lower compute cost.** Browsing a web page is costly for an agent, because it processes screenshots and page content, which uses many tokens. Tokens are the units of text that AI models process and charge for. A tool call returns only the data the agent needs, so the agent uses fewer tokens.
* **The shopper stays in control.** Agents can help with checkout, but only the shopper can approve a payment.
* **The same protection as any payment.** Cashfree runs the same fraud and risk checks on payments that an agent starts as on payments that a shopper starts.
* **Clear limits on what agents can do.** Agents can use only the tools that checkout publishes, and each tool does only what the page already does.

The following table compares how an agent completes common checkout tasks with and without WebMCP:

| Task | Without WebMCP | With WebMCP |
| - | - | - |
| Read the order | Reads text from the page | Calls `get_checkout_summary` and receives the order details |
| Find a payment method | Locates and clicks the right element | Calls `list_payment_methods`, then `open_payment_method` |
| Show the UPI QR code | Finds and clicks **Click to see QR** | Calls `show_upi_qr` |
| Handle a fee or confirmation pop-up | Must find and interpret the pop-up | Learns that the shopper must respond on the page |
| Check the payment outcome | Interprets a message or result screen | Calls `get_payment_status` |

## What changes for merchants

Nothing in your integration changes. Payments that an agent helps to start are standard checkout payments, so they aren't marked separately from other payments. You confirm them the same way as any other payment, with the [Get Order API](https://www.cashfree.com/docs/api-reference/payments/latest/orders/get-order.md) or [payment webhooks](https://www.cashfree.com/docs/api-reference/payments/latest/payments/webhooks.md), before you fulfil the order.

## Supported checkouts and payment methods

Checkout for Agents works only on checkout pages that open at the top level of the browser window. Embedded checkouts run in a cross-origin iframe, where browsers disable WebMCP tools by default.

The following table lists which Cashfree checkouts support Checkout for Agents:

| Checkout | Support |
| - | - |
| Cashfree Hosted Checkout, redirect checkout (`redirectTarget` set to `_self`, `_blank` or `_top`) | Supported |
| Cashfree Hosted Checkout, popup checkout (`redirectTarget` set to `_modal`) | Not supported |
| Cashfree Hosted Checkout, inline checkout (`redirectTarget` set to a DOM element) | Not supported |
| One Click Checkout | Not supported |
| Subscription checkout | Not supported |

For details on each `redirectTarget` value, see [Web Integration](https://www.cashfree.com/docs/payments/online/web/redirect.md).

What an agent can do depends on the payment method:

> [card] UPI QR
>
> The agent can show the QR code when the UPI QR box appears on the checkout page. The shopper scans it with any UPI app and approves the payment with their UPI PIN.

> [card] All other payment methods
>
> The agent can list and open them. The shopper completes the payment on the page.

### Browser requirements

Checkout for Agents works only in Chromium-based browsers that support WebMCP. In Google Chrome, WebMCP is available on Cashfree checkout from Chrome 149 through Chrome's origin trial, which Cashfree enables for its checkout pages. For more information about the browser capability, see the [Chrome WebMCP overview](https://developer.chrome.com/docs/ai/webmcp).

## Available tools

Cashfree checkout publishes the following tools. The **main checkout page** is the first page the shopper sees, which lists the payment methods. A **payment method page** opens when the shopper selects one of these methods.

| Tool | Description | Available on |
| - | - | - |
| `get_checkout_summary` Read-only | Returns the merchant name, currency, order amount, payable amount after offers, applied and available offers, and the shopper's masked phone number. | All checkout pages |
| `get_payment_status` Read-only | Returns the status of the payment started on this page: `not_started`, `pending`, `failed` or `success`. | All checkout pages |
| `list_payment_methods` Read-only | Lists the payment methods enabled for the order and the tools that work for each one. Lists UPI QR as `upi-qr` when the UPI QR box is on the page. | Main checkout page |
| `open_payment_method` Action | Opens a payment method from `list_payment_methods`, as a shopper's click would. | Main checkout page |
| `back_to_payment_methods` Navigation | Returns to the main checkout page, as the back arrow does. | Payment method pages |
| `show_upi_qr` Payment | Shows a UPI QR code for the payable amount, as **Click to see QR** does. The shopper scans it and approves the payment with their UPI PIN. | Main checkout page, when the UPI QR box appears |

The tool types have the following meanings:

* Read-only The tool reads information from the page and changes nothing.
* Action The tool does what a shopper's click would do on the page.
* Navigation The tool moves between checkout pages.
* Payment The tool starts a payment step. Cashfree marks it as consequential, so the browser or agent can ask the shopper to confirm before calling it.

> [!NOTE]
>
> The tools available at any moment depend on the page that's open and the merchant's settings. Tool names and inputs can change as the WebMCP standard evolves.

## Safety and shopper control

Cashfree checkout keeps the shopper in control of every payment that an agent starts:

* **No tool moves money on its own.** The agent can only show the QR code. The shopper scans it and approves the payment with their UPI PIN.
* **Confirmation pop-ups stay with the shopper.** When checkout asks the shopper to accept a convenience fee, choose a payment route, set up autopay or decide on a pending previous payment, the agent can't answer for them. It learns that the shopper must respond on the page.
* **Payment tools carry a confirmation hint.** Cashfree marks `show_upi_qr` as consequential (`consequentialHint`), so the browser or agent can ask the shopper to confirm before it runs.
* **No sensitive data goes in or out.** Tools never accept card numbers, CVV, OTPs or tokens. Results mask the shopper's phone number and leave out their email address and the cart items.
* **Merchant text is marked as untrusted.** Cashfree marks `get_checkout_summary` with `untrustedContentHint`, so agents treat the text it returns, such as offer descriptions, as data, not as instructions.

## Limitations

Checkout for Agents has the following limitations:

* It works only in Chromium-based browsers that support WebMCP.
* The UPI QR code tool isn't available on the mobile layout of checkout, where the UPI QR code isn't on the main checkout page.
* The confirmation page that appears after a successful payment has no tools.
* `get_payment_status` reports only the payment started on the current page.
* Popup checkout, inline checkout, One Click Checkout and subscription checkout don't publish tools.

Related topics

<ul>
  <li>[Get Order API](https://www.cashfree.com/docs/api-reference/payments/latest/orders/get-order.md)</li>
  <li>[Payment Webhooks API](https://www.cashfree.com/docs/api-reference/payments/latest/payments/webhooks.md)</li>
  <li>[Hosted Checkout Web Integration](https://www.cashfree.com/docs/payments/online/web/redirect.md)</li>
  <li>[MCP Server](https://www.cashfree.com/docs/tools-ai/mcp-server.md)</li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.