Payment module
Multi-tenant | Multi-PSP | Cascading | Adapter Pattern
Architecture Overview
Key Flows & Reference
DEPOSIT FLOW
TRANSACTION STATES
ROUTING DIMENSIONS
Reference Documents
DB tables: transactions, psp_configs…
PassimPay statuses → UnifiedStatus
IPaymentProvider types & API contract
JWT validation & brand resolution
PassimPay implementation spec
PassimPay service overview & onboarding
How frontend tracks transaction status
Push events to operators -- retry, signing, delivery
Velocity checks & abuse protection
Deposit & withdrawal endpoints + validation
PSP selection, routing rules, cascade logic
Failover logic: PSP1 → PSP2 → PSP3
Balance: credit, debit, hold. Built on Orleans
Nightly PSP sync, discrepancy detection & fix
Rate lock, settlement vs display, historical rates
Min/max, caps, KYC gates, RG, AML -- rule engine
Identity verification, sanctions, AML monitoring
Deposit match, wagering tracking, balance lock, expiry
PSP, routing, methods, partners, compliance — control plane
Dispute lifecycle, evidence collection, chargeback rate control
BIN lookup, preferred method, GEO context, PSP success rate
Checklist for integrating any new payment provider
Delivery Phases
Documents only -- no code
Backend only -- frontend not needed yet
Backend continues, frontend starts in parallel
Checkout becomes data-driven; next PSP process documented
Not planned yet -- scope TBD