← Ramp Interview Insights

Ramp·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
May 2026Remote

Summary

Ramp SWE interview with a meaty OOP/system design coding problem built around a banking simulator. The problem kept growing with each layer they added, which I wasn't fully expecting.

Questions Asked (3)

Q1

Design a banking system that supports creating accounts, depositing funds, transferring between accounts, and ranking accounts by total outgoing transaction volume.

System DesignAlgorithms & Data StructuresData Modeling
Author's notes

The first few operations felt manageable.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a data model and API for core operations (create account, deposit, transfer). For ranking by outgoing transaction volume, propose an efficient data structure like a balanced BST or skip list that supports incremental updates and ordered retrieval, and discuss trade-offs with simpler approaches like periodic sorting.

Pro tip: Demonstrate awareness of real-world constraints: mention idempotency for transfers, transaction isolation levels, and how you'd handle hot accounts (e.g., sharding or caching) to avoid bottlenecks.

1. Clarify Requirements and Scale

Ask about expected throughput, consistency needs, and whether ranking is real-time or batch. Define functional and non-functional requirements.

2. Design Data Model and API

Define entities (Account, Transaction) and operations (createAccount, deposit, transfer, getRankedAccounts). Specify fields, types, and relationships.

3. Implement Core Operations

Describe how to handle deposits and transfers with atomicity and consistency, using transactions or locks. Discuss error handling and idempotency.

4. Design Ranking Mechanism

Propose a data structure (e.g., balanced BST, skip list, or sorted set) to maintain accounts ordered by outgoing volume, supporting O(log n) updates and O(log n + k) retrieval.

5. Discuss Trade-offs and Scalability

Compare real-time ranking vs. batch processing, and discuss scaling strategies like sharding, caching, and eventual consistency.

Key Points to Mention

  • ACID transactions and isolation levels for transfers
  • Idempotency keys to prevent duplicate transfers
  • Data structure for dynamic ranking (e.g., balanced BST, skip list, Redis sorted set)
  • Handling hot accounts and concurrency (locking, optimistic concurrency, sharding)
  • Trade-offs between real-time and batch ranking
  • API design and error handling for banking operations

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Extend the banking system with a PAY operation that immediately debits an account and schedules a 2% cashback to be credited exactly 24 hours later. Each payment gets a unique ID. How do you structure the scheduling and ensure any operation after the due time reflects the credited balance?

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

This is the part that got me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a design that separates the immediate debit from the scheduled credit using a persistent job queue or scheduler. Emphasize idempotency, exactly-once processing, and how to handle late or missed executions to ensure balance consistency.

Pro tip: Discuss how you would handle scheduler failures and ensure exactly-once credit, perhaps using a transactional outbox pattern or idempotent credit operations with unique payment IDs. This shows you think about real-world reliability beyond the happy path.

1. Clarify requirements and constraints

Ask about expected scale, latency requirements, consistency guarantees, and failure handling. Confirm that the 24-hour delay is exact and that cashback must be credited even if the system restarts.

2. Design the data model

Define a Payment entity with unique ID, account ID, amount, timestamp, and status (e.g., PENDING_CASHBACK, COMPLETED). Also consider a separate CashbackSchedule table or queue entry with due time and payment ID.

3. Implement the PAY operation

Atomically debit the account and create a scheduled job for the cashback credit. Use a transaction to ensure both happen or neither. Return the payment ID to the client.

4. Schedule and execute cashback

Use a reliable scheduler (e.g., database-backed job queue, delayed message queue) that triggers at the due time. The job credits the account and marks the payment as completed, ensuring idempotency via the payment ID.

5. Ensure balance reflects credited amount after due time

For any operation after the due time, the balance must include the cashback. This can be achieved by having the scheduler update the balance promptly, or by computing balance on read as stored balance plus pending cashbacks whose due time has passed.

Key Points to Mention

  • Idempotency: Use unique payment ID to prevent double crediting if the job runs multiple times.
  • Exactly-once semantics: Combine transactional outbox or idempotent operations with at-least-once delivery.
  • Scheduler reliability: Use a persistent queue or database-backed scheduler that survives restarts.
  • Consistency: Ensure that after the due time, any read of the balance includes the cashback, either by proactive update or on-the-fly calculation.
  • Failure handling: Discuss retries, dead-letter queues, and monitoring for missed cashback jobs.
  • Scalability: Consider partitioning or sharding the scheduler for high throughput.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would you implement GET_PAYMENT_STATUS to return whether a cashback is still pending or has already been received, and handle invalid account or payment ID lookups?

API & IntegrationsSystem Design
Author's notes

Mostly straightforward once the scheduling structure was in place.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the API contract: define the endpoint, request parameters (account ID, payment ID), and response schema (status: pending/received, plus error codes). Then outline the implementation: validate inputs, query the payment/cashback store, map internal states to the API response, and handle errors with appropriate HTTP status codes and messages. Emphasize idempotency, security, and observability.

Pro tip: Mention that you would return a 404 for invalid account or payment ID, but avoid leaking whether the account exists if the requester is not authorized—use 403 or 404 consistently to prevent enumeration attacks. Also, consider adding a `Retry-After` header for pending statuses to guide clients.

1. Define the API contract

Specify the endpoint (e.g., GET /accounts/{accountId}/payments/{paymentId}/cashback-status), request parameters, and response body with fields like `status` (PENDING, RECEIVED) and `receivedAt` timestamp. Include error responses for 400, 404, 403, and 500.

2. Validate inputs and authorize

Check that accountId and paymentId are present and well-formed (e.g., UUIDs). Authenticate the request and verify the caller has access to the account; return 401/403 if not.

3. Query the data store

Fetch the payment record by paymentId and ensure it belongs to the given accountId. Then retrieve the associated cashback record, which may be in a separate table or service. Use efficient queries with proper indexes.

4. Map internal state to API response

Translate the internal cashback status (e.g., PENDING, PROCESSED, FAILED) to the API's status values. If received, include the timestamp; if pending, optionally include an estimated date.

5. Handle errors and edge cases

Return 404 if the payment or account does not exist, or if the payment does not belong to the account. For invalid IDs, return 400. Log errors and monitor for anomalies. Ensure the endpoint is idempotent and cacheable if appropriate.

Key Points to Mention

  • RESTful design: use GET with path parameters, proper HTTP status codes (200, 400, 404, 403, 500).
  • Data model: payments and cashbacks may be separate entities; consider a join or separate query.
  • Security: authorize the request, prevent IDOR by verifying account ownership, and avoid leaking existence of resources.
  • Error handling: distinguish between invalid input (400), not found (404), and unauthorized (403).
  • Observability: log requests, monitor latency and error rates, and set up alerts for high error rates.
  • Performance: use indexes on accountId and paymentId, consider caching for frequently accessed statuses.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.