Find revenue at risk
A signed Razorpay Test Mode failure becomes one durable, idempotent recovery case instead of disappearing into a payment log.
About RecoveryOS
An explainable, policy-controlled system that turns failed payments into recoverable cases, schedules the right next action, and tracks the outcome without giving AI direct control over money or messages.
The simple version
Razorpay already tells a merchant that a payment failed. RecoveryOS answers the harder next question: should the system wait, offer another path, create a recovery link, contact the customer, escalate the issue, or stop?
Every recommendation is explained, every action is checked by deterministic policy, and every result is stored so the merchant can see what recovered and why.
Razorpay challenge fit
RecoveryOS deliberately completes one revenue-recovery direction end to end: detect the loss, determine the intervention, execute within policy, and prove the outcome with measured money and an audit trail.
A signed Razorpay Test Mode failure becomes one durable, idempotent recovery case instead of disappearing into a payment log.
Deterministic diagnosis explains the failure, then GPT-5.6 Terra proposes one structured intervention from read-only facts.
Policy can approve, delay, replace, escalate, or deny the proposal before the worker reaches any Razorpay tool.
A reproducible 250–500-payment run compares RecoveryOS with no intervention and a naive retry using the same outcomes.
Attempt limits, cooldowns, merchant-error rules, duplicate protection, and payment-state checks decide when to escalate or stop.
The case timeline retains detection, evidence, proposal, policy decision, execution, verification, and the final outcome.
Checkout abandonment, subscription recovery, B2B receivables, mandate sequencing, voice recovery, and promise-to-pay tracking remain out of scope. The failed-payment loop is the complete first version.
Frozen batch evidence
This fixed Test Mode-labelled simulation compares all three strategies against identical generated payments and outcome rolls.
500 synthetic failed payments.
Named immediate-retry baseline.
45.2% recovered.
164 policy stops · 63 escalations · 8 unnecessary interventions prevented.
How it works
The model advises. Deterministic code decides what is allowed. The execution layer alone can create a side effect.
Razorpay Test Mode sends a payment failure, or the demo simulator creates a clearly labelled synthetic case.
A deterministic engine reads the failure source, reason, payment method, and attempt history.
GPT-5.6 Terra proposes one bounded recovery strategy using only the case facts it is given.
Deterministic policy checks consent, cooldowns, limits, duplicates, and whether the payment already succeeded.
BullMQ schedules an approved action. Only the execution layer can call Razorpay or update durable state.
Recovery is verified, written to the audit timeline, and reflected in the dashboard and simulator comparison.
System architecture
PostgreSQL keeps the business truth. Redis and BullMQ keep work moving. The worker connects diagnosis, AI, policy, provider tools, and verification.
Dashboard, Reported Issues, case detail, and Test Mode checkout.
Orders, signed events, payment state, and silent Payment Links.
Validates requests, persists webhook events, serves product data, and enqueues background work.
Cases, actions, policies, jobs, outcomes, and audit history.
Delayed jobs, retries, stable IDs, and the repeatable scheduler.
Classifies failure cause and provides a safe fallback.
Proposes one structured action. It has no execution tools.
Checks safety, consent, limits, cooldowns, and duplicates.
The worker re-checks payment state, executes a bounded action, verifies the result, and sends the updated truth back to the product.
What is integrated
Test Mode and simulated records are visibly labelled so a demo outcome can never be mistaken for real merchant revenue.
Test checkout, signed webhook ingestion, payment status checks, and silent Test Mode Payment Links.
Structured Responses API proposals with strict Zod validation, time and token limits, and a deterministic fallback.
Durable cases, payments, actions, policies, job records, simulator outcomes, and complete audit events.
Persistent delayed work, bounded retries, stable job IDs, verification, and scheduled reconciliation.
Validated product APIs, webhook endpoints, analytics, simulator runs, secure headers, and rate limits.
Executive recovery metrics, Reported Issues, case reasoning, Test Mode checkout, and visible data-source labels.
Judge-ready proof
Each gate is verified. Live Razorpay Test Mode evidence stays separate from the labelled simulated batch comparison.
The Vercel merchant experience is connected to healthy Railway API and worker runtimes backed by Aiven PostgreSQL and Redis Cloud.
A signed payment.failed event creates exactly one visible Test Mode case. Replaying the same provider event does not duplicate the case, action, or job.
The case timeline shows a GPT-5.6 Terra proposal, an independent policy decision, a silent action-bound Payment Link, and a verified paid Test Mode outcome.
A frozen 250–500-payment run compares RecoveryOS with no intervention and naive retry, reconciling incremental rupees, policy stops, escalations, and false interventions.
The reset flow, audit trail, graceful Razorpay 5xx retry, architecture explanation, and judge walkthrough are packaged as a repeatable demo.
The important boundary
RecoveryOS gives GPT-5.6 Terra read-only case context. It cannot write to PostgreSQL, call Razorpay, or message a customer. Those capabilities stay behind deterministic policy and auditable tools.