Realtime Fraud Guard

Realtime fraud scoring sandbox for payments, SMS, and email channels.

Problem + User

  • Fraud analysts need one scoring surface across payments, SMS, and email channels.
  • Operations teams need visible model/version/threshold state at runtime.

Architecture

  • Ingestion and feature payloads -> FastAPI scoring endpoint.
  • Decision path -> alert thresholding -> reason codes for triage.
  • Metrics export -> Prometheus scrape -> dashboard monitoring.

SLIs / Signals

  • p95 latency from live endpoint.
  • Thresholded alert rate with top reasons.
  • Runtime health, config visibility, and metrics endpoint uptime.

Service Status

Live (snapshot)

Model Version

bootstrap-1772269341

Alert Threshold

0.85

Latency p95 (s)

1.00

Scoring Sandbox

Run a live scoring request against /realtime-fraud-guard/live/score.

Live Response

Response body from the scoring endpoint.

{
  "score": 0.0008781300439786303,
  "is_alert": false,
  "threshold": 0.85,
  "reasons": [
    "amount",
    "merchant_risk"
  ],
  "latency_ms": 1.10
}

Metrics Preview

First lines from /realtime-fraud-guard/live/metrics.

# HELP python_gc_objects_collected_total Objects collected during gc
# TYPE python_gc_objects_collected_total counter
python_gc_objects_collected_total{generation="0"} 975
python_gc_objects_collected_total{generation="1"} 370
python_gc_objects_collected_total{generation="2"} 15
# HELP process_resident_memory_bytes Resident memory size in bytes
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 255213568

Snapshot rendered in raw HTML for crawlers and non-JS clients ยท live endpoints: health, config, metrics