Don't blindly retry failed payments. Decide when recovery is worth it, which strategy is best, and whether it is safe to execute.
Payment failures are not all equal.
Some are temporary and highly recoverable. Others are permanently declined, have exhausted their retry budget, carry duplicate-charge risk, or are simply not worth another attempt economically.
Traditional recovery often reduces the problem to:
Payment Failed
β
Retry
β
Retry Again
PulsePay treats recovery as a financial decision problem:
Payment Failure
β
Evidence Collection
β
Recovery Probability
β
Probability Calibration
β
Expected Net Value
β
Strategy Comparison
β
Deterministic Safety Checks
β
Bounded Execution
β
Outcome Measurement
The central principle is:
ML estimates probability. Deterministic policies control whether an action is allowed.
Failed payments create revenue leakage, but blindly increasing retry attempts can create new problems:
- unnecessary payment attempts
- additional recovery costs
- repeated failures
- customer friction
- duplicate-charge risk
- unsafe actions
- negative-value recoveries
- poor decision transparency
The real question is not:
"Can we retry this payment?"
It is:
"Is this payment worth recovering, which intervention has the highest expected value, and is that action safe?"
PulsePay is built to answer that question.
AI-powered payment recovery and smart retries already exist.
PulsePay does not claim to have invented payment recovery.
Its focus is the decision architecture around recovery:
Raw ML Probability
β
Calibration
β
Expected Net Value
β
Strategy Selection
β
Safety Authorization
β
Bounded Execution
β
Measured Outcome
1. Prediction β Authorization
The ML model recommends. The policy engine decides whether execution is permitted.
2. Probability Calibration
Raw probabilities are calibrated before being used for economic decisioning.
3. Expected-Value Optimization
Recovery is ranked by expected net value rather than probability alone.
4. Counterfactual Strategy Comparison
Alternative recovery strategies can be compared before execution.
5. Explicit "Do Not Act" Logic
Permanent declines, exhausted retry budgets, duplicate risk, negative EV, and other policy conditions can block execution.
6. Measurable Safety
The benchmark evaluates economic recovery alongside duplicate-charge and unsafe-action outcomes.
PAYMENT EVENT
β
βΌ
βββββββββββββββββββ
β Revenue Risk β
β Engine β
ββββββββββ¬βββββββββ
βΌ
βββββββββββββββββββ
β Recovery ML β
β Raw Probability β
ββββββββββ¬βββββββββ
βΌ
βββββββββββββββββββ
β Calibration β
β Isotonic / PAVA β
ββββββββββ¬βββββββββ
βΌ
βββββββββββββββββββ
β Expected Net β
β Value β
ββββββββββ¬βββββββββ
βΌ
βββββββββββββββββββ
β Strategy Engine β
ββββββββββ¬βββββββββ
βΌ
βββββββββββββββββββ
β Safety Policies β
ββββββββββ¬βββββββββ
β
ββββββββ΄βββββββ
βΌ βΌ
BLOCK ALLOW
β β
βΌ βΌ
AUDIT EXECUTE
β
βΌ
OUTCOME
PulsePay uses ML for probabilistic prediction, not unrestricted execution.
The model estimates the probability that a recovery intervention will succeed based on payment and contextual signals.
Payment Features
β
Recovery Model
β
Raw Probability
β
Calibration
β
Calibrated Probability
The calibrated probability becomes an input to the economic decision layer.
This creates a clean separation:
| Layer | Responsibility |
|---|---|
| ML | Estimate recovery probability |
| Calibration | Improve probability reliability |
| Economics | Calculate expected value |
| Strategy | Select intervention |
| Policy | Authorize or block |
| Executor | Perform bounded action |
| Outcome Engine | Measure result |
A model can be predictive without producing reliable probabilities.
For example, a prediction of 80% should represent a population that actually recovers at approximately that rate when the model is well calibrated.
PulsePay therefore calibrates raw probabilities before using them for downstream decisions.
Isotonic Regression / PAVA
Total Records : 10,000
Training Records : 7,000
Evaluation Records : 3,000
Seed : 20260826
| Metric | Before | After |
|---|---|---|
| ECE | 33.7% | 14.8% |
| Brier Score | 0.2515 | 0.1483 |
Lower values indicate improved probability reliability.
Probability alone is not enough for financial recovery.
PulsePay estimates the economic value of an action.
Conceptually:
Expected Recovery
=
Calibrated Probability
Γ
Recoverable Amount
and:
Expected Net Value
=
Expected Recovery
β
Recovery Costs
β
Relevant Risk Costs
This prevents the system from prioritizing an action simply because it has a high predicted probability.
The objective becomes:
Maximize safe economic recovery, not retry volume.
PulsePay can evaluate multiple recovery strategies.
Examples include:
- Automated Gateway Retry
- Customer Recovery Link
- Alternative Recovery Intervention
- Halt Recovery
Each strategy can be evaluated using:
- calibrated probability
- expected value
- cost
- safety status
- policy eligibility
Example:
Strategy Expected Value Status
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Gateway Retry βΉ24,497 SELECTED
Recovery Link βΉ20,744 NOT SELECTED
Halt Recovery βΉ0 BLOCKED
The values depend on the synthetic opportunity being investigated.
The important concept is:
PulsePay compares possible actions instead of assuming retry is always optimal.
The ML model does not have unrestricted execution authority.
Before an action is executed, PulsePay evaluates deterministic safety policies.
Blocks recovery attempts against permanently unrecoverable states.
Prevents actions that could create duplicate charging conditions.
Limits repeated recovery attempts.
Blocks actions when expected value is not economically justified.
Prevents accidental repeated execution.
Can block recovery where risk conditions make automated recovery inappropriate.
The resulting flow is:
ML Recommendation
β
Economic Evaluation
β
Safety Policy
β
ALLOW / BLOCK
A high model probability does not automatically mean "execute."
Example:
Recovery Probability = 97%
Permanent Decline = TRUE
Result:
BLOCKED
Reason: Permanent Decline Protection
Another:
Recovery Probability = 91%
Expected Value = Negative
Result:
BLOCKED
Reason: Financial Viability Gate
Another:
Retry Count = Maximum
Result:
BLOCKED
Reason: Retry Budget
This creates a key PulsePay principle:
A good recovery system must know when not to recover.
PulsePay provides a decision record for recovery opportunities.
Instead of relying on generic AI explanations, the system exposes the evidence and calculations behind the recommendation.
A Payment Investigation can include:
- Payment ID
- Amount
- Status
- Failure information
- Relevant context
- Raw probability
- Calibrated probability
- Expected recovery
- Expected net value
- Recommended strategy
- Alternative strategies
- Selection status
- Safety checks
- Blocked conditions
- Policy reasons
- Action status
- Execution history
- Outcome
The operator can therefore trace:
WHAT happened?
β
WHAT evidence was available?
β
WHAT did the model predict?
β
WHAT was the expected value?
β
WHICH strategy was selected?
β
WAS execution allowed?
β
WHAT actually happened?
PulsePay can expose alternative strategies instead of presenting one opaque recommendation.
For example:
Probability Expected Value
Gateway Retry 92% βΉ24,497
Recovery Link 78% βΉ20,744
Halt Recovery β βΉ0
This allows an operator to ask:
"Why this strategy instead of the alternatives?"
The backend strategy engine remains the source of truth for the comparison.
Recovery Mission turns individual decisions into a bounded operational workflow.
A mission can:
- identify eligible opportunities
- evaluate recovery decisions
- apply safety policies
- execute permitted actions
- record blocked actions
- record successful and failed outcomes
- calculate mission-level results
- expose an audit trail
The workflow follows:
Scan
β
Analyze
β
Score
β
Calibrate
β
Optimize
β
Protect
β
Execute
β
Measure
Mission execution is backend-driven rather than simulated using artificial UI progress.
A completed Recovery Mission can expose:
- Revenue at Risk
- Expected Recovery
- Actual Recovery
- Actions Attempted
- Successful Actions
- Blocked Actions
- Unsafe Actions Prevented
- Opportunities Analyzed
- Action Breakdown
- Execution Audit
PulsePay separates:
Expected Recovery
from:
Actual Recovery
so operators can evaluate prediction quality against real execution outcomes.
PulsePay does not stop after recommending or executing an action.
The complete lifecycle is:
Opportunity
β
Prediction
β
Decision
β
Execution
β
Outcome
β
Measurement
This enables measurement of:
- recovery precision
- recovery recall
- net recovery
- net value added
- expected vs actual recovery
- duplicate-charge outcomes
- blocked unsafe actions
- successful and failed executions
PulsePay includes a controlled synthetic benchmark against a blind retry baseline.
Total Records : 10,000
Training Records : 7,000
Evaluation Records : 3,000
Seed : 20260826
Calibration : Isotonic Regression / PAVA
The evaluation is out-of-sample.
| Metric | PulsePay | Blind Retry |
|---|---|---|
| Net Recovery | βΉ1,40,64,879 | βΉ1,16,19,196 |
| Net Value Added | βΉ24,45,683 | β |
| Net Lift | +21.0% | β |
| Duplicate Charges | 0 | 583 |
| Unsafe Actions Prevented | 317 | β |
| Recovery Precision | 96.0% | β |
| Recovery Recall | 100.0% | β |
βΉ1,54,92,199
βΉ1,42,58,836
90.8%
PulsePay generated:
βΉ1,40,64,879
in benchmark net recovery.
Blind retry generated:
βΉ1,16,19,196
Difference:
βΉ24,45,683
Resulting in:
+21.0% Net Lift
The important comparison is not simply how many attempts were made.
It is:
How much additional net value was created by intelligent recovery compared with blind retry?
96.0%
This measures the quality of selected recovery opportunities under the benchmark definition.
100.0%
This indicates that the benchmark's recoverable opportunities were retained by the recovery selection process.
Together:
Precision = 96.0%
Recall = 100.0%
PulsePay's benchmark also evaluates safety-related outcomes.
PulsePay Blind Retry
Duplicate Charges 0 583
Unsafe Actions
Prevented 317 β
This demonstrates why maximizing retry activity is not an adequate objective.
The goal is:
Safe, economically meaningful recovery.
PulsePay intentionally separates live synthetic operations from benchmark evaluation.
The Revenue Center and Recovery Mission use the current synthetic operational database.
Their values can change after:
- reseeding
- executing recovery actions
- running missions
- changing opportunity state
- recording outcomes
The benchmark represents the controlled:
10,000-record
7,000 / 3,000
out-of-sample
evaluation.
Therefore, live dashboard metrics are not expected to always match benchmark metrics.
This separation keeps the demonstration honest.
PulsePay is designed as a fintech operations console rather than a generic AI chatbot.
The interface focuses on:
- financial value
- recovery opportunities
- evidence
- decision quality
- safety
- execution
- outcomes
Revenue Center
β
Recovery Queue
β
Payment Investigation
β
Recovery Mission
β
Experiments & Benchmark
β
Operations Copilot
The Revenue Center provides the operational overview.
It surfaces:
- Total Recovered
- Net Value Added
- Recovery Precision
- Revenue at Risk
- Action Eligibility
- Next Best Opportunity
- Recovery Performance
- Safety & Reliability
The central question is:
What is the highest-value safe recovery opportunity available right now?
The Recovery Queue provides the actionable recovery opportunities.
Operators can:
- inspect opportunities
- search payments
- filter recovery states
- open investigations
- review decision evidence
- execute permitted synthetic actions
The queue is designed around individual decision quality rather than becoming a generic bulk administration screen.
Payment Investigation presents a complete Payment Decision Record.
Payment Details
β
PulsePay Decision
β
Raw ML Probability
β
Calibrated Probability
β
Expected Recovery Value
β
Recommended Strategy
β
Evidence
β
Alternative Strategies
β
Safety Checks
β
Execution History
This provides a traceable explanation of the recovery decision.
PulsePay includes an Operations Copilot focused on the existing recovery workflow.
It can help operators:
- understand recovery decisions
- interpret operational metrics
- summarize recovery activity
- inspect available context
- navigate PulsePay capabilities
The Copilot is not the authority for financial execution.
Backend policies remain authoritative.
PulsePay includes protected application functionality with:
- user registration
- login
- authenticated routes
- password hashing
- token-based authentication
- authenticated API requests
- environment-based secrets
Passwords are not stored as plaintext.
Sensitive credentials should be stored in environment variables and excluded from source control.
βββββββββββββββββββββββ
β React + Vite β
β Operations Console β
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β Node + Express API β
ββββββββββββ¬βββββββββββ
β
βββββββββββββββββββΌββββββββββββββββββ
βΌ βΌ βΌ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Risk & ML β β Strategy & β β Auth β
β Services β β Recovery β β Services β
ββββββββ¬βββββββ ββββββββ¬βββββββ βββββββββββββββ
β β
ββββββββββ¬βββββββββ
βΌ
βββββββββββββββββ
β Safety + β
β Execution β
βββββββββ¬ββββββββ
βΌ
βββββββββββββββββ
β MongoDB β
β Data + Audit β
βββββββββββββββββ
β²
β
βββββββββ΄ββββββββ
β FastAPI ML β
β Service β
βββββββββββββββββ
| Layer | Technology |
|---|---|
| Frontend | React + Vite |
| Backend | Node.js + Express |
| Database | MongoDB + Mongoose |
| ML Service | Python + FastAPI |
| ML | scikit-learn |
| Authentication | Token-based authentication |
| API | REST |
| Data | Synthetic / reproducible |
The recovery system is divided into domain services:
Revenue Risk Engine
β
Recovery Scoring Engine
β
Calibration
β
Expected Value
β
Recovery Strategy Engine
β
Recovery Policy Engine
β
Recovery Executor
β
Recovery Outcome Engine
β
Benchmark / Evaluation
This keeps prediction, decisioning, policy enforcement, execution, and evaluation separate.
Key domain entities include:
User
Payment
RecoveryOpportunity
RecoveryAction
RecoveryCampaign
RecoveryOutcome
Supporting services handle:
- telemetry
- investigation
- incidents
- calibration
- benchmark evaluation
- recovery missions
- audit information
Payment Event
β
Failure Context
β
Revenue Risk Detection
β
Recovery Opportunity
β
ML Scoring
β
Probability Calibration
β
Expected Value
β
Strategy Selection
β
Safety Policies
β
Bounded Execution
β
Outcome
β
Measurement
PulsePay uses synthetic payment data for demonstration and evaluation.
This enables realistic scenarios without requiring real customer financial information.
The demo environment can represent:
- failed payments
- recoverable failures
- blocked cases
- retry limits
- duplicate-risk scenarios
- successful recoveries
- failed recoveries
- historical actions
No real customer payment data is required.
Install:
- Node.js
- npm
- MongoDB
- Python
git clone https://github.com/Shruti070107/PulsePay.git
cd PulsePaycd server
npm install
npm run devDevelopment backend:
http://localhost:5000
From server:
npm run seedThis prepares the synthetic operational environment used by the dashboard and recovery workflows.
Open another terminal:
cd client
npm install
npm run devFrontend:
http://localhost:5173
PulsePay includes automated backend coverage for the major system layers.
Validated areas include:
Authentication
State Engine
Incident Engine
AI Investigator
Full Recovery Pipeline
Evidence Engine
Data Lab
Upgrade Services
Lab Services
Revenue Recovery
Recovery Benchmark
Recovery Calibration
The frontend production build is also validated separately.
For a short buildathon presentation:
Start with:
- Revenue at Risk
- Net Value Added
- Recovery Precision
- Next Best Opportunity
- Safety metrics
Explain:
"PulsePay does not retry everything. It prioritizes safe, economically valuable recovery."
Open a payment and show:
Raw Probability
β
Calibrated Probability
β
Expected Value
β
Strategy
β
Safety
Show why the selected strategy beat the alternatives.
Run the synthetic recovery action and show the resulting outcome.
Run a bounded mission and show:
- opportunities analyzed
- actions attempted
- successful actions
- blocked actions
- actual recovery
Finish with:
βΉ1.41 Cr Net Recovery
+21.0% Net Lift
0 Duplicate Charges
317 Unsafe Actions Prevented
96.0% Precision
100.0% Recall
The frontend displays backend decisions rather than inventing them.
ML produces probabilities; deterministic policies control execution.
Mission results are based on backend processing rather than artificial progress.
Benchmark numbers come from the controlled evaluation.
Missing evidence should be reported as unavailable rather than invented.
Recovery workflows operate within explicit limits.
Repeated requests should not accidentally create duplicate actions.
PulsePay distinguishes between operational states such as:
No Eligible Opportunity
Prediction Failure
Invalid Strategy
Safety Rejection
Execution Failure
Already Executed
The application surfaces human-readable errors rather than exposing raw backend stack traces.
If no opportunity is eligible, the system reports that state instead of fabricating a recovery opportunity.
PulsePay is a buildathon prototype, not a production payment platform.
Current benchmark and demonstration data are synthetic.
Recovery execution is bounded and designed for controlled demonstration.
Benchmark performance does not guarantee equivalent performance across all real payment environments.
Real deployment would require additional regulatory, security, contractual, and provider-specific controls.
Production use would require continuous model, calibration, feature, and system monitoring.
Connect PulsePay to payment-provider sandbox environments.
Use verified recovery outcomes for model improvement.
Detect when probability calibration begins to drift.
Improve strategy ranking using observed outcomes.
Track and audit changes to execution policies.
Add:
- role-based access
- approval workflows
- stronger audit retention
- observability
- policy rollback
- advanced risk controls
| Capability | Blind Retry | PulsePay |
|---|---|---|
| Detect failure | β | β |
| Recovery prediction | β | β |
| Probability calibration | β | β |
| Expected-value optimization | β | β |
| Strategy comparison | β | β |
| Deterministic safety gates | Limited | β |
| Duplicate protection | Limited | β |
| Retry budget | Basic | β |
| Counterfactual analysis | β | β |
| Evidence-backed explanation | β | β |
| Bounded recovery workflow | β | β |
| Outcome measurement | Basic | β |
| Controlled benchmark | β | β |
The difference is not simply:
Rules vs AI
It is:
Blind Action
VS
Evidence-Driven Decision
The broader vision is to build an intelligent financial decision layer where AI can reason about uncertain outcomes while deterministic systems maintain control over high-impact actions.
The reusable pattern is:
Detect
β
Predict
β
Calibrate
β
Optimize
β
Protect
β
Execute
β
Measure
This architecture can extend beyond payment recovery to other financial operations where automated recommendations require strong execution boundaries.
PulsePay is an evidence-driven AI revenue recovery system for failed payments. Instead of blindly retrying every failure, it estimates recovery probability, calibrates that probability, calculates expected net value, compares alternative recovery strategies, and then passes the recommendation through deterministic safety policies before execution. It records the actual outcome and benchmarks the complete system against blind retry. On a 10,000-record synthetic benchmark with a 7,000/3,000 train-evaluation split, PulsePay achieved βΉ1.41 Cr net recovery versus βΉ1.16 Cr for blind retry, producing a 21% net lift, with zero duplicate charges and 317 unsafe actions prevented.
| Metric | Result |
|---|---|
| π° Net Recovery | βΉ1,40,64,879 |
| π Net Value Added | βΉ24,45,683 |
| π Net Lift | +21.0% |
| π― Recovery Precision | 96.0% |
| π Recovery Recall | 100.0% |
| π‘οΈ Duplicate Charges | 0 |
| π« Unsafe Actions Prevented | 317 |
| π Post-Calibration ECE | 14.8% |
| π Post-Calibration Brier | 0.1483 |
Recoverability
β
Recovery Probability
β
Calibration
β
Expected Net Value
β
Strategy Optimization
β
Safety Policies
β
Bounded Execution
β
Measured Outcome
Don't just retry the payment. Decide whether recovery is worth doing.
PulsePay uses synthetic data for its buildathon demonstration and benchmark.
The reported benchmark results represent a controlled synthetic evaluation and are not production performance guarantees.
The recovery execution environment is bounded and designed for demonstration.
The architecture intentionally separates probabilistic ML recommendations from deterministic execution controls.
```