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 standard checkout modal with UPI

Open the payment modal, verify a UPI ID, pay, and check the receipt names the payment id and the method it used.

Published on:

A payment modal is a separate application rendered inside yours. It has its own state, its own validation and its own failure modes, and it is the last thing between a customer and a completed order.

This use case runs the default path on the Razorpie checkout clone: open the modal, verify a UPI ID, pay, and check the receipt.

The flow under test

The interesting assertion in a UPI flow is the verification step, because the payment request goes to an address that has to be confirmed before anything is sent.

  • The modal offers the right methods - UPI and Card, listed under a title carrying the amount.
  • The address is verified before use - a badge confirming the request will go to the entered UPI ID.
  • The payment succeeds - a success banner rather than a modal that closes silently.
  • The receipt is complete - payment id, amount, method and the address it was captured against.

Asserting the UPI ID inside the success message is what ties the captured payment to the address the customer confirmed. A payment captured against a different address is a reconciliation problem on both sides.

Note

Note: Kane CLI drives a modal the same way it drives a page, since it works from what is rendered rather than from your component tree. Start on TestMu AI. Try free!

The test file

The modal title is asserted with the amount in it, which is a cheap way to confirm the dialog opened for the right order rather than for a default or a cached one.

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

# Razorpie 11.1: Checkout modal

Catalog objective: trigger the Razorpie checkout and pay with the UPI success flow.
Key assertion: the payment succeeds and a receipt is shown.

## Open the checkout
Click "Pay now" on "Cotton kurta set" and verify a dialog titled "Razorpie · ₹1,899.00" opens listing the "UPI" and "Card" methods.

## Enter a UPI ID
With "UPI" selected, type "priya@okhdfb" into "UPI ID" and click "Verify UPI ID", then verify a badge reads "UPI ID verified - request will be sent to priya@okhdfb".

## Pay
Click "Pay ₹1,899.00" and verify a green banner titled "Payment successful" appears.

## Verify the receipt
Verify the banner shows payment "pay_R701kLm8Xq" captured for "₹1,899.00" via UPI (priya@okhdfb), and the Payments card lists that payment at "₹1,899.00".

The final step checks both the banner and the payments list, so a payment that confirms on screen and never reaches the merchant record fails.

Step by step coverage

The four steps follow a customer through the modal, with an assertion at each point where the flow could silently diverge.

StepWhat it proves
Open the checkoutThe modal opens for the correct amount offering both methods
Enter a UPI IDThe address is validated and confirmed before a request is sent
PayThe payment completes with a visible success state
Verify the receiptThe payment id, amount, method and address are all recorded

Checking the payments list as well as the banner is the difference between a confirmation the customer saw and a payment the merchant has.

Next-generation test execution with TestMu AI

Running it

kane-cli testmd run tests/razorpay/checkout-modal_test.md

The result is coverage on an embedded payment surface you do not own, driven entirely through what it renders.

Method-specific paths diverge enough to deserve their own files. Generating a file per method keeps that cheap, and the Kane CLI introduction covers the basics of running them.

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

Checkout Modal 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