# Use WebMCP to complete Stripe payments in a browser

Build browser agents that discover and use structured tools in Stripe payment UIs.

[WebMCP](https://developer.chrome.com/docs/ai/webmcp) lets browser agents interact with Stripe payment UIs through structured tools registered within the webpage. Rather than relying on page scraping and simulating clicks, your agent can complete a payment flow by making WebMCP tool calls. This can improve reliability and efficiency for browser agents.

## Supported Stripe Checkout UIs

- [Full page](https://docs.stripe.com/payments/accept-a-payment.md?payment-ui=checkout&ui=stripe-hosted)
- [Embedded form](https://docs.stripe.com/payments/checkout/how-checkout-works.md?payment-ui=checkout-form)
- [Elements](https://docs.stripe.com/payments/accept-a-payment.md?payment-ui=elements&api-integration=checkout)
- [Hosted invoice page](https://docs.stripe.com/invoicing/hosted-invoice-page.md)

The available tools depend on the payment UI, session state such as available payment methods, and which form is currently active.

## Available tools

Stripe provides tools that help an agent complete the payment flow:

- Read checkout or invoice context, such as the amount due and available payment methods.
- Select a payment method.
- Fill form fields.
- For payment UIs where Stripe controls the submit action, start payment submission.

The tools available for a specific payment UI can vary. Retrieve the toolset from the payment page and reference each tool’s live definition to learn more about it.

## Discover tools at runtime

Don’t hard-code tool names, schemas, or assumptions about tool availability.

A tool’s schema can also change during a payment flow. For example, selecting a payment method can change the fields that an agent must collect before payment.

When your agent encounters a Stripe payment page:

1. Discover the available tools.
2. Use the current tool definition to determine which inputs to provide.
3. Discover the toolset again after an action that can change the payment form or available payment methods.

If the tool required to complete a task isn’t available, fall back to standard browser automation.

## Experimental capability

WebMCP is an experimental browser capability based on a proposed web standard. Browser support, tool availability, and tool schemas can change.
