Softechinfra
Business

Independence Day Sale Eve: A 5-Point Stack Health Check for Razorpay-Powered D2C Sites

Amazon Great Freedom Festival runs July 31-Aug 6 2025. By Aug 14 your D2C site has had 14 days of festive load. Five concrete checks: CDN warm-up, idempotent webhooks, MTD reconciliation, SMS rate-limit tuning, GA4 event drift.

Softechinfra EditorialSoftechinfra Editorial
May 15, 202613 min read
Independence Day Sale Eve: A 5-Point Stack Health Check for Razorpay-Powered D2C Sites

Amazon's Great Freedom Festival ran July 31 to August 6, 2025 — and Flipkart's Big Saving Days, Myntra's Independence Day campaign, and a long tail of brand-direct mailers all stacked into the same window. By August 14, your Razorpay-powered D2C site has been through ~14 days of festive load. Some things that worked in May are now leaking, and a leak can cost real money for weeks before anyone notices. This post is the 5-point checklist with the fixes.

14 days
Of Festive Load Already on Your Stack
5
Concrete Checks in This Post
90 min
To Run All Five

The Answer in 60 Words

Run these five checks in order: (1) CDN cache hit rate on your top 20 product pages — should be > 92% during peak; (2) Razorpay webhook handler idempotency — Razorpay redelivers, your handler must dedupe; (3) month-to-date payments vs your DB reconciliation — should be drift-free; (4) SMS rate-limit tuning so order-confirms get through; (5) GA4 event drift caused by checkout-page A/B tests.

Why This Matters Now (14 August 2025)

Amazon's Great Freedom Festival 2025 ran July 31 to August 6. Independence Day itself (August 15) drives a second smaller surge from brand-direct mailers and the "use your bonus" campaigns timed to the long weekend. By the morning of August 14, your stack has had two weeks of compounded festive traffic and you are 7 days from the September festive lead-up (Onam, then Ganesh Chaturthi). If something is silently leaking now, fix it before the next surge arrives.

The honest version: most D2C teams notice a leak only when their CFO points out the GMV-to-bank-deposit gap at the end of the month. This post is the morning-of-Aug-14 walk-through to find the leak before that meeting.

Check 1: CDN Cache Hit Rate on Your Top 20 Product Pages

The single most expensive performance leak on a Razorpay-powered D2C site is uncached product pages hitting your origin during peak. Even at 12 RPS sustained on the homepage, 3 RPS hitting your origin instead of CDN can saturate a single Hetzner CCX23 box.

