Phase: Registration
Registration Deadline: March 19, 2026
Submission Deadline: March 26, 2026
To register for a quest, you need to create an account on our platform . If you've registered for any quest before, you already have an account. If you face any issues, please contact us on WhatsApp at 01558405326 or join our WhatsApp Community.
Register NowYou get hired with paid contract and the opportunity to work on real-world .
Single Service | Java / Spring Boot
You are designing the backend for a small e-commerce product.
The system allows users to:
Create a cart
Add items
Checkout
Pay for their order
This system is not expected to scale
However:
It handles real money
Order state must always be correct
No double payments
No invalid state transitions
Webhooks may arrive twice
You are the Tech Lead responsible for:
Defining the domain model and designing clear boundaries inside a single service
Designing the order state machine and protecting business invariants
Ensuring data consistency and correctness in all state transitions
Handling payment safely, including webhook processing and idempotency
Defining a safe payment handling strategy that prevents double charges
Designing failure handling for duplicates, retries, and race conditions
Making conscious architectural trade-offs (simplicity vs robustness)
Enabling future extensibility (refunds, partial payments, cancellations) without breaking core invariants
Create cart
Add items
Checkout → Order created
Start payment
Mock provider confirms payment (webhook)
Order becomes PAID
Start payment
Provider sends FAILED
Order becomes PAYMENT_FAILED
Start payment again
Provider confirms → Order becomes PAID
Provider may send the same webhook twice
System must remain correct
No duplicate transitions
No corrupted state
Endpoints:
POST /carts → create cart
POST /carts/{cartId}/items → add item (productId, quantity, price)
Cart rules:
Items can be modified before checkout
Checkout locks the cart
Endpoint:
POST /carts/{cartId}/checkout
Behavior:
Creates an Order from cart
Locks cart
Initializes order state
You must define and implement a state machine.
Minimum states:
CREATED
PENDING_PAYMENT
PAYMENT_FAILED
PAID
(Optional: CANCELLED if you can support it cleanly.)
You must enforce valid transitions.
Endpoints:
POST /orders/{orderId}/payment/start
POST /payments/webhook
When starting payment:
Create a payment intent / attempt
Order moves to PENDING_PAYMENT
Must prevent duplicate active payments
When webhook is received:
Update order state safely
Handle duplicate webhook calls idempotently
You must implement a minimal mock provider inside the same project that:
Simulates payment start
Allows triggering a payment result (CONFIRMED / FAILED)
Calls your /payments/webhook endpoint
No need for complex simulation.
Just enough to demonstrate full flow.
Minimum:
1 unit test validating domain state transition
Optional but strong:
1 integration test covering happy path
Test for duplicate webhook
Area & Weight
State machine & invariants: 25%
Idempotency & payment safety: 25%
Code clarity & structure: 25%
Testing: 20%
Documentation clarity: 5%