Razorpay AI Buildathon · Track 03 / AI Revenue Recovery

Recover revenue. With receipts.

Every failed payment has a reason. RecoverFlow reads the evidence, picks one bounded recovery action, and waits for a human — leaving a tamper-evident trail behind every decision.

Built for OTP timeouts

  • 0 autonomous money moves
  • 5 policy guardrails
  • 100% decisions audited
POST /api/diagnose LIVE ENGINE
    Connecting to engine…synthetic events · no real payments
    ₹
    ₹12,499 savedapproved by a human
    ✓
    Chain verifiedSHA-256 linked
    4step pipeline

    Detect → Diagnose → Bound → Recover

    21held-out scenarios

    Regression suite, reproducible with npm run evaluate

    24hretry window

    At most one retry per payment per day

    0dependencies

    Pure Node. Nothing to patch, nothing to trust.

    How it works

    From failed payment to approved action in four steps.

    01

    Detect

    Signed Razorpay webhooks — payment.failed, mandate and invoice events — verified by HMAC before anything else.

    X-Razorpay-Signature: …
    02

    Diagnose

    Evidence-grounded cause with a calibrated confidence. No evidence, no recommendation.

    94%
    03

    Bound

    A deterministic policy layer checks consent, retry limits, duplicates and amount thresholds.

    HUMAN_GATENO_CONSENT
    04

    Recover

    A human approves one action. The outcome and its evidence are sealed into the audit chain.

    Approve
    Features

    Everything a payments team needs to trust an AI agent.

    Tamper-evident

    A hash-chained audit trail

    Each entry commits to the one before it. Edit history and the chain visibly breaks.

    CHAIN VERIFIED · EVERY ENTRY LINKS TO THE LAST
    Consent-safe

    Messages that respect opt-outs

    Opted-out customers are never contacted — drafting is blocked by policy.
    Human in the loop

    The AI proposes. A person decides.

    Auto-charge
    Auto-refund
    Human approval
    Explainable

    Decision lab

    
            
    Hardened

    Secure by default

    • Strict CSP & security headers
    • Only public/ is served
    • Idempotent webhooks
    • Test-mode keys only
    Guardrails

    Hard stops, not suggestions.

    These run on every event, before a human ever sees a recommendation.

    Try to break them →
    • NO_CONSENT

      No contact after opt-out. Ever.

    • HIGH_VALUE_REVIEW

      Payments above ₹5,00,000 go to senior review.

    • EXCEPTION_QUEUE

      Duplicates, disputes and mandate loops are held for a human.

    • LOW_CONFIDENCE

      Unsure diagnoses never become actions.

    • HUMAN_GATE

      Everything else still needs one explicit approval.

    FAQ

    Straight answers.

    Does it move real money?

    No. The demo uses synthetic payments, and the optional integration only accepts Razorpay Test Mode keys. No action executes without human approval.

    Is the AI making the decisions?

    The AI classifies the cause and drafts an intervention. A deterministic policy engine decides what is allowed, and a human approves it.

    What is real and what is simulated?

    The diagnosis, policy engine, HMAC verification, idempotency and audit chain are real code with tests. The sample payments and the batch outcome simulator are illustrative and labelled as such.

    How do I connect Razorpay?

    Deploy, set RAZORPAY_WEBHOOK_SECRET, add /webhooks/razorpay in the Test Mode dashboard, and trigger a failed test payment. See the deployment runbook in the repo.

    Stop guessing why
    payments fail.

    Open the dashboard, run a sweep, and approve your first recovery in under a minute.