> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Package: purchaseFlow # Namespace: cart # Webhook link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart/cart-updated.md ## Introduction # Webhook Permissions Scopes IDs: Read Orders: SCOPE.DC-STORES.READ-ORDERS --- ## REST API ### Schema ``` Webhook: Cart Updated Description: Event body: - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events. - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event. - name: slug | type: string | description: Event name. - name: entityId | type: string | description: ID of the entity associated with the event. - name: eventTime | type: string (date-time) | description: Event timestamp. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR. - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: updatedEvent | type: object | description: Updated event details. - name: currentEntity | type: Cart | description: The entity after the update. - name: id | type: string | description: Cart GUID. - name: lineItems | type: array | description: Line items. - name: id | type: string | description: Line item GUID. - name: quantity | type: integer | description: Item quantity. - name: catalogReference | type: CatalogReference | description: Catalog and item reference. Holds GUIDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to. - name: appId | type: string | description: GUID of the app providing the catalog. You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). For items from Wix catalogs, the following values always apply: + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` - name: options | type: object | description: Additional item details in `key:value` pairs. Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items. For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md). - name: productName | type: ProductName | description: Item name. + Stores - `product.name` + Bookings - `service.info.name` + Events - `ticket.name` - name: original | type: string | description: __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). Min: 1 character. Max: 200 characters. - name: translated | type: string | description: Item name translated into the buyer's language. Min: 1 character. Max: 400 characters. Default: Same as `original`. - name: url | type: PageUrlV2 | description: URL to the item's page on the site. - name: relativePath | type: string | description: The relative path for the page within the site. For example, `/product-page/a-product`. - name: url | type: string | description: The page's full URL. For example, `https://mysite.com/product-page/a-product`. - name: price | type: MultiCurrencyPrice | description: Item price **after** catalog-defined discount and line item discounts. - name: amount | type: string | description: Amount. - name: convertedAmount | type: string | description: Converted amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: formattedConvertedAmount | type: string | description: Converted amount formatted with currency symbol. - name: fullPrice | type: MultiCurrencyPrice | description: Item price **before** catalog-defined discount. Defaults to `price` when not provided. - name: priceBeforeDiscounts | type: MultiCurrencyPrice | description: Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. - name: lineItemPrice | type: MultiCurrencyPrice | description: Total price **after** catalog-defined discount and line item discounts. - name: descriptionLines | type: array | description: Line item description lines. Used for displaying the cart, checkout and order. - ONE-OF: - name: plainText | type: PlainTextValue | description: Description line plain text value. - name: original | type: string | description: Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line plain text value translated into the buyer's language. Default: Same as `original`. - name: colorInfo | type: Color | description: Description line color value. - name: original | type: string | description: Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line color name translated into the buyer's language. Default: Same as `original`. - name: code | type: string | description: HEX or RGB color code for display. - name: name | type: DescriptionLineName | description: Description line name. - name: original | type: string | description: Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line name translated into the buyer's language. Default: Same as `original`. - name: image | type: Image | description: Line item image details. - name: id | type: string | description: WixMedia image GUID. - name: url | type: string | description: Image URL. - name: height | type: integer | description: Original image height. - name: width | type: integer | description: Original image width. - name: altText | type: string | description: Image alt text. - name: filename | type: string | description: Image filename. - name: availability | type: ItemAvailabilityInfo | description: Item availability details. - name: status | type: ItemAvailabilityStatus | description: Item availability status. - enum: - AVAILABLE: - NOT_FOUND: Item does not exist. - NOT_AVAILABLE: Item is not in stock. - PARTIALLY_AVAILABLE: Available quantity is less than requested. - name: quantityAvailable | type: integer | description: Quantity available. - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. - name: weight | type: number | description: Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. - name: sku | type: string | description: Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). - name: shippable | type: boolean | description: Whether this line item is shippable. - name: itemType | type: ItemType | description: Item type. Either a preset type or custom. - ONE-OF: - name: preset | type: ItemTypePreset | description: Preset item type. - enum: UNRECOGNISED, PHYSICAL, DIGITAL, GIFT_CARD, SERVICE - name: custom | type: string | description: Custom item type. When none of the preset types are suitable, specifies the custom type. - name: subscriptionOptionInfo | type: SubscriptionOptionInfo | description: Subscription option information. - name: subscriptionSettings | type: SubscriptionSettings | description: Subscription option settings. - name: frequency | type: SubscriptionFrequency | description: Frequency of recurring payment. - enum: UNDEFINED, DAY, WEEK, MONTH, YEAR - name: interval | type: integer | description: Interval of recurring payment. Default: `1`. If SubscriptionFrequency is Day the minimum interval is 7 - name: autoRenewal | type: boolean | description: Whether subscription is renewed automatically at the end of each period. - name: billingCycles | type: integer | description: Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. - name: enableCustomerCancellation | type: boolean | description: Whether to allow the customer to cancel the subscription.. - name: freeTrialPeriod | type: FreeTrialPeriod | description: Period until first cycle starts. If applied payNow will be 0 If None => no free trial - name: frequency | type: SubscriptionFrequency | description: Frequency of period. Values: DAY, WEEK, MONTH, YEAR - enum: UNDEFINED, DAY, WEEK, MONTH, YEAR - name: interval | type: integer | description: Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial. - name: title | type: Title | description: Subscription option title. - name: original | type: string | description: Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Subscription option name translated into the buyer's language. Default: Same as `original`. - name: description | type: Description | description: Subscription option description. - name: original | type: string | description: Subscription option description. - name: translated | type: string | description: Translated subscription option description. - name: paymentOption | type: PaymentOptionType | description: Type of selected payment option for current item. Default: `FULL_PAYMENT_ONLINE` - enum: - FULL_PAYMENT_ONLINE: The entire payment for this item happens as part of the checkout. - FULL_PAYMENT_OFFLINE: The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. - MEMBERSHIP: Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. - DEPOSIT_ONLINE: Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. - MEMBERSHIP_OFFLINE: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. - MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER: Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline. - name: serviceProperties | type: ServiceProperties | description: Service properties. When relevant, this contains information such as date and number of participants. - name: scheduledDate | type: string | description: Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the start time of a class. - name: numberOfParticipants | type: integer | description: The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. - name: rootCatalogItemId | type: string | description: In cases where `catalogReference.catalogItemId` is NOT the actual catalog item GUID, this field will return the true item's GUID. + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking GUID. Therefore this value is set to the service GUID. + in most cases, this field is the same as `catalogReference.catalogItemId`. + Used in membership validation. - name: priceDescription | type: PriceDescription | description: Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". - name: original | type: string | description: __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Price description translated into the buyer's language. Default: Same as `original`. - name: depositAmount | type: MultiCurrencyPrice | description: Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only. - name: selectedMembership | type: SelectedMembership | description: Selected membership to be used as payment for this item. Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`. This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`. - name: id | type: string | description: Membership GUID. - name: appId | type: string | description: GUID of the app providing this payment option. - name: deliveryProfileId | type: string | description: Delivery profile GUID. - name: taxGroupId | type: string | description: Tax group GUID for this line item. - name: customLineItem | type: boolean | description: Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. - name: consentRequiredPaymentPolicy | type: string | description: Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page. - name: priceUndetermined | type: boolean | description: Whether the price is not yet defined, and will be updated after the order is created. - name: fixedQuantity | type: boolean | description: Whether the line item quantity is fixed and cannot be changed. - name: catalogOverrideFields | type: CatalogOverrideFields | description: Overriding values for catalog item properties. To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions.md). - name: productName | type: ProductName | description: Item name. - name: price | type: string | description: Item price **after** discounts. - name: fullPrice | type: string | description: Item price **before** discounts. - name: descriptionLines | type: array | description: Item description lines. Used when displaying the line item to customers. - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item. - name: image | type: Image | description: Item image. - name: id | type: string | description: WixMedia image GUID. - name: height | type: integer | description: Original image height. - name: width | type: integer | description: Original image width. - name: altText | type: string | description: Image alt text. Optional. - name: filename | type: string | description: Image filename. Optional. - name: paymentOption | type: PaymentOption | description: Payment method selected for the item. - name: value | type: PaymentOptionType | description: Type of selected payment option for current item. Default: `FULL_PAYMENT_ONLINE` - enum: - FULL_PAYMENT_ONLINE: The entire payment for this item happens as part of the checkout. - FULL_PAYMENT_OFFLINE: The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. - MEMBERSHIP: Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. - DEPOSIT_ONLINE: Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. - MEMBERSHIP_OFFLINE: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. - MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER: Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline. - name: depositAmount | type: string | description: Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. - name: savePaymentMethod | type: boolean | description: Whether to save the payment method on the order. Default: `false` - name: inventoryAppId | type: string | description: GUID of the app managing the inventory. - name: savePaymentMethod | type: boolean | description: Whether to save the payment method on the order. Default: `false` - name: taxableAddress | type: TaxableAddress | description: Address to use for tax calculation purposes. - ONE-OF: - name: addressType | type: TaxableAddressType | description: taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. - enum: BUSINESS, BILLING, SHIPPING - name: extendedFields | type: ExtendedFields | description: Custom extended fields for the line item object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured using the 'Checkout & Orders - Line Items Schema Plugin' in the app dashboard before they can be accessed with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: policies | type: array | description: Policies to be displayed to the customer on the checkout page. - name: title | type: string | description: Policy title - should be translated - name: content | type: string | description: Policy content - should be translated - name: membersOnly | type: boolean | description: Whether the item can only be purchased by site members. Default: `false` - name: modifierGroups | type: array | description: Modifier groups that were added to the item. - name: id | type: string | description: Modifier group GUID. - name: name | type: TranslatableString | description: Modifier group name. - name: original | type: string | description: __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). Min: 1 character. Max: 200 characters. - name: translated | type: string | description: String translated into the buyer's language. Min: 1 character. Max: 400 characters. Default: Same as `original`. - name: modifiers | type: array | description: List of modifiers in this group. - name: id | type: string | description: Modifier GUID. - name: quantity | type: integer | description: The quantity of this modifier. - name: label | type: TranslatableString | description: Primary display label for the modifier. - name: details | type: TranslatableString | description: Additional details. - name: price | type: MultiCurrencyPrice | description: The price of the modifier. - name: modifiersTotalPrice | type: MultiCurrencyPrice | description: Total price of all item modifiers. Included in the item price. - name: buyerNote | type: string | description: [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer. - name: buyerInfo | type: BuyerInfo | description: Buyer information. - name: contactId | type: string | description: Contact GUID. For more information, see the Contacts API. - name: email | type: string | description: Buyer email address. - name: currency | type: string | description: The site’s default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This represents the base currency configured for the site and remains constant regardless of the customer’s currency selection. - name: conversionCurrency | type: string | description: The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview) during the purchase flow, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This reflects the customer’s preferred display currency and may differ from the site’s default currency. When no specific currency is selected by the customer, this matches the `currency` property. - name: buyerLanguage | type: string | description: Language for communication with the buyer. Defaults to the site language. For a site that supports multiple languages, this is the language the buyer selected. - name: siteLanguage | type: string | description: Site language in which original values are displayed. - name: taxIncludedInPrices | type: boolean | description: Whether tax is included in line item prices. - name: weightUnit | type: WeightUnit | description: Weight measurement unit - defaults to site's weight unit. - enum: - UNSPECIFIED_WEIGHT_UNIT: Weight unit can't be classified due to an error. - KG: Kilograms. - LB: Pounds. - name: checkoutId | type: string | description: GUID of the checkout that originated from this cart. - name: appliedDiscounts | type: array | description: Cart discounts. - ONE-OF: - name: coupon | type: Coupon | description: Coupon details. - name: id | type: string | description: Coupon GUID. - name: code | type: string | description: Coupon code. - name: merchantDiscount | type: MerchantDiscount | description: Merchant discount. - name: amount | type: MultiCurrencyPrice | description: Discount value. - name: createdDate | type: string | description: Date and time the cart was created. - name: updatedDate | type: string | description: Date and time the cart was updated. - name: contactInfo | type: AddressWithContact | description: Contact info. - name: address | type: Address | description: Address. - name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. - name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. - name: city | type: string | description: City name. - name: postalCode | type: string | description: Postal or zip code. - name: streetAddress | type: StreetAddress | description: Street address. - name: number | type: string | description: Street number. - name: name | type: string | description: Street name. - name: addressLine | type: string | description: Main address line (usually street name and number). - name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains apt, suite, floor. - name: geocode | type: AddressLocation | description: Geocode object containing latitude and longitude coordinates. - name: latitude | type: number | description: Address latitude. - name: longitude | type: number | description: Address longitude. - name: countryFullname | type: string | description: Country's full name. - name: subdivisionFullname | type: string | description: Subdivision full-name. - name: contactDetails | type: FullAddressContactDetails | description: Contact details. - name: firstName | type: string | description: First name. - name: lastName | type: string | description: Last name. - name: phone | type: string | description: Phone number. - name: company | type: string | description: Company name. - name: vatId | type: VatId | description: Tax information (for Brazil only). If GUID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. - name: id | type: string | description: Customer's tax GUID. - name: type | type: VatType | description: Tax type. Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations - enum: - UNSPECIFIED: - CPF: CPF - for individual tax payers. - CNPJ: CNPJ - for corporations - name: overrideCheckoutUrl | type: string | description: `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`. - name: purchaseFlowId | type: string | description: Persistent GUID that correlates between the various eCommerce elements: cart, checkout, and order. - name: selectedShippingOption | type: SelectedShippingOption | description: Selected shipping option. - name: carrierId | type: string | description: Carrier GUID. - name: code | type: string | description: Selected shipping option code. For example, "usps_std_overnight". - name: extendedFields | type: ExtendedFields | description: Fields extended by data extensions - name: businessLocationId | type: string | description: The business location GUID associated with the cart. To learn more, see the Locations API. - name: paymentCurrency | type: string | description: The currency used for payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This is determined by the [customer's selected currency](https://support.wix.com/en/article/multicurrency-an-overview) and the site’s supported payment currencies. If the customer’s selected currency is supported for payment, this matches the `conversionCurrency` property. If not supported, this falls back to the `currency` property. - name: revision | type: string | description: Revision number, which increments by 1 each time the Cart is updated. - name: modifiedFields | type: Map | description: Fields that were updated and their values before the update. ``` ### Examples ```curl { "entityId": "55d42452-8e08-45ed-a72a-9df4da368f9f", "entityEventSequence": "7", "slug": "updated", "id": "417f6111-d0c6-439e-8972-1f3dab3009f9", "entityFqdn": "wix.ecom.v1.cart", "updatedEvent": { "currentEntity": { "lineItems": [ { "physicalProperties": { "sku": "364115376135191", "shippable": true }, "quantity": 1, "paymentOption": "FULL_PAYMENT_ONLINE", "url": { "relativePath": "/product-page/shirt", "url": "https://example.wixsite.com/ep-tester" }, "image": { "id": "3c76e2_c5331f937348492a97df87b0a3b34ea4~mv2.jpg", "url": "https://static.wixstatic.com/media/3c76e2_c5331f937348492a97df87b0a3b34ea4~mv2.jpg", "height": 1000, "width": 1000 }, "price": { "amount": "10", "convertedAmount": "10", "formattedAmount": "$10.00", "formattedConvertedAmount": "$10.00" }, "availability": { "status": "AVAILABLE" }, "priceBeforeDiscounts": { "amount": "10", "convertedAmount": "10", "formattedAmount": "$10.00", "formattedConvertedAmount": "$10.00" }, "id": "00000000-0000-0000-0000-000000000002", "fullPrice": { "amount": "10", "convertedAmount": "10", "formattedAmount": "$10.00", "formattedConvertedAmount": "$10.00" }, "itemType": { "preset": "PHYSICAL" }, "productName": { "original": "Shirt", "translated": "Shirt" }, "descriptionLines": [], "catalogReference": { "catalogItemId": "c8539b66-7a44-fe18-affc-afec4be8562a", "appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e", "options": { "options": {}, "variantId": "00000000-0000-0000-0000-000000000000" } } }, { "physicalProperties": { "sku": "217537123517253", "shippable": true }, "quantity": 1, "paymentOption": "FULL_PAYMENT_ONLINE", "url": { "relativePath": "/product-page/watch", "url": "https://example.wixsite.com/ep-tester" }, "image": { "id": "3c76e2_8891bbe3372a428aac976ac59aa0ac74~mv2.jpg", "url": "https://static.wixstatic.com/media/3c76e2_8891bbe3372a428aac976ac59aa0ac74~mv2.jpg", "height": 1000, "width": 1000 }, "price": { "amount": "30", "convertedAmount": "30", "formattedAmount": "$30.00", "formattedConvertedAmount": "$30.00" }, "availability": { "status": "AVAILABLE", "quantityAvailable": 10 }, "priceBeforeDiscounts": { "amount": "30", "convertedAmount": "30", "formattedAmount": "$30.00", "formattedConvertedAmount": "$30.00" }, "id": "00000000-0000-0000-0000-000000000003", "fullPrice": { "amount": "30", "convertedAmount": "30", "formattedAmount": "$30.00", "formattedConvertedAmount": "$30.00" }, "itemType": { "preset": "PHYSICAL" }, "productName": { "original": "Watch", "translated": "Watch" }, "descriptionLines": [ { "name": { "original": "Size", "translated": "Size" }, "plainText": { "original": "Medium", "translated": "Medium" } }, { "name": { "original": "Color", "translated": "Color" }, "colorInfo": { "original": "Grey", "translated": "Grey", "code": "rgb(128, 128, 128)" } } ], "catalogReference": { "catalogItemId": "1a2d7e83-4bef-31d5-09e1-3326ee271c09", "appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e", "options": { "options": { "Size": "Medium", "Color": "Grey" }, "variantId": "132b84e8-aab8-47a1-a1f6-2c47557b64a4" } } } ], "siteLanguage": "en", "appliedDiscounts": [ { "coupon": { "id": "fbb94b06-7447-4161-9c48-59bfcdc39e77", "code": "SUMMERSALE10" } } ], "taxIncludedInPrices": false, "weightUnit": "KG", "id": "55d42452-8e08-45ed-a72a-9df4da368f9f", "buyerInfo": { "visitorId": "4c7ce95c-9fb3-417d-9f02-b41e82b841f7" }, "currency": "USD", "updatedDate": "2022-12-12T13:22:36.861Z", "conversionCurrency": "USD", "buyerLanguage": "en", "createdDate": "2022-12-12T08:50:15.814Z" } }, "eventTime": "2022-12-12T13:22:36.876934Z", "triggeredByAnonymizeRequest": false } ``` --- ## JavaScript SDK ### Schema ``` Webhook: onCartUpdated Description: Payload: CartUpdatedEnvelope - name: entity | type: Cart | description: none - name: _id | type: string | description: Cart GUID. - name: lineItems | type: array | description: Line items. - name: _id | type: string | description: Line item GUID. - name: quantity | type: integer | description: Item quantity. - name: catalogReference | type: CatalogReference | description: Catalog and item reference. Holds GUIDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to. - name: appId | type: string | description: GUID of the app providing the catalog. You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). For items from Wix catalogs, the following values always apply: + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` - name: options | type: object | description: Additional item details in `key:value` pairs. Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items. For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md). - name: productName | type: ProductName | description: Item name. + Stores - `product.name` + Bookings - `service.info.name` + Events - `ticket.name` - name: original | type: string | description: __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). Min: 1 character. Max: 200 characters. - name: translated | type: string | description: Item name translated into the buyer's language. Min: 1 character. Max: 400 characters. Default: Same as `original`. - name: url | type: string | description: URL to the item's page on the site. - name: price | type: MultiCurrencyPrice | description: Item price **after** catalog-defined discount and line item discounts. - name: amount | type: string | description: Amount. - name: convertedAmount | type: string | description: Converted amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: formattedConvertedAmount | type: string | description: Converted amount formatted with currency symbol. - name: fullPrice | type: MultiCurrencyPrice | description: Item price **before** catalog-defined discount. Defaults to `price` when not provided. - name: priceBeforeDiscounts | type: MultiCurrencyPrice | description: Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. - name: lineItemPrice | type: MultiCurrencyPrice | description: Total price **after** catalog-defined discount and line item discounts. - name: descriptionLines | type: array | description: Line item description lines. Used for displaying the cart, checkout and order. - ONE-OF: - name: plainText | type: PlainTextValue | description: Description line plain text value. - name: original | type: string | description: Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line plain text value translated into the buyer's language. Default: Same as `original`. - name: colorInfo | type: Color | description: Description line color value. - name: original | type: string | description: Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line color name translated into the buyer's language. Default: Same as `original`. - name: code | type: string | description: HEX or RGB color code for display. - name: name | type: DescriptionLineName | description: Description line name. - name: original | type: string | description: Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line name translated into the buyer's language. Default: Same as `original`. - name: image | type: string | description: Line item image details. - name: availability | type: ItemAvailabilityInfo | description: Item availability details. - name: status | type: ItemAvailabilityStatus | description: Item availability status. - enum: - AVAILABLE: - NOT_FOUND: Item does not exist. - NOT_AVAILABLE: Item is not in stock. - PARTIALLY_AVAILABLE: Available quantity is less than requested. - name: quantityAvailable | type: integer | description: Quantity available. - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. - name: weight | type: number | description: Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. - name: sku | type: string | description: Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). - name: shippable | type: boolean | description: Whether this line item is shippable. - name: itemType | type: ItemType | description: Item type. Either a preset type or custom. - ONE-OF: - name: preset | type: ItemTypePreset | description: Preset item type. - enum: UNRECOGNISED, PHYSICAL, DIGITAL, GIFT_CARD, SERVICE - name: custom | type: string | description: Custom item type. When none of the preset types are suitable, specifies the custom type. - name: subscriptionOptionInfo | type: SubscriptionOptionInfo | description: Subscription option information. - name: subscriptionSettings | type: SubscriptionSettings | description: Subscription option settings. - name: frequency | type: SubscriptionFrequency | description: Frequency of recurring payment. - enum: UNDEFINED, DAY, WEEK, MONTH, YEAR - name: interval | type: integer | description: Interval of recurring payment. Default: `1`. If SubscriptionFrequency is Day the minimum interval is 7 - name: autoRenewal | type: boolean | description: Whether subscription is renewed automatically at the end of each period. - name: billingCycles | type: integer | description: Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. - name: enableCustomerCancellation | type: boolean | description: Whether to allow the customer to cancel the subscription.. - name: freeTrialPeriod | type: FreeTrialPeriod | description: Period until first cycle starts. If applied payNow will be 0 If None => no free trial - name: frequency | type: SubscriptionFrequency | description: Frequency of period. Values: DAY, WEEK, MONTH, YEAR - enum: UNDEFINED, DAY, WEEK, MONTH, YEAR - name: interval | type: integer | description: Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial. - name: title | type: Title | description: Subscription option title. - name: original | type: string | description: Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Subscription option name translated into the buyer's language. Default: Same as `original`. - name: description | type: Description | description: Subscription option description. - name: original | type: string | description: Subscription option description. - name: translated | type: string | description: Translated subscription option description. - name: paymentOption | type: PaymentOptionType | description: Type of selected payment option for current item. Default: `FULL_PAYMENT_ONLINE` - enum: - FULL_PAYMENT_ONLINE: The entire payment for this item happens as part of the checkout. - FULL_PAYMENT_OFFLINE: The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. - MEMBERSHIP: Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. - DEPOSIT_ONLINE: Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. - MEMBERSHIP_OFFLINE: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. - MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER: Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline. - name: serviceProperties | type: ServiceProperties | description: Service properties. When relevant, this contains information such as date and number of participants. - name: scheduledDate | type: Date | description: Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the start time of a class. - name: numberOfParticipants | type: integer | description: The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. - name: rootCatalogItemId | type: string | description: In cases where `catalogReference.catalogItemId` is NOT the actual catalog item GUID, this field will return the true item's GUID. + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking GUID. Therefore this value is set to the service GUID. + in most cases, this field is the same as `catalogReference.catalogItemId`. + Used in membership validation. - name: priceDescription | type: PriceDescription | description: Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". - name: original | type: string | description: __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Price description translated into the buyer's language. Default: Same as `original`. - name: depositAmount | type: MultiCurrencyPrice | description: Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only. - name: selectedMembership | type: SelectedMembership | description: Selected membership to be used as payment for this item. Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`. This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`. - name: _id | type: string | description: Membership GUID. - name: appId | type: string | description: GUID of the app providing this payment option. - name: deliveryProfileId | type: string | description: Delivery profile GUID. - name: taxGroupId | type: string | description: Tax group GUID for this line item. - name: customLineItem | type: boolean | description: Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. - name: consentRequiredPaymentPolicy | type: string | description: Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page. - name: priceUndetermined | type: boolean | description: Whether the price is not yet defined, and will be updated after the order is created. - name: fixedQuantity | type: boolean | description: Whether the line item quantity is fixed and cannot be changed. - name: catalogOverrideFields | type: CatalogOverrideFields | description: Overriding values for catalog item properties. To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions.md). - name: productName | type: ProductName | description: Item name. - name: price | type: string | description: Item price **after** discounts. - name: fullPrice | type: string | description: Item price **before** discounts. - name: descriptionLines | type: array | description: Item description lines. Used when displaying the line item to customers. - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item. - name: image | type: string | description: Item image. - name: paymentOption | type: PaymentOption | description: Payment method selected for the item. - name: value | type: PaymentOptionType | description: Type of selected payment option for current item. Default: `FULL_PAYMENT_ONLINE` - enum: - FULL_PAYMENT_ONLINE: The entire payment for this item happens as part of the checkout. - FULL_PAYMENT_OFFLINE: The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. - MEMBERSHIP: Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. - DEPOSIT_ONLINE: Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. - MEMBERSHIP_OFFLINE: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. - MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER: Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline. - name: depositAmount | type: string | description: Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. - name: savePaymentMethod | type: boolean | description: Whether to save the payment method on the order. Default: `false` - name: inventoryAppId | type: string | description: GUID of the app managing the inventory. - name: savePaymentMethod | type: boolean | description: Whether to save the payment method on the order. Default: `false` - name: taxableAddress | type: TaxableAddress | description: Address to use for tax calculation purposes. - ONE-OF: - name: addressType | type: TaxableAddressType | description: taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. - enum: BUSINESS, BILLING, SHIPPING - name: extendedFields | type: ExtendedFields | description: Custom extended fields for the line item object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured using the 'Checkout & Orders - Line Items Schema Plugin' in the app dashboard before they can be accessed with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: policies | type: array | description: Policies to be displayed to the customer on the checkout page. - name: title | type: string | description: Policy title - should be translated - name: content | type: string | description: Policy content - should be translated - name: membersOnly | type: boolean | description: Whether the item can only be purchased by site members. Default: `false` - name: modifierGroups | type: array | description: Modifier groups that were added to the item. - name: _id | type: string | description: Modifier group GUID. - name: name | type: TranslatableString | description: Modifier group name. - name: original | type: string | description: __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). Min: 1 character. Max: 200 characters. - name: translated | type: string | description: String translated into the buyer's language. Min: 1 character. Max: 400 characters. Default: Same as `original`. - name: modifiers | type: array | description: List of modifiers in this group. - name: _id | type: string | description: Modifier GUID. - name: quantity | type: integer | description: The quantity of this modifier. - name: label | type: TranslatableString | description: Primary display label for the modifier. - name: details | type: TranslatableString | description: Additional details. - name: price | type: MultiCurrencyPrice | description: The price of the modifier. - name: modifiersTotalPrice | type: MultiCurrencyPrice | description: Total price of all item modifiers. Included in the item price. - name: buyerNote | type: string | description: [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer. - name: buyerInfo | type: BuyerInfo | description: Buyer information. - name: contactId | type: string | description: Contact GUID. For more information, see the Contacts API. - name: email | type: string | description: Buyer email address. - name: currency | type: string | description: The site’s default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This represents the base currency configured for the site and remains constant regardless of the customer’s currency selection. - name: conversionCurrency | type: string | description: The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview) during the purchase flow, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This reflects the customer’s preferred display currency and may differ from the site’s default currency. When no specific currency is selected by the customer, this matches the `currency` property. - name: buyerLanguage | type: string | description: Language for communication with the buyer. Defaults to the site language. For a site that supports multiple languages, this is the language the buyer selected. - name: siteLanguage | type: string | description: Site language in which original values are displayed. - name: taxIncludedInPrices | type: boolean | description: Whether tax is included in line item prices. - name: weightUnit | type: WeightUnit | description: Weight measurement unit - defaults to site's weight unit. - enum: - UNSPECIFIED_WEIGHT_UNIT: Weight unit can't be classified due to an error. - KG: Kilograms. - LB: Pounds. - name: checkoutId | type: string | description: GUID of the checkout that originated from this cart. - name: appliedDiscounts | type: array | description: Cart discounts. - ONE-OF: - name: coupon | type: Coupon | description: Coupon details. - name: _id | type: string | description: Coupon GUID. - name: code | type: string | description: Coupon code. - name: merchantDiscount | type: MerchantDiscount | description: Merchant discount. - name: amount | type: MultiCurrencyPrice | description: Discount value. - name: _createdDate | type: Date | description: Date and time the cart was created. - name: _updatedDate | type: Date | description: Date and time the cart was updated. - name: contactInfo | type: AddressWithContact | description: Contact info. - name: address | type: Address | description: Address. - name: streetAddress | type: StreetAddress | description: none - name: name | type: string | description: none - name: number | type: string | description: none - name: city | type: string | description: none - name: subdivision | type: string | description: none - name: country | type: string | description: none - name: postalCode | type: string | description: none - name: addressLine2 | type: string | description: none - name: contactDetails | type: FullAddressContactDetails | description: Contact details. - name: firstName | type: string | description: First name. - name: lastName | type: string | description: Last name. - name: phone | type: string | description: Phone number. - name: company | type: string | description: Company name. - name: vatId | type: VatId | description: Tax information (for Brazil only). If GUID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. - name: _id | type: string | description: Customer's tax GUID. - name: type | type: VatType | description: Tax type. Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations - enum: - UNSPECIFIED: - CPF: CPF - for individual tax payers. - CNPJ: CNPJ - for corporations - name: overrideCheckoutUrl | type: string | description: `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`. - name: purchaseFlowId | type: string | description: Persistent GUID that correlates between the various eCommerce elements: cart, checkout, and order. - name: selectedShippingOption | type: SelectedShippingOption | description: Selected shipping option. - name: carrierId | type: string | description: Carrier GUID. - name: code | type: string | description: Selected shipping option code. For example, "usps_std_overnight". - name: extendedFields | type: ExtendedFields | description: Fields extended by data extensions - name: businessLocationId | type: string | description: The business location GUID associated with the cart. To learn more, see the Locations API. - name: paymentCurrency | type: string | description: The currency used for payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This is determined by the [customer's selected currency](https://support.wix.com/en/article/multicurrency-an-overview) and the site’s supported payment currencies. If the customer’s selected currency is supported for payment, this matches the `conversionCurrency` property. If not supported, this falls back to the `currency` property. - name: revision | type: string | description: Revision number, which increments by 1 each time the Cart is updated. - name: modifiedFields | type: Map | description: Fields that were updated and their values before the update. - ONE-OF: - name: nullValue | type: | description: - name: numberValue | type: number | description: - name: stringValue | type: string | description: - name: boolValue | type: boolean | description: - name: structValue | type: object | description: - name: listValue | type: ListValue | description: - name: values | type: array | description: - name: metadata | type: EventMetadata | description: none - name: instanceId | type: string | description: App instance GUID. - name: eventType | type: string | description: Event type. - name: identity | type: IdentificationData | description: The identification type and identity data. - ONE-OF: - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site. - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site. - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.). - name: appId | type: string | description: GUID of an app. - name: identityType | type: WebhookIdentityType | description: - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP - name: accountInfo | type: AccountInfo | description: Details related to the account - name: accountId | type: string | description: GUID of the Wix account associated with the event. - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account. - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site. - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them. - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. - name: entityId | type: string | description: GUID of the entity associated with the event. - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR). - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. ``` ### Examples ```javascript import { cart } from '@wix/ecom'; cart.onCartUpdated((event) => { // handle your event here }); ``` ```javascript import { createClient, AppStrategy } from '@wix/sdk'; import { cart } from '@wix/ecom'; const wixClient = createClient({ auth: AppStrategy({ appId: 'MY-APP-ID', publicKey: 'YOUR_APP_PUBLIC_KEY', }), modules: { cart, }, }); wixClient.cart.onCartUpdated((event) => { // handle your event here }); ``` ---