# Cart create

> Triggered when an item is added to the cart. Reference for the Shoplazza cart/create webhook: request headers and payload fields.

**Webhook** cart/create

Triggered when an item is added to the cart.

Requires the `order` [access scope](/docs/app/building-blocks/authentication/access-scopes). Minimum supported version: `202201`.

## Request headers

- `X-Shoplazza-Topic` string

  The event that triggered this delivery, e.g. orders/create

  **Example:** `orders/create`
- `X-Shoplazza-Hmac-Sha256` string

  Base64-encoded HMAC-SHA256 signature of the request body, generated with your app's Client Secret. Use it to verify the request comes from Shoplazza
- `X-Shoplazza-Shop-Domain` string

  The domain of the store that generated the event

  **Example:** `example.myshoplaza.com`
- `X-Shoplazza-Api-Version` string

  The API version used to serialize the payload

  **Example:** `2025-06`
- `X-Shoplazza-Deduplication-ID` string

  Deduplication ID for this delivery. It stays the same across retries of the same event—use it for idempotency

## Request body

**Schema | Example**

- `cart` object

  - `created_at` string

    Cart creation time
  - `currency_code` string

    Currency code
  - `discount_applications` object[]

    Cart-level discount details

    *   Array [

    - `apply_method` string

      Application method for automatic-activity lines
    - `code` string

      Discount code (present only for discount-code activities)
    - `discount_amount` number

      Discount amount
    - `discount_id` string

      Discount ID
    - `discount_message` string

      Discount prompt text
    - `discount_text` string

      Discount text (may be the title or a label)
    - `discount_type` string

      Discount-code discount type: percentage or fixed amount (discount codes only)
    - `entitled_product_list` object[]

      List of products the discount applies to

      *   Array [

      - `product_id` string

        Product ID
      - `variant_id` string

        Variant ID
      - `price` string

        Selling unit price
      - `quantity` integer

        Purchase quantity
      *   ]
    - `extents` object

      Extension fields (string-to-string key-value pairs; keys vary)
    - `extents.application_time` string

      Application time
    - `extents.business_custom_data` string

      Business-defined custom data
    - `extents.discount_apply_type` string

      Discount application type
    - `extents.discount_code` string

      Discount code
    - `extents.discount_rule_info` string

      Discount rule information
    - `extents.old_discount_id` string

      Legacy discount ID
    - `extents.use_with_other` string

      Whether the discount can be combined with others
    - `icon` string

      Icon
    - `is_free_gift` boolean

      Whether the entitled-product list are free gifts
    - `message` string

      Input-box prompt text
    - `properties` string

      Additional discount-code fields
    - `status` string

      Discount-code application status: success (applied), undetermined (pending), fail (not applied)
    - `subtype` string

      Marketing-activity subtype: discount_rebate (spend-threshold discount), discount_code (discount code), discount_coupon (coupon), discount_flashsale (flash sale), automatic (automatic discount), buy_x_get_y (buy X get Y)
    - `target_selection` string

      Discount target selection method
    - `target_type` string

      Discount target: shipping_line (shipping), line_item (line item), payment_line (payment method)
    - `title` string

      Discount name
    - `type` string

      Marketing-activity type: discount_rebate (spend-threshold discount), discount_code (discount code), discount_coupon (coupon), discount_flashsale (flash sale), automatic (automatic discount)
    - `value_type` string

      Discount value type
    *   ]
  - `extra` object

    Additional information about the cart change

    - `client_id` string

      Client ID
  - `item_count` integer

    Number of items
  - `line_items` object[]

    List of items in the cart

    *   Array [

    - `add_quantity` string

      Quantity added
    - `available` boolean

      Whether the product is available for sale
    - `available_quantity` integer

      Available quantity
    - `can_buy` boolean

      Whether the item can be purchased
    - `compare_at_price` string

      Compare-at (strikethrough) unit price
    - `cost_price` string

      Cost price
    - `custom` boolean

      Whether this is a custom line item
    - `discount_applications` object[]

      Discount details for this line item

      *   Array [

      - `allocation_method` string

        Allocation method
      - `code` string

        Discount code
      - `discount_amount` string

        Discount amount
      - `discount_id` string

        Discount ID
      - `discount_quantity` integer

        Discounted quantity
      - `discount_text` string

        Discount text (may be the title or a label)
      - `discount_type` string

        Discount-code discount type
      - `extents` object

        Extension fields (key-value pairs; keys vary)
      - `extents.business_custom_data` string

        Business-defined custom data
      - `extents.old_discount_id` string

        Legacy discount ID
      - `extents.raw_input_line_item_price` string

        Raw input line item price
      - `groups` array

        Discount application groups
      - `icon` string

        Icon
      - `is_free_gift` boolean

        Whether this product list are free gifts
      - `is_need_split` boolean

        Whether splitting is allowed
      - `subtype` string

        Marketing-activity subtype (values as listed under discount_applications)
      - `target_selection` string

        Discount target selection method
      - `target_type` string

        Discount target (values as listed under discount_applications)
      - `title` string

        Discount name
      - `total_discount_amount` string

        Total discount amount
      - `type` string

        Marketing-activity type (values as listed under discount_applications)
      - `value` string

        Discount value
      - `value_type` string

        Discount value type
      *   ]
    - `discount_total` string

      Total discount amount
    - `final_line_price` string

      Final line price
    - `final_price` string

      Final unit price
    - `fixed_discount_total` string

      Fixed discount total
    - `id` string

      Cart line item ID
    - `image` object

      Product image
    - `image.height` integer

      Image height
    - `image.path` string

      Image path
    - `image.src` string

      Image URL
    - `image.width` integer

      Image width
    - `inventory_policy` string

      Inventory policy (continue: keep selling when out of stock / deny: stop selling when out of stock / auto_unpublished: auto-unpublish when out of stock)
    - `inventory_quantity` integer

      Inventory quantity
    - `inventory_tracking` boolean

      Whether inventory tracking is enabled
    - `item_id` string

      Item ID
    - `line_price` string

      Line price
    - `mixed_wholesale` boolean

      Whether mixed wholesale is supported
    - `options` object[]

      List of product option attributes

      *   Array [

      - `name` string

        Option name
      - `value` string

        Option value
      *   ]
    - `origin_price` string

      Original price
    - `original_line_price` number

      Original line price
    - `parts_price` string

      Parts price
    - `price` string

      Selling unit price
    - `product_handle` string

      Product handle
    - `product_id` string

      Product ID
    - `product_tags` string[]

      Product tags
    - `product_title` string

      Product title
    - `product_type` string

      Product type
    - `product_url` string

      Product URL
    - `properties` string

      Product option properties (key-value pairs)
    - `published` boolean

      Whether the product is published (listed)
    - `published_at` string

      Product publish time
    - `quantity` string

      Purchase quantity
    - `requires_shipping` boolean

      Whether shipping is required
    - `retail_price` string

      Retail price
    - `saved_price` integer

      Amount saved
    - `sku` string

      Variant SKU
    - `taxable` boolean

      Whether the item is taxable
    - `trunk_price` string

      Trunk price
    - `variant_id` string

      Variant ID
    - `variant_title` string

      Variant title
    - `vendor` string

      Vendor
    - `weight` string

      Product weight
    - `weight_unit` string

      Weight unit
    - `wholesale_price` object[]

      Wholesale prices (list)

      *   Array [

      - `min_quantity` integer

        Minimum quantity
      - `price` string

        Price
      *   ]
    *   ]
  - `total_discount` string

    Total discount amount of the cart
  - `total_price` string

    Total amount of items in the cart
  - `updated_at` string

    Cart update time
  - `user_id` string

    User ID
  - `user_sign` string

    User signature (guest identifier)

