Intermediate · 30 min · 4 steps

Paying sellers a fair commission by slabs

Sunita Rao, Commission Infrastructure Engineer at BazaarHub

Sunita Rao is an engineer at BazaarHub, an app where more than 250,000 small sellers, many of them women in smaller Indian towns, sell clothes and home items to their friends and family over WhatsApp. These sellers are called resellers, and BazaarHub pays them a commission on what they sell.

The question

How do we write a Python commission calculator that pays each rate only on its own slice of sales, ignores returned orders, and takes back money for late returns?

  • Marginal rate slabs
  • Net GMV reconciliation
  • Clawback logic
  • Deterministic payout math

The rest of this case study is locked

The data, every step with its code and result, and the final answer open with a pass. A few case studies stay free so you can see how they work.