← Stripe Interview Insights

Stripe·Software Engineer·Technical Phone Screen·Senior

SeniorPrefer not to say
Jun 2026Remote

Summary

Stripe technical phone screen for a software engineer role, heavy on implementation details and design reasoning. The whole session revolved around one meaty coding problem with a lot of follow-up layers baked in.

Questions Asked (3)

Q1

Design and implement a payment-to-invoice matcher. Given a list of invoices (id, amount in integer cents, date), a payment string (with or without an explicit invoice id), and an optional forgiveness threshold, write a function that matches the payment to the correct invoice and returns a canonical output message. Walk through your data structures, parsing approach, and matching priority rules.

Algorithms & Data StructuresTechnical Trade-offsSystem Design
Author's notes

This looked manageable at first glance and then kept growing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and edge cases, then outline a multi-pass matching strategy: explicit ID match, exact amount match, and threshold-based fuzzy match. Discuss data structures (hash maps for O(1) lookups) and parsing (regex for payment string), and finally walk through the canonical output format and error handling.

Pro tip: Emphasize idempotency and auditability: ensure the matcher can be safely retried and log the matching decision for reconciliation. Also, consider integer arithmetic to avoid floating-point issues with cents.

1. Clarify Requirements and Edge Cases

Ask about payment string format, forgiveness threshold semantics, multiple matches, and expected output. Identify edge cases like no match, multiple matches, and invalid input.

2. Design Data Structures and Parsing

Use a hash map to index invoices by ID and amount for O(1) lookups. Parse the payment string with regex to extract optional invoice ID and amount in cents.

3. Define Matching Priority Rules

Prioritize explicit invoice ID match, then exact amount match, then threshold-based match (if provided). Handle ties by date or other criteria.

4. Implement Matching Logic

Write a function that applies the priority rules, returns the matched invoice or an error, and constructs a canonical output message (e.g., JSON with status and invoice ID).

5. Discuss Trade-offs and Extensions

Talk about time/space complexity, handling concurrency, idempotency, and potential improvements like fuzzy matching or machine learning.

Key Points to Mention

  • Use integer cents for all monetary calculations to avoid floating-point errors.
  • Hash maps for O(1) lookup by invoice ID and amount.
  • Regex parsing to extract optional invoice ID and amount from payment string.
  • Matching priority: explicit ID > exact amount > threshold-based match.
  • Canonical output format: consistent JSON with status, matched invoice ID, and message.
  • Edge cases: no match, multiple matches, invalid payment string, threshold boundary conditions.

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

Q2

Why should you represent monetary amounts as integer cents rather than floating point numbers?

Technical Trade-offs
Author's notes

Pretty standard fintech rationale.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining the fundamental issue: floating point numbers cannot exactly represent most decimal fractions, leading to precision errors. Then, connect this to real-world consequences in financial systems, such as incorrect balances or failed transactions. Finally, emphasize that integer cents (or the smallest currency unit) avoid these issues by using exact arithmetic, and mention how this aligns with Stripe's engineering best practices.

Pro tip: Mention that even though integers solve precision, you must still handle currency-specific details like different minor units (e.g., JPY has no cents) and rounding rules for interest or taxes. This shows you understand the broader context beyond just the data type.

1. Explain the root cause

Describe how floating point numbers use binary fractions and cannot exactly represent values like 0.1 or 0.2, leading to rounding errors.

2. Illustrate with an example

Give a concrete example, such as 0.1 + 0.2 not equaling 0.3 in floating point, and how this could cause a financial discrepancy.

3. Highlight the consequences

Discuss the impact in financial systems: incorrect balances, failed reconciliations, and loss of trust.

4. Present the solution

Explain that representing amounts as integer cents (or the smallest unit) ensures exact arithmetic and avoids precision issues.

5. Address edge cases

Mention that you still need to handle currency-specific minor units and rounding rules for operations like division or interest calculation.

Key Points to Mention

  • Floating point numbers are binary fractions and cannot exactly represent most decimal fractions.
  • Precision errors accumulate over repeated operations, leading to significant discrepancies.
  • Integer cents allow exact arithmetic and are the standard in financial systems.
  • Different currencies have different minor units (e.g., USD cents, JPY no minor unit).
  • Rounding rules must be applied carefully when performing operations like splitting amounts or calculating interest.
  • Stripe's API uses integer amounts in the smallest currency unit to avoid these issues.

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

Q3

Describe the test cases you would write for this payment matcher, covering explicit id matching, multiple candidates with the same amount, forgiveness boundary conditions, tie-breaking, and regression coverage.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

I actually liked this part.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer by first clarifying the payment matcher's requirements and assumptions, then systematically cover each specified area with concrete test cases. For each test case, specify the input, expected output, and rationale, and discuss how you would handle edge cases and ensure regression coverage.

Pro tip: Demonstrate maturity by discussing how you would prioritize test cases based on risk and business impact, and mention using property-based testing for boundary conditions to catch unexpected edge cases.

1. Clarify Requirements and Assumptions

Ask clarifying questions about the payment matcher's behavior, such as what constitutes a match, how forgiveness works, and what tie-breaking rules apply. State any assumptions you make.

2. Outline Test Categories

List the categories of tests you will write: explicit ID matching, multiple candidates with same amount, forgiveness boundary conditions, tie-breaking, and regression tests.

3. Design Specific Test Cases

For each category, describe concrete test cases with inputs and expected outputs, covering normal, edge, and error scenarios.

4. Discuss Regression and Automation

Explain how you would ensure regression coverage, such as adding tests to a suite, using data-driven tests, and integrating with CI.

5. Summarize and Prioritize

Summarize your approach, highlighting high-risk areas and how you would prioritize testing efforts.

Key Points to Mention

  • Explicit ID matching: test exact match, no match, and multiple matches with same ID (if possible).
  • Multiple candidates with same amount: test scenarios where multiple payments have the same amount but different IDs, and how the matcher selects the correct one.
  • Forgiveness boundary conditions: test amounts just within and outside the forgiveness threshold, including zero and negative amounts.
  • Tie-breaking: test cases where multiple candidates match equally, ensuring deterministic and correct selection based on defined rules.
  • Regression coverage: include tests for previously fixed bugs and ensure new changes don't break existing functionality.
  • Property-based testing: use it to generate random inputs for boundary conditions and validate invariants.

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