Razorpay Buildathon / Track 03 / Revenue Recovery

Recover the revenue India's UPI AutoPay quietly loses.

Reclaym is an operator-run agent for failed recurring payments. It ingests each failed UPI AutoPay mandate, an LLM proposes a bounded recovery action, a deterministic policy engine approves or blocks it against India's NPCI and RBI rules, and every rupee-moving step runs on Razorpay test rails and lands in an append-only audit trail.

Open the consoleRead the architectureTest-mode only. No real money moves.

The problem

The leak is real, acute, and specific to India.

Card-decline retry tools do not model UPI mandates as their own failure state. That is the gap.

8–15%
UPI AutoPay failure rate, vs 2–3% for cards
productgrowth.in
~60%
of active Indian subscriptions lost to e-mandate failures
Codedamn founder
~70%
of recurring donors lost to failed mandates
Internet Freedom Foundation
20M
AutoPay mandates revoked every month
Business Standard

Figures triangulated from founder-attributed press. Sources linked in the README.

How it works

The LLM proposes. The engine disposes.

One judgment call is delegated to a model. Every rupee-moving decision stays deterministic and gated. That boundary is the whole design.

  1. /0.1

    Ingest

    HMAC-verify the Razorpay webhook, dedupe by event id, open a case.

    Deterministic
  2. /0.2

    Diagnose

    Map the failure to a root cause. LLM fallback on redacted, categorical facts.

    AI
  3. /0.3

    Gate

    NPCI 1+3 cap, peak-hour ban, AFA tiers, stopping rules. Approve is the only path to act.

    Deterministic
  4. /0.4

    Execute

    Act on Razorpay test rails. Idempotency-keyed, fenced, tri-state outcome.

    Deterministic
  5. /0.5

    Audit

    Append-only log of every transition with its compliance basis.

    Deterministic

AI judgment

Where we chose not to use AI.

The LLM never touches money.

It emits a schema-validated proposal. The deterministic policy engine is the only executor.

The LLM never certifies its own success.

Recovery rate and rupee-lift come from ground-truth outcomes against a randomized control, not an LLM judge.

The LLM never sets its own guardrails.

Retry caps, peak-hour bans, and stopping rules are hard-coded policy, widened only by deliberate graduation.

The wedge

What no one else does.

The market optimizes when to retry a card. The gap is choosing the right bounded action across heterogeneous Indian failure types, under the regulations that govern them.

Card-retry tools (Stripe Smart Retries, dunning suites) model card decline codes.

Reclaym models the UPI AutoPay mandate as its own failure state, the loss that is structural in India and that no card-first tool touches.

Razorpay's own Subscriptions retries run a fixed T+1 / T+2 / T+3 schedule.

Our policy engine turns India's rules into first-class gates: the NPCI 1+3 retry cap, the peak-hour execution ban, and the RBI AFA amount tiers decide when and whether to act.

Recovery vendors advertise a flat number like "20% recovered" with no control arm.

We report lift over a randomized control, cost-adjusted for wasted touches, bounded by a confidence interval, sliced by failure type, with the slices we do not beat named out loud.

Growth-hack dunning tools are a black box to the operator.

Every action carries its compliance basis in an append-only audit trail, so an operator can see why each rupee-moving decision fired.

Evaluation

Measured honestly, on a held-out batch.

Treatment and control are randomized at the moment of failure and stratified by root cause. We report lift over control, not gross recovery, cost-adjusted for wasted touches, bounded by a confidence interval, and sliced by failure type. These are computed live on a seeded 1,000-case batch, so they match pnpm eval:report. Where an interval crosses zero, we say so.

+28.2pp
recovery lift over a randomized control arm
+12.5pp
over a naive always-retry strategy, the approach anyone would reach for
76.9%
root-cause accuracy under 25% garbled webhooks
160
tests over the correctness core, money paths first
See the live evaluation