Hero Background

Power Your Software Testing with AI Agents and Cloud

The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.

Kane CLIPayments

Test a hosted checkout session end to end

Four steps from an order summary to a receipt, checking the amount at every surface it appears on.

Published on:

A hosted checkout page is somebody else's interface taking your customer's money. You cannot fix its markup and you cannot patch it at runtime, which leaves verifying it as the only available control.

This use case runs a card payment on the Stripey checkout clone and checks the amount on all four surfaces it appears on. Four steps, 121 seconds, all passed.

The flow under test

The amount is the only thing on a checkout page that has to be identical everywhere, and it is rendered from a different source at each stage.

  • The order summary - Pro plan annual at $240.00, with a matching total due.
  • The pay button - reads "Pay $240.00", which is the last figure a customer sees before committing.
  • The success banner - a payment successful state rather than a silent redirect.
  • The receipt - payment id, amount paid, card and a status of succeeded.

Asserting the pay button label is the cheap check most teams skip. A button showing a stale amount while the charge goes through at a different one is a dispute, and it renders perfectly.

Note

Note: Kane CLI runs against a hosted page the same way it runs against your own, since it drives a real browser rather than your application code. Start on TestMu AI. Start for free

The test file

The card details are entered by field label, and the final step asserts four separate receipt values in one instruction against a page that is already rendered.

---
mode: testing
url: https://my-testing-repo-main.vercel.app/stripe-clone-app/checkout?reset=true
max_steps: 40
tags: [stripe, payments, checkout]
---

# Stripey 9.1: Hosted checkout

Catalog objective: complete a Stripey Checkout payment with test card 4242.
Key assertion: the success page is reached and the amount is correct.

## Verify the checkout total
Verify the order summary shows "Pro plan - annual" at "$240.00" and "Total due" of "$240.00".

## Fill in the card
Type "4242 4242 4242 4242" into "Card number", "12 / 34" into "Expiry", "123" into "CVC", and verify the pay button reads "Pay $240.00".

## Pay
Click "Pay $240.00" and verify a green banner titled "Payment successful" appears.

## Verify the receipt
Verify the receipt shows "Payment ID" of "pi_3Qb101Mx03", "Amount paid" of "$240.00", "Card" of "Visa ••••4242" and "Status" of "succeeded".

Run the test with:

kane-cli testmd run tests/stripe/hosted-checkout_test.md

The run

Four passes with unusually even timings, between 26.2 and 30.9 seconds each, which is the profile of a flow where every step acts on a page that is already loaded.

---
test: ../hosted-checkout_test.md
status: passed
started: 2026-09-21T12:36:34.838Z
duration_s: 121
session_id: 720b1736-70d6-4c64-89aa-facba53b3598
---

# Stripey 9.1: Hosted checkout - Result

## Verify the checkout total ✓ passed (30.9s)
md5: eaae43fbe22739e5705feae60bc257ab
Verify the order summary shows "Pro plan - annual" at "$240.00" and "Total due" of "$240.00".

## Fill in the card ✓ passed (29.9s)
md5: d4f78bbd7f5dfb3f9f43df1d34be7a25
Type "4242 4242 4242 4242" into "Card number", "12 / 34" into "Expiry", "123" into "CVC", and verify the pay button reads "Pay $240.00".

## Pay ✓ passed (29.2s)
md5: bff1773807d73141c5e2f4d86cdee38f
Click "Pay $240.00" and verify a green banner titled "Payment successful" appears.

## Verify the receipt ✓ passed (26.2s)
md5: 20012cece5a225f27138d192329d09ca
Verify the receipt shows "Payment ID" of "pi_3Qb101Mx03", "Amount paid" of "$240.00", "Card" of "Visa ••••4242" and "Status" of "succeeded".
StepResultDuration
Verify the checkout totalPassed30.9s
Fill in the cardPassed29.9s
PayPassed29.2s
Verify the receiptPassed26.2s

At 121 seconds this is one of the shortest payment flows in the set, because a hosted checkout is a single page and the test never navigates away from it until the receipt.

Next-generation test execution with TestMu AI

Reading the evidence

What you end up with is verification of a payment surface you do not own, in a file that takes two minutes to run and can go in front of every release.

Payment pages are also where test card data most often leaks into a repository. The test.md format covers passing values as variables instead, and running Kane CLI in CI covers keeping those values in pipeline secrets.

Author

...

Bhawana

Blogs: 77

  • Twitter
  • Linkedin

Bhawana is a Community Evangelist at TestMu AI with over 3 years of experience creating technically accurate, strategy-driven content in software testing. She has authored 50+ blogs on test automation, cross-browser testing, mobile testing, and real device testing. She also serves as Product Marketing Manager for Kane CLI, the command-line tool that runs browser automation from the terminal using natural-language flows in a real Chrome browser. Bhawana is certified in KaneAI, Selenium, Appium, Playwright, and Cypress, reflecting her hands-on knowledge of modern automation practices. On LinkedIn, she is followed by 6000+ QA engineers, testers, AI automation testers, and tech leaders.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Hosted Checkout FAQs

Did you find this page helpful?

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests