The Genesis of a Pricing Problem
For MockEvalio, the journey to accepting real payments began with a single, clear pricing structure: a Free tier and a Pro tier at ₹399 per month. This price point was established early in the project's development, sitting on the pricing page for nearly a month. While the Razorpay keys were integrated into the configuration from the project's inception, the payment processing functionality remained non-operational. The challenge was not in setting the price, but in making the payment system actually work.
The critical breakthrough occurred on April 3rd at 23:16, almost four weeks after the project's commencement. A significant commit landed, introducing the first functional payment processing capabilities. This included a Razorpay orders API client, robust signature verification, reliable webhook handling, persistence of captured payment records, and a fully integrated checkout flow on the frontend. Prior to this commit, the "Pro, ₹399/month" was merely a static display on a pricing page, disconnected from any transactional backend. Following this update, the system was finally equipped to accept actual payments at the intended price.

The Unforeseen Price Fragmentation
The situation took a sharp, unexpected turn just nine hours after the payment system went live. What was supposed to be a straightforward ₹399 transaction fractured into three distinct price points. This sudden deviation from the planned pricing structure created immediate confusion and operational issues for MockEvalio. The precise cause of this fragmentation was not immediately apparent, suggesting a potential bug within Razorpay's subscription tier or pricing logic itself.
The core of the issue appears to be how Razorpay handles subscription plan configurations, particularly when multiple tiers or variations are involved, even if intended to be identical in price. When a system is configured to accept a payment for a specific product or service, especially a recurring subscription, the pricing engine must accurately interpret and apply the defined cost. In this instance, the system that should have consistently presented and processed a single ₹399 charge began to interpret or present the same offering at three different, unspecified prices. This is not a matter of dynamic pricing or tiered discounts; it is a fundamental failure in presenting a fixed price accurately.
The implications of such a bug are significant for any business relying on predictable revenue streams. For MockEvalio, this meant that potential customers attempting to subscribe to the Pro plan were likely encountering inconsistent pricing. This inconsistency could manifest in several ways: the checkout page might show different prices to different users, or perhaps different price points are associated with the same feature set depending on an internal, unapparent categorization by Razorpay's system. Such ambiguity erodes customer trust and can lead to abandoned carts and lost revenue. Developers integrating payment gateways expect a stable and predictable system. When the gateway itself introduces such fundamental discrepancies, it undermines the reliability of the entire payment infrastructure.
Investigating the Root Cause
While the provided excerpt does not detail the exact technical cause, a bug of this nature in a payment gateway typically points to several potential areas within Razorpay's backend infrastructure. One possibility is an issue with how subscription plans are internally mapped or referenced. If the system maintains multiple internal identifiers or configurations for what should be a single plan, it could lead to disparate pricing being applied. Another possibility lies in the webhook or callback mechanism used to confirm payments. If the data payload received by MockEvalio's system, or processed by Razorpay, contains erroneous pricing information or is misinterpreted due to varying data structures, this could explain the price divergence.
Furthermore, edge cases in Razorpay's plan creation or update logic could be at play. Perhaps a subtle difference in the API calls used to set up the initial ₹399 plan versus subsequent attempts to 'update' or 'verify' it led to Razorpay creating or referencing distinct pricing entries. The fact that it became *three* different prices, rather than just one incorrect price, suggests a systematic issue rather than a simple typo. This could indicate a loop or a branching logic within the pricing module that, under certain conditions, generates multiple distinct price configurations from a single input.
The author's statement, "and I don't know why," highlights the opacity that can surround such bugs in complex third-party services. Developers often have limited visibility into the internal workings of payment gateways. When a critical bug like this surfaces, troubleshooting becomes a process of elimination and hypothesis, often requiring detailed logs and support from the gateway provider. The lack of immediate clarity underscores the need for robust error reporting and debugging tools within such essential services.
Broader Implications for SaaS and E-commerce
This incident serves as a stark reminder of the critical dependency startups and established businesses alike have on their payment infrastructure. Razorpay, as a prominent payment gateway in India, processes millions of transactions. A bug affecting pricing accuracy, even if seemingly localized, can have far-reaching consequences. For MockEvalio, this bug directly impacted their ability to monetize their Pro offering. For other businesses using Razorpay subscriptions, the fear is that similar, undiscovered issues could be silently affecting their revenue or customer experience.
The incident also underscores the importance of thorough testing, not just of one's own application logic, but of the integrated third-party services. Developers must anticipate that external systems can and do fail or exhibit unexpected behavior. Comprehensive testing of the payment flow, including edge cases for subscription renewals, plan changes, and different payment methods, is paramount. This involves not only verifying that payments are processed but also that they are processed at the *correct*, intended price under all foreseeable conditions.
For founders, this situation emphasizes the need for contingency planning. Relying on a single payment gateway introduces a single point of failure. While switching gateways is a complex undertaking, understanding the risks and having a strategy in place can be crucial during a crisis. The immediate impact on MockEvalio was likely a pause in their ability to confidently onboard new paying customers, a direct hit to their growth momentum. The resolution of such a bug often requires close collaboration with the payment gateway's support team, which can be time-consuming and resource-intensive, diverting focus from product development and customer acquisition.
The surprising detail here is not merely that a bug occurred, but that it manifested as a fragmentation into *three* distinct prices for what should have been a single, fixed subscription cost. This suggests a deeper issue within Razorpay's pricing or subscription management logic that warrants thorough investigation by the payment provider to prevent recurrence across their user base.
