Welcome to seQura’s backend code challenge!
This challenge is for candidates applying to the Senior Backend Engineer position. It reflects a simplified version of the types of problems we tackle daily at seQura.
Our goal is to evaluate your pragmatism, precision, clarity, ownership, production-readiness, adaptability, and thoughtful use of tools. A successful candidate is someone who can balance technical skills with strong communication and a product-focused mindset.
At seQura, we provide e-commerce businesses with a flexible payment method that allows shoppers to split their purchases into three installments without any additional cost. In exchange, seQura earns a fee for each purchase.
When shoppers use this payment method, they pay directly to seQura. Then, seQura disburses payments to merchants with different frequencies and pricing structures.
This challenge focuses on implementing the process of paying merchants while meeting specific business and technical requirements.
Your task is to build a system to automate the calculation of merchant disbursements and seQura commissions for new and existing orders (found in the CSV files provided) and prepare it to handle new orders in the future.
A disbursement groups all the orders for a merchant in a given day or week. The system must:
reference
to each disbursement, which represents the group of orders paid on the same date for a merchant.Disbursement processing must occur daily and be completed by 8:00 UTC, including only merchants eligible for disbursement that day. Merchants can have one of two disbursement schedules:
live_on
date (available in the CSV data).For each order, calculate seQura’s commission fee based on the order amount:
Commissions will be subtracted from the merchant order value gross of the current disbursement.
At the start of each month, we have to ensure the minimum_monthly_fee
for the previous month was reached. The minimum_monthly_fee
ensures that seQura earns at least a given amount for each merchant.
When a merchant generates less than the minimum_monthly_fee
of orders commissions in the previous month, we will charge the amount left, up to the minimum_monthly_fee
configured, as a “monthly fee.” Nothing will be charged if the merchant generated more fees than the minimum_monthly_fee
.
Charging the minimum_monthly_fee
is out of the scope of this challenge. It is not subtracted from the disbursement commissions. Just calculate and store it for later usage.
Important note:
Remember that we are dealing with monetary values, so calculations must be handled with precision. Always round up to two decimal places for every amount.
ID | REFERENCE | LIVE_ON | DISBURSEMENT_FREQUENCY | MINIMUM_MONTHLY_FEE | |
---|---|---|---|---|---|
2ae89f6d-e210-4993-b4d1-0bd2d279da62 | treutel_schumm_fadel | info@treutel-schumm-and-fadel.com | 2022-01-01 | WEEKLY | 29.0 |
6596b87d-7f13-460f-ba1a-00872c770092 | windler_and_sons | info@windler-and-sons.com | 2021-05-25 | DAILY | 29.0 |
70de4478-bfa8-4c4c-97f1-4a0a149f8264 | mraz_and_sons | info@mraz-and-sons.com | 2020-03-20 | WEEKLY | 0.0 |
52f0e308-4a9d-4b32-ace4-c491f457d9a5 | cummerata_llc | info@cummerata-llc.com | 2019-02-04 | DAILY | 35.0 |
ID | MERCHANT REFERENCE | AMOUNT | CREATED_AT |
---|---|---|---|
056d024481a9 | treutel_schumm_fadel | 61.74 | 2023-01-01 |
33c80364591c | cummerata_llc | 293.08 | 2023-01-01 |
5eaeabf54862 | mraz_and_sons | 373.33 | 2023-01-01 |
70530cdc7b59 | treutel_schumm_fadel | 60.48 | 2023-01-01 |
871e0d072782 | mraz_and_sons | 213.97 | 2023-01-01 |
The provided CSV files contain sample data for merchants and orders. Assume the data is correct, but your system should handle edge cases gracefully, such as missing or invalid data, to ensure production-readiness.
This section outlines the deliverables expected for the challenge. It explains what you need to calculate, design, and present to complete the task.
We expect you to:
Year | Number of disbursements | Amount disbursed to merchants | Amount of order fees | Number of monthly fees charged | Amount of monthly fees charged |
---|---|---|---|---|---|
2022 | 365 | 50,023.45 € | 750.34 € | 50 | 650.00 € |
2023 | 400 | 75,000.35 € | 950.43 € | 49 | 750.00 € |
The values in this table are examples and not the expected results.
This section explains the mindset and practices we encourage you to adopt while solving the challenge. It’s about how you approach the work, communicate your thought process, and align with our values.
AI usage and workflow (optional):
If you typically use AI tools (like Copilot, Supermaven, Cursor, … for coding and productivity workflows, or ChatGPT, Claude, Gemini, … for idea refinement, deeper insights and assistance) as part of your workflow, we are happy to see you use them in this challenge as well.
Using AI won’t give you extra points, and not using it won’t count against you either.
However, if you do choose to use AI, we’d love to understand how you integrated it into your process. Specifically:
When you’re done, make sure that you:
.git
folder in a zip file to show your commit history.We’re excited to see your solution and learn more about how you think and work!