🛒
Order System (E-Commerce)
From cart to delivery — complete end-to-end order management flow for online stores.
🔄 Order Processing Flow
📋 Complete Order Flow
1
🛒Customer
Browse products → Add items to cart → View cart summary
2
📦Customer
Proceed to checkout → Fill shipping address + select delivery method
3
🌐Frontend
Validate stock availability → Show final price with shipping
4
💳Customer
Choose payment method (card / PromptPay / COD) → Confirm
5
⚙️API Server
Create order record with status "PENDING" → Reserve stock
6
🏦Payment GW
Process payment → Return APPROVED or DECLINED
7
✅API Server
If APPROVED: update status to "PAID" → Deduct stock
8
🗄️Database
Save order: items, price, address, payment_ref, timestamps
9
📧Email/SMS
Send order confirmation to customer + notify seller
10
📬Seller/Admin
Pack items → Update status to "SHIPPED" → Enter tracking number
11
🎉Customer
Receive tracking notification → Track package → Confirm receipt
📊 Order Status Lifecycle
⏳
PENDING
Order created, awaiting payment confirmation
✅
PAID
Payment verified, waiting for seller to pack
📦
PROCESSING
Seller is preparing/packing the order
🚚
SHIPPED
Handed to courier, tracking number available
🎉
DELIVERED
Customer confirmed receipt of the order
❌
CANCELLED
Order cancelled, refund initiated if paid
👥 Roles & Responsibilities
👤
Customer
→Browse and select products
→Fill checkout information
→Choose payment method
→Track order status
→Confirm receipt / Leave review
🏪
Seller/Admin
→Receive new order notifications
→Pack items and update status
→Enter shipping tracking number
→Handle cancellations/returns
→Manage product stock
⚙️
System
→Auto-calculate shipping cost
→Check stock before confirm
→Process payment gateway
→Send Email/SMS notifications
→Generate order reports
Want to build an online store? 🛒
We build complete e-commerce systems with payment, stock, and delivery management.
← Back to LearnContact Us