Design and implement a Buy Now, Pay Later system.
Unlock detailed company stats for this questionUpgrade
Design and implement a Buy Now, Pay Later system with working code. API surface:
seed_inventory: load products with name, count and price into an in-memory store.view_inventoryregister_user: register a user with an initial BNPL credit limit.buy(user, items, payment_method, date): pay via PREPAID or BNPL. BNPL reduces the credit limit and is blocked when the limit is exhausted.clear_dues(user, orderIds, date): partial or full clearance against specific orders.view_dues(user, date): pending dues before the given date, sorted by purchase date, with status PENDING or DELAYED once the 30-day window is crossed.order_status(user): order history plus the available BNPL credit limit.
Expect follow-ups like
- Bonus: blacklist users who default on 3+ orders and block BNPL for them; support add_inventory and remove_inventory.
Format · Machine coding round; working code required.
Also asked as · Design and implement a Buy Now Pay Later (BNPL) system.
Community answers
No answers contributed by the community yet.
Related questions
Design and implement a Buy Now Pay Later (BNPL) system for Flipkart.Implement a Buy Now Pay Later (BNPL) system.Design and implement a ranked cache system.Related courses

Course

Course
Course