What to check:

  • Cloudflare dashboard > Analytics > Cached Requests % — should be > 92% during peak hours.
  • Per-URL breakdown via the Cloudflare API. Filter to your top 20 product pages by traffic. Any with cache hit < 80%? Investigate.
  • Common cause: the product page sets a unique cookie per visitor (cart_id, session_id) and your cache rule does not strip cookies before keying.
  • The fix is usually a Cloudflare Page Rule or Cache Rule that says "for /product/*, strip cookies, cache for 4 hours, vary by query string only." The price-display widget on the page can be a separate JSON fetch that hits your origin and is small.

    If you are on Cloudflare Free, the Cache Rules feature has a 10-rule limit. For more flexibility, the Pro plan gives you a richer rule engine. For most D2C sites under ~3 RPS sustained, Free is enough — the trick is the rule, not the plan tier.

    Check 2: Razorpay Webhook Handler Idempotency

    Razorpay's official webhooks documentation is explicit: events may be delivered more than once. The best-practices guide says: build idempotent handlers, dedupe on event id, expect out-of-order delivery, respond 2xx on success.

    Three failure modes we see most often:

    2x
    Double-Charge Order
    Webhook re-delivered, your handler re-processed payment.captured, order grand total doubled in DB. Fix: unique index on (razorpay_event_id) before any state mutation.
    FT
    Fee Drift
    You compute Razorpay fee at checkout but later re-read it from a webhook, which sometimes returns a slightly different number for instruments like UPI vs card. Fix: trust your checkout-time computation, log the webhook value separately for reconciliation.
    OO
    Out-of-Order Events
    order.paid arrives before payment.captured occasionally. If your handler keys off "must process payment.captured first," you stall. Fix: state machine that allows transitions from any prior state to a higher state, never backwards.
    !2xx
    Slow Response
    Your handler takes 8 seconds to respond. Razorpay times out at 5s and retries. You now have a parallel duplicate processing wave. Fix: respond 200 immediately, queue the work asynchronously.

    How to check today: pull last 7 days of Razorpay webhook logs. Group by event id. Any event id appearing more than once + your DB shows the order processed more than once = leak. Run this query against your audit log table:

    SELECT razorpay_event_id, COUNT(*) AS hits
      FROM webhook_audit
      WHERE created_at > NOW() - INTERVAL '7 days'
      GROUP BY razorpay_event_id
      HAVING COUNT(*) > 1;

    Anything in the result? That is your leak.

    Check 3: Month-to-Date Reconciliation (DB Vs Razorpay Dashboard)

    The discipline: every morning at 9 am, your team should compare:

  • Total Captured This Month from your DB (sum of order amounts where status = paid AND payment_date this month)
  • Total Captured This Month from Razorpay Dashboard > Reports
  • These two numbers should match within ₹0. If they drift, you have an unreconciled gap somewhere — usually refunds, partial captures, or a webhook that failed.

    This is the check most likely to find money. A typical pattern: a refund processed in Razorpay was not webhook-acknowledged because the handler 500'd that day. The order shows status = paid in your DB; Razorpay shows it as refunded. Net cash impact: money missing on every such transaction until someone reconciles it.

    The fix is procedural plus technical:

  • A daily cron at 8 am pulls Razorpay's Settlement API for the previous day, compares against your DB, writes any mismatches to a reconciliation_queue table.
  • A 9 am email to the finance lead with the queue contents (typically empty; alarming when not).
  • A weekly review with the founder of any aged-over-7-day items.
  • This pattern catches the leak. Without it, the leak only surfaces at month-end when the bank deposit number does not match the dashboard.

    Check 4: SMS Rate-Limit Tuning

    Order-confirmation SMS during a sale spike sits in a queue. If your SMS provider (Twilio, MSG91, Gupshup) has a per-second rate cap, queue depth grows, latency creeps up, and order-confirms arrive 4 hours late. Customers panic. Support tickets pile up.

    What to check:

  • Your SMS provider's dashboard > rate-limit graph for the sale period (Aug 1-7). Did your queue depth exceed 60 seconds at any point?
  • Default rate limits: Twilio India long codes ~3 SMS/second; MSG91 transactional ~10/second on the basic plan; Gupshup transactional ~25/second.
  • Festive D2C peaks can hit 80+ SMS/second on a popular drop.
  • The fixes:

  • Per-route prioritisation. Order-confirmation SMS goes ahead of marketing SMS. Use separate provider sender IDs.
  • Provider-side rate increase. A 1-line email to your provider asking for a temporary rate bump — most will lift to 50-100/sec for a day with 24 hours notice.
  • Batched WhatsApp templates as fallback. WhatsApp Business API is rarely the rate-limit bottleneck. Set up an order-confirm template and route to WhatsApp first, SMS as fallback. ~88% of Indian D2C buyers have WhatsApp; better delivery, lower cost.
  • Check 5: GA4 Event Drift Caused by Checkout-Page A/B Tests

    Most D2C teams run a checkout-page A/B test in the lead-up to a sale. The test changes button text, repositions the trust badges, swaps the upsell offer. The team forgets to update the GA4 event names accordingly.

    Result: by August 14, your GA4 conversion-funnel report shows mysterious gaps because the new variant fires begin_checkout_v2 while the old fires begin_checkout, and your funnel report aggregates only the latter.

    What to check:

  • GA4 > Configure > Events. Look for any event with a v2, _new, _test suffix that has fired > 1,000 times this month.
  • GA4 > Reports > Conversions. Are your funnel-step counts on the day-after-sale dramatically lower than the cart-add count?
  • Tag Manager > Versions. Was a new version published in the last 30 days?
  • The fix is usually a 5-minute Tag Manager change to consolidate event names, plus a manual GA4 conversion-event re-mapping. The damage is to your post-sale analysis — you cannot make rational decisions about the next sale if your funnel data is broken.

    The dirtiest secret of D2C analytics during sale season: the team that ran the A/B test rarely talks to the team that owns the analytics dashboard. By the time anyone notices, two weeks of data is contaminated. Run check 5 today. It is the cheapest of the five and the highest-impact for your December planning.

    The 90-Minute Run-Through (Copy This)

    Here is the exact run-of-show we use on a client audit. Sequential, no parallelism — this is one engineer at a laptop with a coffee.

    1
    Minutes 0-15: CDN cache health
    Cloudflare Analytics > Cached Requests over the last 7 days. Drill into the bottom-cached 10 URLs. Identify cookie-strip rule gaps.
    2
    Minutes 15-35: Webhook idempotency
    Run the duplicate-event-id query against the webhook audit table. Investigate any non-zero result. Patch the handler if needed.
    3
    Minutes 35-60: MTD reconciliation
    Pull DB total. Pull Razorpay Dashboard total. Compute delta. If non-zero, drill into refund + partial-capture history. Stand up the daily reconciliation cron if not already running.
    4
    Minutes 60-75: SMS rate-limit
    Provider dashboard > queue-depth graph. Email provider for rate increase if queue ever exceeded 60s. Set up the WhatsApp fallback template if not already.
    5
    Minutes 75-90: GA4 event audit
    GA4 > Events. Look for v2-suffix events. Reconcile with Tag Manager. Patch the funnel report definitions.

    The Leak That Hurts Most

    Of the five, reconciliation drift is the one that makes founders wince. Money silently leaving the bottom line every month is real money, and across an 18-month period it compounds.

    When This Audit Will NOT Find Anything

    Skip the audit if (a) your monthly GMV is under ₹3 lakh — the leaks at that scale are usually too small to be worth the engineer time, (b) you do not use a payment gateway and only do COD — most of these checks do not apply, or (c) you have run a daily reconciliation cron for 6+ months with zero findings — your stack is healthy and the next leak will surface from the cron, not from this audit.

    The "Wrong Reactions" We See in the Wild

    A few common over-reactions worth flagging:

  • "We will switch payment gateway." Razorpay's webhook spec is fine. Your handler is the issue 90% of the time. Switching to Cashfree or PayU will replicate the same idempotency requirements; the bug will follow you.
  • "We will move off Cloudflare." Cloudflare is the cheapest and most reliable CDN for Indian D2C. The cache rule is the problem, not the CDN.
  • "We will hire a DevOps person." Maybe. But the 5 checks above are 90 minutes of work. Run them first; then assess the staffing gap with real data.
  • Example: what one run could find

    Take a hypothetical beauty D2C brand on Shopify + Razorpay running all five checks. A run like this could turn up:

  • A CDN cache hit rate well below 92%, fixed by stripping the cart_id cookie on product pages.
  • A webhook handler with no idempotency, where duplicate payment.captured events over-credit customer wallets.
  • Reconciliation drift from refunds processed in Razorpay but not webhook-acknowledged.
  • SMS queue depth spiking during a launch. The fix is WhatsApp-first templates with SMS fallback.
  • GA4 tracking a deprecated add_to_cart_v3 event, so the funnel report under-counts.
  • Each fix is small. Together they decide whether the next sale's numbers can be trusted.

    A Note on the Razorpay Side

    Razorpay's documentation has gotten a lot better in 2024-25. The webhooks-best-practices page is now the first thing they link to; their settlement API is well-documented; their dashboard shows webhook delivery history. Our typical recommendation: read the docs once carefully when you set up; bookmark the best-practices and settlement pages; run this 5-point check quarterly.

    FAQ

    How often should I run this audit?

    Quarterly minimum. Monthly during festive season (Aug-Nov). Plus immediately after any deploy that touches the checkout, the webhook handler, or the SMS pipeline.

    Does this audit apply to Stripe or PayU sites?

    Yes — checks 1, 3, 4, 5 are gateway-agnostic. Check 2 is gateway-specific in the implementation but the principle (idempotent webhook handlers) applies to every gateway. Stripe's docs are explicit on this; PayU's are less so but the same discipline matters.

    What about UPI Autopay subscriptions?

    Subscriptions add a 6th check we did not include here: the recurring-payment failure rate. Subscriptions on Razorpay can fail for AFA (Additional Factor of Authentication) reasons specific to the buyer's bank. Track the failure rate weekly and alert if it exceeds 8%.

    How do I prevent webhook handler 500s during a peak?

    Three things. Respond 200 immediately, queue the work asynchronously. Make the handler stateless and horizontally scalable. Set up an alert on handler error rate > 1% so you catch issues before they pile up.

    Can the cache-rule fix break my checkout?

    No, if you scope the cache rule to /product/* explicitly. Your /cart, /checkout, and /api routes should remain uncached. Test the rule on a staging-mirror first if your site has unusual URL patterns.

    Why do you care about GA4 event drift this much?

    Because it determines your next-sale planning. If you cannot trust your funnel data, every decision (creative spend, discount depth, inventory positioning) is based on noise. Bad analytics is worse than no analytics — it gives false confidence.

    Do you offer this audit as a service?

    Yes. Same-day, at a fixed price. We send the findings as a written report plus a Loom walk-through. If we find nothing, you pay half. The full pricing and process is on our services page.

    If you found this useful

    Need a Same-Day BFCM-Style Stack Audit?

    We run this 5-point health check on your Razorpay + Shopify or Razorpay + custom stack the same day. Fixed price. Written report + Loom walk-through. If we find nothing actionable, you pay half. Suitable for D2C sites doing ₹3 lakh+ monthly GMV. Email contact@softechinfra.com or book direct below.

    Book a Same-Day Stack Audit
    Tags:
    D2CRazorpayStack AuditFestive SalesWebhooksReconciliationIndian Ecommerce
    Share this post:
    Softechinfra Editorial

    Softechinfra Editorial

    Articles published by Softechinfra without a personal byline.

    How we pick topics, use AI, check claims and correct mistakes: our editorial policy.