Create Cart

Creates a new shopping cart for a user, including selected products and optional notes.

Endpoint

POST https://partners.waffarx.com/api/ValuCheckout/createcart

Request Headers

Header

Description

wxc-id

Your WaffarX Client Id

wxc-auth

Signature auth header for the request

wxc-date

UTC timestamp of the request, e.g. 2025-04-30T15:00:00Z

Accept-Language

Response language preference (e.g. en | ar)

Content-Type

Must be application/json

Note

wxc-id: The WaffarX client ID specified in your integration data.

Request Parameters

Name

Type

Required

Description

storeId

String

Required

The store identifier for which the cart is created.

userId

String

Required

Unique identifier of the user creating the cart

note

String

Optional

Optional text note to attach to the cart.

cartItems

array of object

Required

A list of products in the cart. Each item requires(productId, variantId, quantity)

CartItem Object

Name

Type

Required

Description

productId

String

Required

The ID of the product being added.

variantId

String

Required

The specific product variant identifier.

quantity

Interger

Required

The number of units requested.

Request Body

Example Request Body
{
 "storeId":"61a535ad-bf20-4d71-8846-413ebe8bb8ff",
 "userId":"12355",
 "note": "Please call before delivery",
 "cartItems":[
   {
     "productId":"68c885112c112fb2b5000a94",
     "variantId":"45338157744313",
     "quantity":1
   }
   ]
}

cURL Example

curl --location 'https://partners.waffarx.com/api/ValuCheckout/createcart' \
     --header 'Content-Type: application/json' \
     --header 'Accept-Language: en' \
     --header 'wxc-id: {YOUR_CLIENT_ID}' \
     --header 'wxc-date: 2025-09-19T00:12:06Z' \
     --header 'wxc-auth: 4c2b25b1c13fdaceb43498a134f92706ee5b8fc5f089672844107e0954b58084' \
     --data '{"storeId":"61a535ad-bf20-4d71-8846-413ebe8bb8ff","userId":"12355","note":"string","cartItems":[{"productId":"68c885112c112fb2b5000a94","variantId":"45338157744313","quantity":1}]}'

Responses

Success (HTTP 200)

Success Response Example
 {
     "code": null,
     "status": "Success",
     "data": {
         "pendingOrderId": "68e6d2526e12591bce5075df",
         "totalPrice": 800,
         "currency": "EGP",
         "countriesWithProvinces": {
             "countries": [
                 {
                     "id": "68c04f694b3cff720039559b",
                     "name": "EGYPT",
                     "nameAr": "مصر",
                     "code": "EG",
                     "provinces": [
                         {
                             "id": "68c05461309c2cff8025d4b8",
                             "name": "Al Sharqia",
                             "nameAr": "الشرقية",
                             "code": "SHR",
                             "countryId": "68c04f694b3cff720039559b",
                             "cities": [
                                 {
                                     "cityId": "306",
                                     "name": "Zagazig",
                                     "nameAr": "الزقازيق"
                                 }
                             ]
                         },
                         {
                             "id": "68c05461309c2cff8025d4b9",
                             "name": "Alexandria",
                             "nameAr": "الإسكندرية",
                             "code": "ALX",
                             "countryId": "68c04f694b3cff720039559b",
                             "cities": [
                                 {
                                     "cityId": "93",
                                     "name": "Abu Qir",
                                     "nameAr": "ابو قير"
                                 }
                             ]
                         }
                     ]
                 }
             ],
             "totalCountries": 1,
             "totalProvinces": 3,
             "message": "Retrieved 1 countries with 3 total provinces"
         },
         "storeSetting": {
             "vendorID": "VDR0410212931",
             "productID": "EGMHOC23DP1",
             "partnerStoreID": "121283146",
             "heroVendorID": "HeroVDR0410212931",
             "heroProductID": "HeroEGMHOC23DP1",
             "heroPartnerStoreID": "Hero121283146"
         },
         "products": [
             {
                 "price": 800,
                 "oldPrice": 650,
                 "name": "Iphone 14 Pro Max",
                 "heroProduct": false
             }
         ]
     },
     "message": null,
     "errors": null
 }

Error (HTTP 4XX/5XX)

Error Response Example
   {
     "Status": "Error",
     "Data": null,
     "Message": null,
     "Errors": []
   }