In today’s fast-moving world, digital payments and instant messaging need to be faster and smarter.
Imagine asking an AI to create a UPI payment link and send it directly to a WhatsApp contact — all in one command!
In this article, I’ll show you a simple Python project that does exactly that, using a custom UPI link generator and WhatsApp MCP (Message Context Protocol) integration.

What We Built

We created a Python tool that allows an AI Language Model (LLM) to:

Generate a UPI payment link for any valid UPI ID and amount.Share the payment link directly with WhatsApp contacts through an installed WhatsApp MCP.

You can use this setup for automating payment requests, reminders, or even splitting bills among friends — all with a single AI instruction!

How the UPI Payment Link Generator Works

The core of the project is a simple Python function that validates a UPI ID and generates a payment link.
Here’s a quick look:

import re

UPI_ID_REGEX = re.compile(r”^[w.-]+@[w.-]+$”)

def create_payment_link(upi_id: str, amount: float) -> str:
if not UPI_ID_REGEX.match(upi_id):
return “Invalid UPI ID format. Please provide a valid UPI ID (e.g., 878787889@ybl).”
url = f”upi://pay?pn=UPAYI&pa={upi_id}&cu=INR&am={amount}”
return urlIt first checks if the UPI ID is valid.Then, it builds a UPI payment URL, which can be opened in any UPI-enabled app.

Integrating with WhatsApp MCP

We used WhatsApp MCP (Message Context Protocol) to let the LLM send messages — like payment links — directly to WhatsApp contacts.

For example, you could say:
“Send a ₹500 payment link to John on WhatsApp,”
and the LLM will generate the link and send it, all automatically.

How It All Comes Together

Here’s the complete flow:

User gives a prompt:
“Create a ₹1000 payment link for 9876543210@okicici and send it to Alice on WhatsApp.”LLM generates the UPI link using the payment MCP tool visit git hub repo .LLM sends the link to Alice via WhatsApp MCP. (To install whats app mcp visit this github repo )

Super smooth, super fast — no manual copy-pasting needed!

Conclusion

By combining a UPI payment link generator MCP with WhatsApp MCP, we’ve created a powerful way to automate payments and communication using AI.

Whether you’re a developer, a business owner, or just someone who loves smart automation, this project is a perfect starting point for building even smarter digital workflows.

Automating UPI Payments link sharing on WhatsApp with using AI/LLM’s. was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.

By

Leave a Reply

Your email address will not be published. Required fields are marked *