Stripe Interview | Round 1

stripe logo
stripe
November 28, 2025268 reads

Summary

I participated in a coding round at Stripe where I was presented with an 'Invoice Reconciliation' problem, requiring me to match incoming payments to invoices based on memo lines and amounts.

Full Experience

I encountered a coding challenge at Stripe centered around an invoice reconciliation task. The problem involved parsing payment and invoice details from structured strings and then matching them based on a memo line, which specified the target invoice, and ensuring the payment amount was correctly applied.

Interview Questions (1)

Q1
Invoice Reconciliation
Data Structures & AlgorithmsMedium

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. An example input string for a payment looks like this:

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

(Payment Format) Each comma-separated element represents a different piece of information about the payment: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}"

(Invoices format) Each comma-separated element represents a different piece of information about the payment:
1. The invoice ID
2. The due-date for that invoice
3. The amount due on the invoice (in USD minor units e.g. $1.00 = 100)

Example input:

 f("payment5,1000,Paying off: invoiceC", ["invoiceA,2024-01-01,100", "invoiceB,2024-02-01,200", "invoiceC,2023-01-30,1000"])
Should return:

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

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!