Design an Expense Card & Budget System

Medium45 min
1 / 30
System design answer

Design an Expense Card & Budget System

Medium45 min30 sections
understanding•10 min read

Problem Statement: Programmable Corporate Spend Control

Frames the expense card system as a real-time financial control plane, not a passive expense tracker.

Problem Statement

Design an Expense Card & Budget System that issues corporate credit and virtual cards to employees, enforces programmatically defined budgets and merchant restrictions in real time at the point of sale, logs every transaction instantly, flags out-of-policy spending, integrates with the company's expense reporting and approval workflow, and optionally posts entries to the general ledger automatically.

This is not a reimbursement tool. The system must make an authorization decision in under 100 milliseconds every time a card is swiped, tapped, or used online. That decision includes: verifying the card is active, checking the transaction amount against remaining budget, validating the merchant category code (MCC) against policy, confirming the employee has not exceeded their daily or monthly limit, and applying any custom rules the finance team configured. If any check fails, the transaction is declined at the terminal before the employee walks away with the purchase.

Why This Problem Is Distinctive

A traditional expense management tool like older Concur workflows operates after the fact: the employee spends, receipts pile up, a report is filed weeks later, and finance reconciles manually. This system inverts that model. The control happens before and during the transaction. The card itself becomes the policy enforcement point.

The architecture therefore separates into three planes with fundamentally different latency and consistency requirements:

  1. Authorization Plane (synchronous, < 100ms): Card validation, budget check, policy evaluation, approve/decline decision. Must be available 99.999% of the time because card networks (Visa, Mastercard) impose strict availability SLAs on issuers.
  1. Transaction Processing Plane (asynchronous, seconds): Settlement capture, receipt matching, expense categorization, notification dispatch, ledger posting. Eventual consistency is acceptable here.
  1. Configuration & Reporting Plane (asynchronous, minutes): Budget creation, policy rule editing, approval workflows, reporting dashboards, accounting integrations.

The Financial Stakes

A declined legitimate transaction embarrasses the employee and erodes trust. An approved out-of-policy transaction creates real financial loss that may be unrecoverable. A system outage during authorization means every card in the fleet is dead — employees cannot buy lunch, book travel, or purchase supplies. The cost of downtime is measured in employee productivity and organizational trust, not just lost API calls.

Public Market Context

Ramp reports processing over $10 billion in annual card volume across 40,000+ companies. Brex serves 20,000+ companies with corporate cards and expense management. Airbase (now part of Paylocity) processes spend management for mid-market enterprises. Pleo serves 30,000+ companies across Europe. These are not hypothetical systems; they process millions of real card authorizations daily under strict regulatory and network compliance requirements.

For capacity planning, this answer assumes a mature platform with 5,000 corporate customers, 500,000 active cardholders, 2 million card transactions per day, and a 3× peak multiplier during month-end close and holiday seasons.

Key Highlights

  • •The authorization decision must complete in under 100ms at the point of sale, before the employee leaves the terminal.
  • •Three planes with different latency requirements: authorization (<100ms), transaction processing (seconds), configuration (minutes).
  • •A system outage during authorization renders every corporate card inoperable — the blast radius is the entire workforce.
  • •The system inverts traditional expense management: control happens before the spend, not after reimbursement.
  • •Ramp processes $10B+ annual card volume; this design assumes 2M transactions/day at 5× peak.
Lead With the 100ms Constraint
Stating upfront that the authorization path must complete in under 100ms, including network round-trip from the card network, immediately signals you understand this is a real-time financial system, not a CRUD app. Card networks impose strict timeout penalties on issuers who respond slowly.
Do Not Design a Reimbursement Tool
The most common mistake is designing a system where employees spend freely and file reports later. The entire value proposition of programmable expense cards is that policy enforcement happens at the point of sale, before money moves.

Section Rescue Kit

Buzzwords to use:

ISO 8583Merchant Category Code

Safe statements:

  • "I will separate the authorization plane from the processing plane because they have fundamentally different latency and consistency requirements."
  • "Before choosing databases, let me define which decisions must happen synchronously at the point of sale versus which can be processed asynchronously."
Design an Expense Card & Budget System - System Design | WinJob | WinJob