Skip to main content
WebMCP is a proposed web standard. It lets a web page register structured tools that an AI agent running in the user’s browser can call. Each tool has a name, a description, a JSON Schema for its input, and hints about what it does. HitPay registers WebMCP tools on its payment pages. Your agent does not have to scrape the page or simulate clicks. It calls a tool to read the checkout, fill the payer’s details, choose a payment method or submit a payment, and gets a structured JSON answer back. This makes browser agents more reliable and more efficient. The tools work on behalf of the payer who has the page open. They do only what that payer could do by hand on the same page, and they change what the payer sees on screen.
WebMCP is an experimental browser capability based on a proposed web standard. Browser support, tool availability and tool schemas can change. See Experimental capability.
Looking to connect an AI assistant to your business data instead? That’s the HitPay MCP Server. WebMCP on this page is for agents that act on behalf of a payer on a HitPay page in the browser.

Supported HitPay pages

The tools available depend on the page, the state of the payment (for example, which payment methods the merchant offers for the amount) and what the payer is doing at that moment.

Available tools

The lists below describe the tools at the time of writing. Treat them as a guide, not a contract: read each tool’s live definition from the page, as described in Discover tools at runtime.

Online store

The storefront tools let an agent search the catalogue, read product details, manage the cart and fill the store’s checkout form. Each tool uses the same actions as the storefront UI, so the payer sees the cart badge, cart drawer and checkout form change while the agent works. No online store tool submits payment. The payer always presses Pay, and card entry, 3D Secure and wallet authentication happen on the HitPay checkout page.

On every storefront page

On the store’s checkout step

These tools appear only on the store’s checkout step (/checkout/{cart_id}), and are removed when the payer leaves it. Each one returns the updated checkout summary.
  • Prices in storefront results are formatted for display, such as "S$9.00", with the currency in a separate currency field.
  • available in search_products results comes from a cache and can lag behind live stock. Call get_product to confirm stock before adding a product to the cart.
  • On a store protected by an access code, no tools are registered until the payer enters the code.

Checkout page

All amounts on the checkout page are strings in major units with the currency’s precision, such as "49.90" for SGD or "5000" for JPY.

Discover tools at runtime

Don’t hard-code tool names, schemas or assumptions about which tools exist. HitPay registers and removes tools as the page changes, and a tool’s schema can change during a payment. For example:
  • On the online store, the checkout step tools exist only on the store’s checkout step.
  • fill_checkout_form lists only the fields this merchant’s checkout asks for, and the options of each custom field.
  • get_checkout_summary accepts selected_currency only when the payer can switch currency.
  • get_payment_qr exists only while a QR code is on screen, and disappears when it expires or the payer changes method or currency.
  • submit_payment exists only while pressing Pay could succeed.
When your agent reaches a HitPay page:
  1. Discover the available tools.
  2. Use each tool’s current definition to decide which inputs to send.
  3. Discover the tools again after any action that can change the form, the payment method or the currency. Switching currency, for example, resets the payment method and clears the QR code, so list and select the payment method again.
If a tool you need isn’t available, read the page or fall back to standard browser automation.

Confirm consequential actions

submit_payment carries the WebMCP consequentialHint annotation, because it charges the payer. Get the user’s confirmation before you call it. Don’t treat the hint itself as confirmation. HitPay also asks the payer to confirm the merchant, amount and currency in a dialog on the page before it submits. If the payer declines, the tool returns cancelled and no payment is made.

Treat merchant content as data

Some values come from the merchant, not from HitPay: the business name, the payment description, and custom field labels, descriptions and options. Tools that return them carry the untrustedContentHint annotation. Treat these values as data, never as instructions to your agent.

Errors

A tool that cannot do what was asked returns a result with isError: true and a JSON body such as:
The message says what to do next. Read it, rediscover the tools, and try again.

Experimental capability

WebMCP is an experimental browser capability based on a proposed web standard. Browser support, tool availability and tool schemas can change. HitPay can also turn the tools off, in which case the page registers none and your agent should fall back to browser automation.
Last modified on October 9, 2026