```json
{
  "cart": {
    "created_at": "string",
    "currency_code": "string",
    "discount_applications": [
      {
        "apply_method": "string",
        "code": "string",
        "discount_amount": 0,
        "discount_id": "string",
        "discount_message": "string",
        "discount_text": "string",
        "discount_type": "string",
        "entitled_product_list": [
          {
            "product_id": "string",
            "variant_id": "string",
            "price": "string",
            "quantity": 0
          }
        ],
        "extents": {},
        "extents.application_time": "string",
        "extents.business_custom_data": "string",
        "extents.discount_apply_type": "string",
        "extents.discount_code": "string",
        "extents.discount_rule_info": "string",
        "extents.old_discount_id": "string",
        "extents.use_with_other": "string",
        "icon": "string",
        "is_free_gift": true,
        "message": "string",
        "properties": "string",
        "status": "string",
        "subtype": "string",
        "target_selection": "string",
        "target_type": "string",
        "title": "string",
        "type": "string",
        "value_type": "string"
      }
    ],
    "extra": {
      "client_id": "string"
    },
    "item_count": 0,
    "line_items": [
      {
        "add_quantity": "string",
        "available": true,
        "available_quantity": 0,
        "can_buy": true,
        "compare_at_price": "string",
        "cost_price": "string",
        "custom": true,
        "discount_applications": [
          {
            "allocation_method": "string",
            "code": "string",
            "discount_amount": "string",
            "discount_id": "string",
            "discount_quantity": 0,
            "discount_text": "string",
            "discount_type": "string",
            "extents": {},
            "extents.business_custom_data": "string",
            "extents.old_discount_id": "string",
            "extents.raw_input_line_item_price": "string",
            "groups": [
              null
            ],
            "icon": "string",
            "is_free_gift": true,
            "is_need_split": true,
            "subtype": "string",
            "target_selection": "string",
            "target_type": "string",
            "title": "string",
            "total_discount_amount": "string",
            "type": "string",
            "value": "string",
            "value_type": "string"
          }
        ],
        "discount_total": "string",
        "final_line_price": "string",
        "final_price": "string",
        "fixed_discount_total": "string",
        "id": "string",
        "image": {},
        "image.height": 0,
        "image.path": "string",
        "image.src": "string",
        "image.width": 0,
        "inventory_policy": "string",
        "inventory_quantity": 0,
        "inventory_tracking": true,
        "item_id": "string",
        "line_price": "string",
        "mixed_wholesale": true,
        "options": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "origin_price": "string",
        "original_line_price": 0,
        "parts_price": "string",
        "price": "string",
        "product_handle": "string",
        "product_id": "string",
        "product_tags": [
          "string"
        ],
        "product_title": "string",
        "product_type": "string",
        "product_url": "string",
        "properties": "string",
        "published": true,
        "published_at": "string",
        "quantity": "string",
        "requires_shipping": true,
        "retail_price": "string",
        "saved_price": 0,
        "sku": "string",
        "taxable": true,
        "trunk_price": "string",
        "variant_id": "string",
        "variant_title": "string",
        "vendor": "string",
        "weight": "string",
        "weight_unit": "string",
        "wholesale_price": [
          {
            "min_quantity": 0,
            "price": "string"
          }
        ]
      }
    ],
    "total_discount": "string",
    "total_price": "string",
    "updated_at": "string",
    "user_id": "string",
    "user_sign": "string"
  }
}
```
