FOR UPDATE locking to completely eliminate overselling during high-concurrency flash sales!POST /api/orders (Requires Token)
You do not need to send shipping or tax amounts. The server handles it automatically!
{
"items": [
{
"product_id": "uuid-here",
"quantity": 1
}
],
"shipping_address": {
"street": "123 Moi Ave",
"city": "Nairobi"
},
"payment_method": "MPESA",
"coupon_code": "WELCOME10"
}
GET /api/orders/myorders (Requires Token)