Razorpay AI Buildathon · Track 03

A failed paymentis money youalready earned.

Recover watches your Razorpay payment stream for the ones that didn't go through — a card that expired, a balance that was short, a mandate that lapsed, an invoice past due — works out why, and runs one careful, policy-bounded attempt to get it back. Every step is written down.

Demo instance with synthetic merchant data. Reviewer sign-in details are in the For reviewers section.

0
recovery scenarios, one engine
0
Razorpay failure codes classified
0%
of steps in the audit trail
0
bounded action per case, chosen by policy

The gap

Most recovery work never gets done

When a payment fails, the customer usually meant to pay. But chasing every drop-off by hand doesn't scale, generic “your payment failed” blasts get ignored, and finance teams write off the long tail. The money is recoverable — it just needs a fast, correct, bounded follow-up.

How it works

What happens to a failed payment

Every case moves through the same six stages. A person only steps in when the engine is unsure or the amount is large — otherwise it runs on its own, and stops the moment a policy limit is reached.

01

Detect

A payment.failed webhook, an abandoned checkout, or an overdue invoice opens a case.

02

Diagnose

A rules table maps the Razorpay code to a cause. Unclear ones go to review, never a guess.

03

Decide

The policy for that cause picks one action and mints a real Razorpay Payment Link.

04

Draft

A template fills in the real name, amount and link — no invented facts.

05

Send

The message goes out over email via Brevo, with the delivery reference recorded.

06

Recover

When the customer pays, the amount and time-to-recovery are logged on the case.

A case, start to finish

You can read every decision it made

One real case from the demo instance: a checkout that dropped off at payment. The engine matched the decline code to INSUFFICIENT_FUNDS at 95% confidence, scheduled a retry link, wrote the email from a template, and sent it through Brevo — then a reviewer confirmed the customer had paid.

Nothing in that chain is a black box. Each line carries a reason code, an actor, and a before/after snapshot, and the whole thing exports to CSV. When a step fails — a Payment Link that didn't mint, a bounced send — that's in the trail too, next to the retry that recovered it.

Sara Nair
QuickCart India · checkout drop-off
₹2,488.82
Recovered
Cause
INSUFFICIENT_FUNDS
Confidence
0.95 · rule engine
Action
RETRY_LINK
Payment link
plink_TVz7tlOP…
  1. Recovery event ingested — case opened.
    system · → DETECTED
  2. Classified as INSUFFICIENT_FUNDS by rule engine (0.95).
    system · DETECTED → DIAGNOSED
  3. Scheduled RETRY_LINK with a Razorpay Payment Link.
    system · DIAGNOSED → ACTION_SCHEDULED
  4. Draft message generated from template (email).
    system · draft_created
  5. Message delivered — ref <…@smtp-relay.mailin.fr>.
    system · ACTION_SCHEDULED → ACTION_SENT
  6. Reviewer marked the case recovered — ₹2,488.82.
    human · ACTION_SENT → RECOVERED

What it handles

Three situations, one recovery engine

The same detect–diagnose–decide loop covers all three. Each scenario adds its own cause codes, policies, and message templates — not a separate system.

Checkout drop-off

The customer left at payment

A card declined, funds were short, an OTP was abandoned, the gateway timed out. Recover sends a reassuring retry link inside the allowed hours.

CARD_EXPIREDINSUFFICIENT_FUNDSOTP_ABANDONEDGATEWAY_TIMEOUT
Failed subscriptions

A renewal didn't go through

The auto-pay mandate lapsed, expired, or hit a low balance. Recover explains that the authorization itself needs re-doing and links straight to it.

MANDATE_LAPSEDMANDATE_EXPIRED_CARDMANDATE_INSUFFICIENT_FUNDS
Overdue invoices

A B2B invoice is past due

A three-tier ladder — a friendly nudge, then a firm reminder, then escalate to a human. Large balances always reach a person first.

INVOICE_OVERDUETier 1 → 2 → 3

Where it stops

It stays inside the lines you draw

Recovery is only useful if merchants trust it near their customers and their money. Every limit below is configuration, editable per cause code on the Policies screen, and applied on the next run.

Low confidence goes to a human

If the diagnosis scores below the policy threshold, the case is held for review — never sent on a guess.

Large amounts go to a human

Anything over the review threshold waits for an approval before any outreach leaves the system.

One conversation at a time

A per-cause cooldown stops Recover contacting the same customer twice in quick succession.

Civil hours only

Outreach is pinned to an IST send window per cause code. Nothing goes out at 3am.

A hard attempt cap

Once the maximum attempts for a cause are spent, the agent stops and the case is closed or escalated.

No silent actions or failures

Every transition — the agent's own, and every failed step and retry — writes a reason and an actor to the audit trail.

For reviewers & judges

Sign in and follow the money

A buildathon build on a demo instance — the merchants, customers and failed payments are synthetic. Sign in with any account below (all use the password recover123) and the console opens on the recovery summary.

Reviewer accounts

admin@recover.test · full access
reviewer@recover.test · approve / reject
viewer@recover.test · read only

The console opens on the recovery summary — recovered amount, recovery rate, average time to recovery, and a live feed as the engine works through cases.

  • Is it explainable?
    Open any case and read the audit timeline: cause, confidence, the scheduled action, the draft, the delivery reference.
    Cases → open a row → Audit timeline
  • Is it bounded?
    Change a cooldown on the Policies screen, reload, see it stick. Then open Approvals to see what the agent declined to act on, and why.
    Policies → edit → reload · then Approvals
  • Is the audit trail real?
    On a case page, click Download Audit Trail (CSV) and check a row against the on-screen timeline and the delivery provider reference.
    Cases → open a row → Download Audit Trail (CSV)
  • Is recovery actually measured?
    Note “Total recovered” on the summary, mark a sent case recovered, come back — the figure moves by exactly that amount and average time updates.
    Summary → a sent case → Mark Recovered → Summary

The bar for Track 03

Explainable, bounded, gated — with the audit trail to prove it.

That's the brief. Recover is built around it: a rules-first diagnosis, one policy-bounded action, a human in the loop where it matters, and a record of every step.