The checkout flow is currently proposed in stripe-samples/webmcp#5. The setup below checks out the reviewed sample commit because the default branch may still contain the earlier tool-discovery example.
Requirements
- Node.js 24 and pnpm 10.32.1.
- Google Chrome with WebMCP support. The maintainers tested the sample with Chrome 153; Stagehand enables the required launch flags.
- A Stripe Checkout URL that exposes WebMCP tools. Use a test-mode payment link and test card data to try the sample.
Run the sample
1
Clone the Stripe sample
2
Configure Checkout
Edit
.env with your Checkout URL, buyer details, shipping address, and test card data. The sample’s .env.example lists the individual fields.3
Run Checkout
How it works
The sample discovers tools withpage.tools() and invokes them through Stagehand’s WebMCP API.
- Poll for
select_payment_methodand selectcard. - Read
fill_payment_form.inputSchemaand send only fields present in that Checkout session. Shipping and billing field names vary by session. - Fill one field per invocation, rediscovering the tool between calls because the form can re-render.
- Read
get_order_summaryand abort iftotalAmountexceedsMAX_TOTAL_MINOR. - Click
.SubmitButtonwith a Stagehand locator. The sample’s Checkout flow exposes no Pay tool.
Stripe sample source
Read the complete script and environment configuration.
WebMCP guide
Discover, invoke, and handle results from page-provided tools.

