POST /api/v1/payments/orders/single-product
Creates a payment order for a single product.
Headers:
Authorization: Bearer <token> or token must be passed in the cookie
Content-Type: application/json
Request Body:
{
"productId": "65f8a2b4c1d2e3f4a5b6c7d9",
"quantity": 2,
"selectedSize": "L",
"selectedColor": "Blue",
"shippingAddress": {
"fullName": "Jane Smith",
"address": "456 Oak Avenue",
"city": "Delhi",
"state": "Delhi",
"zipCode": "110001",
"country": "India",
"phone": "9876543211"
},
"notes": "Gift wrapping required"
}
Response:
{
"status": "success",
"message": "Single product order created successfully",
"data": {
"success": true,
"orderId": "order_MzxJ9n7xQw5Pz9",
"amount": 100000,
"currency": "INR",
"receipt": "ORDER_1640995300000_def456",
"paymentId": "65f8a2b4c1d2e3f4a5b6c7da",
"productSummary": {
"productName": "Gaming Laptop",
"price": 1000.0,
"quantity": 1,
"totalAmount": 1000.0,
"selectedSize": "15-inch",
"selectedColor": "Black"
}
}
}