Not affiliated with Cashfree.

How it plugs into a gateway

A runnable engine, wired to nine interfaces.

It runs today on simulated events and on uploaded exports. Going live means connecting the interfaces below; the engine and the policy check ship unchanged.

The shape

Signals in · simulated here
Payment-failed webhookSIM
decline code, amount, instrument
Abandoned-checkout webhookSIM
checkout drop-off with contact
Fraud scoreSIM
RiskShield at Cashfree
COD / return-risk scoreSIM
RTO Intelligence at Cashfree
Consent · DND · opt-out registrySIM
per customer, per channel
The decision engine · runs today
  1. 1Gates (suppress, with reasons)
  2. 2Classify → tier
  3. 3Strategist: fix · channel · holdout
  4. 4Policy check on every message
  5. 5Attribution: incremental vs control
pure, deterministic TypeScript · a model writes words only
Actions out · simulated here
Secure pay linkSIM
single-use, current cart (payment-link API / MCP)
EMI / Pay-Later eligibilitySIM
offers API
WhatsApp / SMS / voiceSIM
approved templates · DLT · voice behind a flag
→ Merchant dashboard + audit log
incremental revenue, and the invoice it justifies
Runs today
Gate → tier → strategist → attributionTaxonomy and every suppression ruleRandomized holdout and incremental intervalPay-per-recovery invoice auditLive AI copy with a server-side policy check (budgeted)Gateway-export import with real decline codesPer-decision audit log, replayable by seedSimulator and 34-case lab
What the gateway wires
Webhook ingestorFraud score → fraudScoreReturn-risk score → rtoScorePayment-link and offers APIsWhatsApp BSP, DLT SMS, voiceConsent, DND and opt-out registry

The wiring, line by line

  • Event ingestion
    Payment-failed and abandoned-checkout webhooks
    Replaces the simulator; the gateway-export importer shows the mapping today
  • Decline reason
    NPCI UPI response codes · ISO 8583 card codes
    Mapped to the taxonomy (31 UPI, 14 card codes); unknown codes reported, never defaulted
  • Fraud gate
    Fraud score (RiskShield at Cashfree)
    event.fraudScore → gate 1
  • COD / RTO gate
    Return-risk score (RTO Intelligence at Cashfree)
    event.rtoScore → strategist
  • Consent, DND, opt-out
    Merchant consent registry · DND scrub · STOP replies
    customer flags → gate 2 and the TRAI refinement
  • Secure pay link
    Payment-link API or the gateway's MCP server
    {link} token in the approved template
  • EMI / Pay-Later
    Eligible-offers API
    Tier 2 lever
  • Copy
    A model under a daily spend budget, or approved templates only
    Server re-derives the decision; policy check on every draft
  • Channels
    WhatsApp BSP · DLT SMS · voice (flagged)
    Channel adapters, template category per message

What a production build adds

Tenancy and roles

Per-merchant configuration, role-based access for growth, finance and compliance, and an immutable store for the audit log.

Delivery and cadence

BSP and DLT adapters, retry cadence against the recovery window, and cancel-on-completion across channels.

Learning

An uplift model trained on holdout outcomes to replace the fixed suppression rules - measured against them before it ships.