← Back to Hub

Orders & Checkout API 📦

Enterprise Security Implementation:

1. Create Order

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"
}

2. My Orders

GET /api/orders/myorders (Requires Token)