How Razorpay is Solving the ‘Payment Nahi Aaya’ Problem with AI

Razorpay has migrated from a monolithic PHP architecture to GoLang-based microservices, allowing engineers to deploy features independently.
How Razorpay is Solving the 'Payment Nahi Aaya' Problem with AI

For businesses, a delayed or missing payment can be a nightmare, leading to frustration and inefficiencies, especially when it comes to smaller businesses in tier-II & III cities. Razorpay, a leader in India’s fintech space, is tackling this issue head-on with AI, transforming the way payments, security, and the delay and return of payments are handled.

One such innovation is the UPI Switch, with which unexpected and pending payments are now a thing of the past. “While the industry’s uptime averages around 94-95%, our system boasts an impressive 99.995% uptime,” Rahul Kothari, COO at Razorpay, said at FTX’25.

“No middlemen. No waiting 5 to 7 days for refunds. Our infrastructure can now handle 10,000 transactions per second with latency under 100 milliseconds. With UPI Switch, we’ve made ‘payment nahi aaya’ a history.

But what goes on behind the curtains? Murali Brahmadesam, CTO and head of engineering at Razorpay, spoke at the event detailing how the company’s tech stack and innovations are solving the delayed payments and refund issue for businesses.

Among the key announcements at FTX’25 was Ray Concierge, an AI onboarding system that simplifies the often complex process of setting up payment gateways. 

Ray, launched last year, is an essential framework for solving the country’s payment problems. This year, contextual support has been integrated across dashboards, allowing users to get real-time answers without navigating away. 

“Previously, users had to dig through multiple screens to get settlement details,” Brahmadesam explained. “Now, they can simply hover over an entry and get their answers instantly.” Similarly, payroll customers can analyse changes in payslips month-over-month with AI-driven insights. These features enhance decision-making and operational efficiency.

Reducing Return to Origin with AI

In India, 30% of e-commerce orders suffer from the return-to-origin (RTO) problem.

“Our AI models can predict whether a customer is likely to return an order,” Brahmadesam explained. “This allows merchants to configure prepayment options and reduce their losses.” This has reduced RTO rates by 50-70%.

To support its rapid growth, Razorpay has adopted a cellular architecture, reducing dependencies between services and enabling quick regional launches. “With our new architecture, we were able to launch in Malaysia in under three weeks,” Brahmadesam said.

Additionally, the company has reduced operational costs by 75% through measures like cost visibility tools for engineers, AWS-managed services to reduce infrastructure overhead, and automated scaling to optimise cloud resource usage.

With payments, resiliency and availability are critical. Razorpay has migrated from a monolithic PHP architecture to GoLang-based microservices, allowing engineers to deploy features independently.

“Moving to microservices has empowered our teams to take full ownership of their features and deploy at their own speed,” said Brahmadesam.

To improve database stability, Razorpay has moved 100% of its databases to AWS Aurora, reducing connection issues and improving latency with proxy servers. The company has also implemented global databases, ensuring automatic failover between Mumbai and Hyderabad, thus enhancing uptime.

The Yogi Factor

Razorpay is now focusing on AI-first products, with the recently launched Agentic Toolkit enabling developers to integrate payments without reading extensive API documentation. At the event, the company further showcased its vision for the future of payments by introducing an Agentic AI toolkit designed to enable seamless payments. 

“A single developer can now set up payment processing in under an hour using our agentic toolkit,” said Brahmadesam. “This is a game-changer for businesses looking to go live quickly.”

“Previously, merchants had to redirect customers to Razorpay for refund queries. Now, with Ray, they can get answers directly within their own platforms,” Brahmadesam explained.

To power these innovations, Razorpay has developed Yogi, an internal AI platform that understands the entire product ecosystem.

“Yogi ensures that customer queries are handled seamlessly across chatbots, WhatsApp, and phone support,” Brahmadesam said. “It personalises responses based on the user’s interaction history, making support more efficient.”

DDoS attacks and fraudulent transactions pose significant challenges for fintech platforms. Razorpay has developed merchant-level AI models that differentiate between legitimate traffic and attacks.

“We’ve built AI models that can quickly determine whether a surge in traffic is due to a real sale event or a DDoS attack,” Brahmadesam explained. On the transactional risk front, Razorpay has implemented AI-driven fraud detection models to counteract phishing, identity theft, chargebacks, and card testing frauds.

“Fraud tactics keep evolving, so we have a dedicated risk operations team that constantly fine-tunes our AI models and rule-based systems,” said Brahmadesam.

How is Razorpay Shipping So Fast?

Razorpay encourages innovation through annual three-day hackathons, in which 648 employees from across departments participate. Last year, 121 plus ideas were shared, of which 60% have already been shipped. 

Razorpay has also started its own lab, which currently comprises five employees. It is a small team whose charter is to innovate in the payment space and not be afraid of failure. “Over 15 ideas were tried, of which 50% were in AI.”

One such tool is the Co-Pilot, an AI-powered tool for assisting developers with payment gateway integration. “We codified our internal knowledge into LLMs so developers can ramp up quickly,” said Brahmadesam. AI-powered code reviews and unit test generation have significantly improved development cycles. Additionally, debugging infrastructure issues has been revolutionised with an AI-driven DevOps assistant.

Developer onboarding and productivity have been a focus area for Razorpay. Typically, a new engineer takes two weeks to get familiar with the ecosystem. To streamline this, Razorpay has built an LLM-powered knowledge base that accelerates onboarding.

“Our engineers were raising around 600 tickets per month for DevOps issues like Kubernetes failure,” Brahmadesam noted. “Now, with AI-driven debugging, the team can resolve most issues themselves, reducing DevOps workload significantly.”

Razorpay also contributes to the developer community with over 53 open-source repositories, including Blade, its internal design system.

📣 Want to advertise in AIM? Book here

Picture of Mohit Pandey

Mohit Pandey

Mohit writes about AI in simple, explainable, and sometimes funny words. He holds keen interest in discussing AI with people building it for India, and for Bharat, while also talking a little bit about AGI.
Related Posts
Association of Data Scientists
GenAI Corporate Training Programs
Our Upcoming Conference
India's Biggest Conference on AI Startups
April 25, 2025 | 📍 Hotel Radisson Blu, Bengaluru
Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.