Design a Receipt Upload and Matching Pipeline for Card Spend

Last updated: November 29, 2026

Quick Overview

Design the system that accepts receipts from the mobile app, email forwarding and SMS, extracts merchant, amount and date, and matches each receipt to the right card transaction, asking the user only when it is unsure.

Ramp
System Design
Software Engineer
Ramp
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the system that accepts receipts from the mobile app, email forwarding and SMS, extracts merchant, amount and date, and matches each receipt to the right card transaction, asking the user only when it is unsure.

Ramp's pitch to employees is that expense reporting mostly disappears, and receipt capture plus automatic matching is a large part of that. The interviewer is checking a media ingestion pipeline (uploads, storage, async processing), an extraction and matching stage with confidence thresholds, and the user-facing loop when matching fails.

What the Interviewer Expects
  • Uses direct-to-object-storage uploads with presigned URLs
  • Processes asynchronously through a queue with idempotent workers
  • Normalizes inputs (images, PDFs, email bodies) before extraction
  • Designs matching with candidate retrieval plus scoring and a confidence threshold
  • Handles receipts that arrive before the transaction posts
  • Covers retention, PII and audit requirements for financial documents
Key Topics to Cover
Object storage
Async pipelines
OCR and extraction
Matching and scoring
Idempotency
Data retention
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you handle one receipt that covers two transactions, or a split?
  • How do you measure and improve match precision over time?
  • How would you deduplicate the same receipt sent by email and photographed?
  • What changes for itemized receipts needed for VAT reclaim?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: accept receipts from app (photo), email (attachments and HTML bodies) and SMS (MMS images); extract merchant, total, currency, date; match to a card transaction or reimbursement; notify th...

High-Level Design

Clients request a presigned URL from the Receipt API, upload straight to object storage, then call complete which writes a receipts row (status=uploaded, content hash) and enqueues a job. Th...


Submit Your Answer
Markdown supported