Phonescreen for Stripe L2(backend) position Bangalore, India

stripe logo
stripe
L2 backend positionBangalore, India
April 28, 20253 reads

Summary

I had a phone screen for an L2 backend position at Stripe in Bangalore, India, which involved a string parsing and reconciliation problem related to their Invoicing product. I found it challenging due to the unexpected requirement to generate test cases and am not optimistic about the outcome.

Full Experience

Had my phonescreen for Stripe L2 position (Bangalore, India). This was the problem: Stripe’s Invoicing product allows businesses to create and send invoices to their customers. While many invoices can be paid directly, there are cases where standalone payments need to be reconciled with open invoices for a customer.

Your task is to write a program that matches incoming payments to their corresponding invoices based on the payment’s memo line.

You are given: • A payment string • A list of invoice strings

The payment string is a comma-separated string containing:

  1. The payment ID (e.g., “payment123”)
  2. The payment amount in USD minor units (e.g., $1.00 = 100)
  3. The memo line, which always follows the format “Paying off: {INVOICE_ID}”

Each invoice string is also comma-separated and contains:

  1. The invoice ID
  2. The due date of the invoice (e.g., “2024-01-01”)
  3. The amount due in USD minor units

You need to: • Parse the payment and invoices. • Find the invoice mentioned in the memo line. • Output a formatted string describing the reconciliation.

Input Example: payment = "payment5,1000,Paying off: invoiceC" invoices = [ "invoiceA,2024-01-01,100", "invoiceB,2024-02-01,200", "invoiceC,2023-01-30,1000" ]

Expected Output: payment5 pays off 1000 for invoiceC due on 2023-01-30

Interview Questions (1)

Q1
Stripe Invoice Payment Reconciliation
Data Structures & Algorithms

Stripe’s Invoicing product allows businesses to create and send invoices to their customers. While many invoices can be paid directly, there are cases where standalone payments need to be reconciled with open invoices for a customer.

Your task is to write a program that matches incoming payments to their corresponding invoices based on the payment’s memo line.

You are given: • A payment string • A list of invoice strings

The payment string is a comma-separated string containing:

  1. The payment ID (e.g., “payment123”)
  2. The payment amount in USD minor units (e.g., $1.00 = 100)
  3. The memo line, which always follows the format “Paying off: {INVOICE_ID}”

Each invoice string is also comma-separated and contains:

  1. The invoice ID
  2. The due date of the invoice (e.g., “2024-01-01”)
  3. The amount due in USD minor units

You need to: • Parse the payment and invoices. • Find the invoice mentioned in the memo line. • Output a formatted string describing the reconciliation.

Input Example: payment = "payment5,1000,Paying off: invoiceC" invoices = [ "invoiceA,2024-01-01,100", "invoiceB,2024-02-01,200", "invoiceC,2023-01-30,1000" ]

Expected Output: payment5 pays off 1000 for invoiceC due on 2023-01-30

Be ready to generate the input on your own and write your own test cases to test the solution(more than 2).

Preparation Tips

I was aware that string parsing is popular in stripe interviews, but wasnt expecting the above two. I was thinking that i will be asked to write the solution function and then there will be test cases against which the code will be run. So a lot of time got wasted there. Not expecting much.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!