← Questions

Invoice reminder emails and delinquent customers

0
StripeCodingLast asked Oct 2024

Each customer has one invoice (a time and an amount). A configurable schedule says which emails go out relative to the invoice time, for example "Upcoming" ten days before, "New" at the invoice time, "Reminder" twenty days after and "Due" at the last offset, which is the due date. Payments arrive at various times, not in order.

Produce the email log in time order: at each scheduled time, first apply every payment made by then, and send the email only if the customer still owes money, showing the amount still owed. Finish with the list of customers who still owed money on their due date and how much.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding