The Scenario
You are a billing coordinator. Last quarter you sent 55 payment links for invoices that are now either paid through other channels, cancelled, or replaced by revised invoices. Those 55 links are still active in Razorpay — cluttering the dashboard and occasionally resulting in clients paying old amounts.
You have the link IDs in an Excel workbook — column A, one per row. You need them all cancelled.
The slow version:
- Log into the Razorpay dashboard, navigate to Payment Links
- Search for each link ID — one at a time
- Click the link, click Cancel, confirm
- Switch back to the workbook, write "Cancelled" in column B
- Repeat 55 times
- Run out of patience by link 20. Start missing rows.
The fast version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Excel workbook that can cancel every payment link in column A and write the result back, without you opening the Razorpay dashboard.
Open the SheetXAI sidebar and type:
For each payment link ID in column A of this workbook, cancel the Razorpay payment link and write "Cancelled" to column B if successful. If the cancellation fails for any reason, write the error message to column B instead.
SheetXAI iterates through all 55 rows, calls the Razorpay cancel endpoint for each link ID, and writes the result back per row.
What You Get
A completed cancellation log:
- Column B — "Cancelled" for every successfully cancelled link, or the error message for any that failed
- All 55 rows processed — no manual clicking
- An audit trail — the workbook records the cancellation result per link
Your finance team can see immediately which links are closed. Only the rows with errors need manual attention.
What If the Data Is Not Quite Ready
When some link IDs are already cancelled
You ran a partial cancellation last month and column A has a mix.
For each payment link ID in column A, check the current status in Razorpay. If it is already cancelled, write "Already Cancelled" to column B and skip the cancellation call. If still active, cancel it and write "Cancelled." Log other errors in column C.
When some link IDs in column A are invalid
A few rows have partial or incorrectly copied IDs.
For each payment link ID in column A, attempt to fetch the link from Razorpay to validate it before cancelling. If the fetch fails with a "not found" error, write "Invalid ID" to column B and skip cancellation. For valid links, proceed with cancellation.
When you want to cancel only links that have never been viewed
For each payment link ID in column A, fetch the link details and check the "view_count" field. If view_count is 0, cancel the link and write "Cancelled — never viewed" to column B. If view_count is greater than 0, skip and write "Skipped — client opened link."
When you want the full cleanup — validate, skip already-cancelled, cancel active, and summarize
For each payment link ID in column A: fetch the link to check its current status. Write "Already Cancelled," "Invalid," or "Cancelled" to column B accordingly. Then write a summary starting in cell D1: total links processed, total cancelled, total already cancelled, total invalid.
The pattern: the validation, the conditional cancellation, and the summary all happen in one prompt.
Try It
Get the 7-day free trial of SheetXAI and open your stale payment link workbook, then ask it to cancel them all and log the results. The Razorpay integration is included in every SheetXAI plan. For related workflows, see how to generate payment links in bulk in Excel or the Razorpay in Excel overview.
