Payment Intelligence Architecture: How Tanqory Designs Flexible Payment Logic
Research blog — architecture, methods, and evidence for AI-native payments
Executive Summary
Modern payment stacks are no longer static gateways; they are decision systems. Tanqory’s payment intelligence architecture ingests heterogeneous signals (device, issuer, risk, cost, latency), applies causal and predictive reasoning, and orchestrates routing and policies in real time with fairness, compliance, and trust constraints. This post describes the Payment Signal Mesh (PSM) and Orchestration Layer (OL) that make payment logic flexible, safe, and performant across regions.
Key ideas:
- Event-first ingest with consent/residency and schema contracts; reduces brittle batch dependencies.
- Causal and synthetic-control methods separate signal from noise in authorization outcomes (Athey and Imbens, 2016; Abadie et al., 2010).
- Contextual bandits and planners optimize routing under risk, cost, and latency constraints (Agarwal et al., 2014; Patil et al., 2021).
- Control-inspired regulators stabilize KPI variance during traffic spikes (Box et al., 2015; Deng et al., 2013).
- Governance: audit-ready logs, consent/residency enforcement (Dwork and Roth, 2014), and experiment registries (Kohavi et al., 2020).
1. Payment as a Decision System
1.1 The Limits of Static Routing
- Static priority lists ignore real-time issuer behavior and corridor conditions.
- Correlation-based rules misread causality; confounding (traffic mix, seasonality) skews uplift claims (Pearl, 2009).
- Batch updates lag behind fraud patterns or issuer policy changes.
- Compliance and consent checks bolted on; increase risk and inconsistency.
1.2 Consequences
- Higher decline rates and retries; user churn.
- Excessive cost when fallback rails overused.
- Latency spikes from inefficient routing; conversion loss.
- Compliance risk if consent/residency not enforced on-path.
1.3 Tanqory’s Approach
Treat payments as an event-driven control loop. Sense signals continuously; apply causal and predictive models; execute with constraints on risk, cost, latency, fairness, and compliance; observe and adjust rapidly.
2. Design Principles
- Event-first: every authorization, risk check, and handoff is an event with schema, consent, and residency flags.
- Causal preference: uplift, synthetic controls, and natural experiments over naive correlations (Athey and Imbens, 2016; Abadie et al., 2010).
- Constraint-aware: risk, cost, latency, fairness, privacy enforced at decision time (Patil et al., 2021; Dwork and Roth, 2014).
- Separation of reasoning and execution: PSM senses/reasons; OL executes with rollback.
- Human-in-the-loop: high-impact changes reviewed; explanations provided (Lundberg and Lee, 2017).
- Multi-region readiness: per-region routing, compliance, and fairness thresholds.
- Observability: trace from event to decision to outcome; exportable for auditors (Kohavi et al., 2020).
3. Architecture Overview
3.1 Payment Signal Mesh (PSM)
- Ingest and Contracts: Kafka-like bus; schema registry; consent/residency tagging; dedupe and watermarking for late events (Kleppmann, 2017).
- Signal Normalization: enrich with device, issuer BIN range, channel, merchant, corridor, amount, currency.
- Feature Store: online/offline parity; freshness SLAs; lineage for audit.
- Quality Monitors: null thresholds, distribution drift (Kullback and Leibler, 1951), volume anomalies.
3.2 Orchestration Layer (OL)
- Causal Services: uplift estimation for routing strategies; synthetic controls for A/B-infeasible corridors.
- Predictive Models: risk scores, authorization propensity, latency forecasts; boosted trees (Chen and Guestrin, 2016) and lightweight transformers (Vaswani et al., 2017) under p95/p99 budgets.
- Policy Engine: contextual bandits with fairness/latency/cost constraints (Agarwal et al., 2014; Patil et al., 2021); planners for multi-step flows (risk → routing → retries → offers).
- Safety Layer: consent/residency checks, bias scans, p95/p99 latency guards, cost caps, fraud thresholds.
- Action Connectors: gateways, alternative payment methods (APMs), fraud services, ledger, notification systems.

4. Signal Taxonomy
4.1 Transaction and Device
- Amount, currency, MCC, merchant, BIN range, issuer country.
- Device fingerprint, OS, browser, app vs web; IP geolocation; network quality.
4.2 Behavioral and Session