Core Architecture of a Credit and Spend Management Platform
Credit and spend platforms require architecture that is both real-time (sub-100ms authorisation decisions) and auditable (every credit decision and transaction posted as an immutable record for regulatory examination). Four subsystems form the foundation.
Credit Limit and Authorisation Engine
The authorisation engine must respond within 50-100ms to card network authorisation requests while applying credit limit checks, velocity controls, and merchant category code (MCC) restrictions. Credit limit state is a derived calculation: approved credit limit minus sum of settled balances minus sum of pending authorisation holds equals available credit. Pending holds must expire after a configurable timeout if settlement does not arrive (typically 7 days for card-not-present transactions). Partial authorisations (approving less than the requested amount for grocery MCCs) must be configurable per programme. Disputes trigger an immediate provisional credit against available credit, with reversal or permanence determined on dispute resolution. The authorisation log is append-only: every decision (approve, decline, partial approve) is recorded with timestamp, available balance at decision time, and the specific rule that triggered a decline.
BNPL Instalment Engine
BNPL products split a purchase into N equal instalments with a defined payment schedule. The instalment engine calculates: loan amount (net of any origination fee), instalment amounts with rounding applied to the first instalment to absorb cent differences, APR disclosure per TILA/Regulation Z (even for 0% promotional APR, the fee structure must be disclosed), and payment due dates anchored to the origination date. Late fee computation must account for grace periods and state-level late fee caps. Rescission rights under TILA (3-day right of rescission for certain credit types) require a documented rescission workflow with refund processing. The instalment ledger uses append-only records: each payment posts as a debit against the instalment balance, not a modification of the original loan record.
Virtual Card Issuance and Lifecycle Management
Virtual cards are single-use or restricted-use card credentials issued against a funding source (corporate card programme, BaaS provider, or own balance). Card issuance integrates with a card programme manager: Marqeta, Galileo, i2c, or directly via a BIN sponsor. Each virtual card carries configurable controls: merchant whitelist/blacklist by MCC or MID, per-transaction spend cap, cumulative spend limit, validity window, and currency restrictions. Card control changes must propagate to the authorisation engine in milliseconds, not asynchronously, to prevent over-authorisation between control change and the next transaction attempt. Card lifecycle events (issuance, activation, freeze, termination, expiry) are logged as an immutable audit trail for programme compliance evidence.
Spend Analytics and Expense Management
Corporate spend analytics platforms require: transaction enrichment (merchant normalisation, MCC to category mapping, GL code suggestion via ML classification trained on company-specific historical coding patterns), real-time receipt capture and OCR matching against transactions, policy violation detection (out-of-policy merchant categories, over-limit individual transactions, missing receipts after configurable timeout), and approval workflows for exceptions. GL code suggestion accuracy above 90% requires training data from the specific organisation's historical coding patterns: a generic classifier trained on public data underperforms. Accounting system integration (NetSuite, QuickBooks, Xero, SAP) must handle multi-entity, multi-currency GL posting with configurable mapping rules and reconciliation reporting.