> 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 # EstimateCurrentCartTotals # Package: purchaseFlow # Namespace: CurrentCartService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart/estimate-current-cart-totals.md ## Permission Scopes: Read Orders: SCOPE.DC-STORES.READ-ORDERS ## Introduction Estimates the current cart's price totals (including tax), based on a selected carrier service, shipping address, and billing information. Use this method for preview purposes, such as displaying estimated totals before checkout. This provides a partial estimation, not a full cart calculation. >**Notes:** >+ Use boolean flags to control which components to include in the estimation: delivery costs, additional fees, taxes, and gift cards. Components that aren't explicitly enabled are excluded. >+ Line item discounts are already calculated and applied to the cart. >+ Not passing any properties only estimates the cart items price totals, without considering shipping and billing information. >+ Calling this method before adding an item to the cart returns a 404 error, as the cart doesn't exist yet. >+ This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions.md). --- ## REST API ### Schema ``` Method: estimateCurrentCartTotals Description: Estimates the current cart's price totals (including tax), based on a selected carrier service, shipping address, and billing information. Use this method for preview purposes, such as displaying estimated totals before checkout. This provides a partial estimation, not a full cart calculation. >**Notes:** >+ Use boolean flags to control which components to include in the estimation: delivery costs, additional fees, taxes, and gift cards. Components that aren't explicitly enabled are excluded. >+ Line item discounts are already calculated and applied to the cart. >+ Not passing any properties only estimates the cart items price totals, without considering shipping and billing information. >+ Calling this method before adding an item to the cart returns a 404 error, as the cart doesn't exist yet. >+ This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions.md). URL: https://www.wixapis.com/ecom/v1/carts/current/estimate-totals Method: POST Method parameters: param name: billingAddress | type: Address | description: Physical 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. param name: calculateAdditionalFees | type: calculateAdditionalFees | description: Whether to calculate additional fees in the calculation request. Default: `true` param name: calculateShipping | type: calculateShipping | description: Whether to calculate shipping in the calculation request. Default: `true` param name: calculateTax | type: calculateTax | description: Whether to calculate tax in the calculation request. Default: `true` param name: selectedMemberships | type: SelectedMemberships - name: memberships | type: array | description: Selected memberships. - name: id | type: string | description: Membership GUID. - name: appId | type: string | description: GUID of the app providing this payment option. - name: lineItemIds | type: array | description: IDs of the line items this membership applies to. param name: selectedShippingOption | type: SelectedShippingOption - name: carrierId | type: string | description: Carrier GUID. - name: code | type: string | description: Selected shipping option code. For example, "usps_std_overnight". param name: shippingAddress | type: Address | description: Physical 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: 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. Return type: EstimateTotalsResponse - name: cart | type: Cart | description: Cart. - 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 - 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` - 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: calculatedLineItems | type: array | description: Calculated line items. - name: lineItemId | type: string | description: Line item GUID. - name: pricesBreakdown | type: LineItemPricesData | description: Price breakdown for this line item. - name: totalPriceAfterTax | type: MultiCurrencyPrice | description: Total price after discounts, tax, and modifiers. - name: totalPriceBeforeTax | type: MultiCurrencyPrice | description: Total price after discounts and modifiers, and before tax. - name: taxDetails | type: ItemTaxFullDetails | description: Tax details. - name: taxableAmount | type: MultiCurrencyPrice | description: Amount for which tax is calculated. - name: taxRate | type: string | description: Tax rate %, as a decimal point between 0 and 1. - name: totalTax | type: MultiCurrencyPrice | description: Calculated tax, based on `taxable_amount` and `tax_rate`. - name: taxBreakdown | type: array | description: tax information for a line item. - name: jurisdiction | type: string | description: The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". - name: nonTaxableAmount | type: MultiCurrencyPrice | description: The amount of this line item price that was considered nontaxable. (Decimal value) - name: rate | type: string | description: The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) - name: taxAmount | type: MultiCurrencyPrice | description: The amount of tax estimated for this line item. (Decimal value) - name: taxableAmount | type: MultiCurrencyPrice | description: The taxable amount of this line item. - name: taxType | type: string | description: The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. - name: taxName | type: string | description: The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. This name should be explicit enough to allow the merchant to understand what tax was calculated. - name: jurisdictionType | type: JurisdictionType | description: The type of the jurisdiction in which this tax detail applies. - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL - name: totalDiscount | type: MultiCurrencyPrice | description: Total discount applied for the line item. - name: price | type: MultiCurrencyPrice | description: Catalog price after catalog-defined discount, automatic discounts, and modifiers. - name: priceBeforeDiscounts | type: MultiCurrencyPrice | description: Item price before automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers. Defaults to `price` when not provided. - name: lineItemPrice | type: MultiCurrencyPrice | description: Total line item price after catalog-defined discounts, automatic discounts, and modifiers. - name: fullPrice | type: MultiCurrencyPrice | description: Item price before all discounts and modifiers. Defaults to `price` when not provided. - name: depositAmount | type: MultiCurrencyPrice | description: Partial payment out of `price` to be paid upfront during the checkout. Applies to catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only. - name: paymentOption | type: PaymentOptionType | description: Type of selected payment option for current item. Supported values: + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item will happen as part of the checkout + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item will happen after the checkout + `"MEMBERSHIP"` - This item cannot be paid via monetary payment options, only via non monetary option such membership. When this option is used, price must be set to 0 + `"DEPOSIT_ONLINE"` - Partial payment of the given item will happen as part of the checkout. Amount to be paid is defined by deposit_amount field. - name: taxableAddress | type: TaxableAddress | description: tax calculation address. - name: priceSummary | type: PriceSummary | description: Price summary. - name: subtotal | type: MultiCurrencyPrice | description: Subtotal of all line items, before discounts and before tax. - name: shipping | type: MultiCurrencyPrice | description: Total shipping price, before discounts and before tax. - name: tax | type: MultiCurrencyPrice | description: Total tax. - name: discount | type: MultiCurrencyPrice | description: Total calculated discount value. - name: total | type: MultiCurrencyPrice | description: Total price after discounts, gift cards, and tax. - name: additionalFees | type: MultiCurrencyPrice | description: Total additional fees price before tax. - name: giftCard | type: GiftCard | description: Applied gift card. - name: obfuscatedCode | type: string | description: Gift card obfuscated code. - name: amount | type: MultiCurrencyPrice | description: Actual amount to be redeemed from the gift card. - name: appId | type: string | description: App GUID of the gift card provider. - name: externalId | type: string | description: External GUID in the gift card provider's system. Used for integration and tracking across different platforms. - name: requestedAmount | type: MultiCurrencyPrice | description: Requested amount to redeem from the gift card. - name: taxSummary | type: TaxSummary | description: Tax summary. - name: taxableAmount | type: MultiCurrencyPrice | description: Amount for which tax is calculated, added from line items. - name: totalTax | type: MultiCurrencyPrice | description: Calculated tax, added from line items. - name: shippingInfo | type: ShippingInformation | description: Shipping information. - name: region | type: ShippingRegion | description: Shipping region. - name: id | type: string | description: Shipping region GUID. - name: name | type: string | description: Shipping region name. - name: selectedCarrierServiceOption | type: SelectedCarrierServiceOption | description: Selected shipping option. - name: code | type: string | description: Unique identifier of selected option. For example, "usps_std_overnight". - name: title | type: string | description: Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). For example, "Standard" or "First-Class Package International". - name: logistics | type: DeliveryLogistics | description: Delivery logistics. - name: deliveryTime | type: string | description: Expected delivery time, in free text. For example, "3-5 business days". - name: instructions | type: string | description: Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". - name: pickupDetails | type: PickupDetails | description: Pickup details. - name: address | type: Address | description: Pickup address. - name: pickupMethod | type: PickupMethod | description: Pickup method - enum: STORE_PICKUP, PICKUP_POINT - name: cost | type: SelectedCarrierServiceOptionPrices | description: Shipping costs. - name: totalPriceAfterTax | type: MultiCurrencyPrice | description: Total shipping price, after discount and after tax. - name: totalPriceBeforeTax | type: MultiCurrencyPrice | description: Total price of shipping after discounts (when relevant), and before tax. - name: taxDetails | type: ItemTaxFullDetails | description: Tax details. - name: totalDiscount | type: MultiCurrencyPrice | description: Shipping discount before tax. - name: price | type: MultiCurrencyPrice | description: Shipping price before discount and before tax. - name: requestedShippingOption | type: boolean | description: Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) - name: carrierId | type: string | description: This carrier's unique GUID - name: deliveryAllocations | type: array | description: Delivery solution allocations to different delivery carriers and delivery regions - name: deliveryCarrier | type: Carrier | description: The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers - name: appId | type: string | description: The carrier app id - name: code | type: string | description: Unique code that acts as an GUID for a shipping rate. For example, `"usps_std_overnight"`. - name: deliveryRegion | type: Region | description: The delivery region that are relevant for this delivery solution. - name: id | type: string | description: The delivery region id. - name: name | type: string | description: The delivery region name. - name: applicableLineItems | type: ApplicableLineItems | description: Populated if the delivery solution is a partially supplied by this carrier. - name: lineItemIds | type: array | description: Line items that the delivery solution is for. - name: partial | type: boolean | description: If the delivery solution is a partial and doesn't apply to all items. - name: carrierServiceOptions | type: array | description: All shipping options. - name: carrierId | type: string | description: Carrier GUID. - name: shippingOptions | type: array | description: Shipping options offered by this carrier for this request. - name: code | type: string | description: Unique code of provided shipping option like "usps_std_overnight". For legacy calculators this would be the UUGUID of the option. - name: title | type: string | description: Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). For example, "Standard" or "First-Class Package International". - name: logistics | type: DeliveryLogistics | description: Delivery logistics. - name: cost | type: ShippingPrice | description: Sipping price information. - name: price | type: MultiCurrencyPrice | description: Shipping price. - name: otherCharges | type: array | description: Other costs such as insurance, handling & packaging for fragile items, etc. - name: type | type: ChargeType | description: Type of additional cost. - enum: HANDLING_FEE, INSURANCE - name: price | type: MultiCurrencyPrice | description: Price of added cost. - name: details | type: string | description: Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`. - name: deliveryAllocations | type: array | description: Delivery solution allocations to different delivery carriers and delivery regions - name: partial | type: boolean | description: If the delivery solution is a partial and doesn't apply to all items. - name: appliedDiscounts | type: array | description: Applied 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: amount | type: MultiCurrencyPrice | description: Coupon value. - name: name | type: string | description: Coupon name. - name: merchantDiscount | type: MerchantDiscount | description: Merchant discount. - name: amount | type: MultiCurrencyPrice | description: Discount value. - name: percentage | type: number | description: Discount Percentage. Will be calculated from items price before other discounts. - name: discountRule | type: DiscountRule | description: Discount rule - name: id | type: string | description: Discount rule GUID - name: name | type: DiscountRuleName | description: Discount rule name - name: original | type: string | description: Original discount rule name (in site's default language). - name: translated | type: string | description: Translated discount rule name according to buyer language. Defaults to `original` when not provided. - name: amount | type: MultiCurrencyPrice | description: Discount value. - name: discountType | type: DiscountType | description: Discount type. - enum: GLOBAL, SPECIFIC_ITEMS, SHIPPING - name: lineItemIds | type: array | description: IDs of line items the discount applies to. - name: calculationErrors | type: CalculationErrors | description: Calculation errors. - ONE-OF: - name: generalShippingCalculationError | type: Details | description: General shipping calculation error. - ONE-OF: - name: applicationError | type: ApplicationError | description: - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: validationError | type: ValidationError | description: - name: fieldViolations | type: array | description: - name: field | type: string | description: - name: description | type: string | description: - name: violatedRule | type: RuleType | description: - enum: VALIDATION, OTHER, MAX, MIN, MAX_LENGTH, MIN_LENGTH, MAX_SIZE, MIN_SIZE, FORMAT, DECIMAL_LTE, DECIMAL_GTE, DECIMAL_LT, DECIMAL_GT, DECIMAL_MAX_SCALE, INVALID_ENUM_VALUE, REQUIRED_FIELD, FIELD_NOT_ALLOWED, ONE_OF_ALIGNMENT, EXACT_LENGTH, EXACT_SIZE, REQUIRED_ONE_OF_FIELD - name: ruleName | type: string | description: applicable when violated_rule=OTHER - name: data | type: object | description: - name: systemError | type: SystemError | description: - name: errorCode | type: string | description: Error code. - name: carrierErrors | type: CarrierErrors | description: Errors related to the delivery carrier. - name: errors | type: array | description: Carrier errors. - name: carrierId | type: string | description: Carrier GUID. - name: error | type: Details | description: Error details. - name: selectedShippingOptionError | type: Details | description: Error related to the selected shipping option. - name: taxCalculationError | type: Details | description: Tax calculation error. - name: couponCalculationError | type: Details | description: Coupon calculation error. - name: orderValidationErrors | type: array | description: Order validation errors. - name: membershipError | type: Details | description: Membership payment methods calculation errors For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid - name: discountsCalculationError | type: Details | description: Discount Rule calculation error. - name: weightUnit | type: WeightUnit | description: Weight measurement unit. Defaults to site's weight unit. - name: currency | type: string | description: Currency used for pricing in this store. - name: payNow | type: PriceSummary | description: Minimal amount to pay in order to place the order. - name: payLater | type: PriceSummary | description: Remaining amount for the order to be fully paid. - name: membershipOptions | type: MembershipOptions | description: Information about valid and invalid memberships, and which ones are selected for usage. - name: eligibleMemberships | type: array | description: List of payment options that can be used. - name: id | type: string | description: Membership GUID. - name: appId | type: string | description: GUID of the application providing this payment option. - name: name | type: MembershipName | description: The name of this membership. - name: original | type: string | description: Membership name. - name: translated | type: string | description: Translated membership name. Defaults to `original` when not provided. - name: lineItemIds | type: array | description: Line item GUIDs which are "paid" for by this membership. - name: credits | type: MembershipPaymentCredits | description: Optional - For a membership that has limited credits, information about credit usage. - name: total | type: integer | description: Membership's initial value. - name: remaining | type: integer | description: Membership's remaining value. - name: expirationDate | type: string | description: Optional - TMembership expiry date. - name: additionalData | type: object | description: Additional data about this membership. - name: invalidMemberships | type: array | description: List of payment options that are owned by the member, but cannot be used due to reason provided. - name: membership | type: Membership | description: Membership details. - name: reason | type: string | description: Reason why this membership is invalid and cannot be used. - name: selectedMemberships | type: array | description: The selected membership payment options and which line items they apply to. - name: id | type: string | description: Membership GUID. - name: appId | type: string | description: GUID of the app providing this payment option. - name: lineItemIds | type: array | description: IDs of the line items this membership applies to. - name: additionalFees | type: array | description: Additional fees. - name: code | type: string | description: Additional fee's unique code (or GUID) for future processing. - name: name | type: string | description: Additional fee's name. - name: price | type: MultiCurrencyPrice | description: Additional fee's price. - name: taxDetails | type: ItemTaxFullDetails | description: Tax details. - name: providerAppId | type: string | description: Provider's app id. - name: priceBeforeTax | type: MultiCurrencyPrice | description: Additional fee's price before tax. - name: priceAfterTax | type: MultiCurrencyPrice | description: Additional fee's price after tax. - name: lineItemIds | type: array | description: Optional - Line items associated with this additional fee. If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. - name: source | type: AdditionalFeeSource | description: the source the additional fee was added from - enum: - UNKNOWN_ADDITIONAL_FEE_SOURCE: - SERVICE_PLUGIN: The additional fee was added by an additional fee service plugin - ITEM: The additional fee was added on the item either via the catalog or on custom line item - MANUAL: The additional fee was added manually on the request - SHIPPING: The additional fee was added by the shipping provider - PLATFORM: The additional fee was added by a Wix vertical and represents a Wix platform fee - name: translatedName | type: string | description: The translated name of the additional fee. The translation language is determined by the `languages` field 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: violations | type: array | description: List of validation violations raised by the [Validations service plugin](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction.md). - name: severity | type: Severity | description: Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. - enum: - WARNING: The user is allowed to move forward in the flow. - ERROR: The user is blocked from moving forward in the flow. For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked. - name: target | type: Target | description: Target location on a checkout or cart page where the violation will be displayed. - ONE-OF: - name: other | type: Other | description: General (other) violation. - name: name | type: NameInOther | description: Location on a checkout or a cart page where a general (other) violation will be displayed. - enum: - OTHER_DEFAULT: Default location, in case no specific location is specified. - name: lineItem | type: LineItem | description: Specific line item violation. - name: name | type: NameInLineItem | description: Location on a checkout or a cart page where the specific line item violation will be displayed. - enum: - LINE_ITEM_DEFAULT: Default location, in case no specific location is specified. - name: id | type: string | description: GUID of the line item containing the violation. - name: description | type: string | description: Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `Click me`. ``` ### Examples ### Estimate price totals of the current site visitor's cart This example estimates price totals with a specific billing address. ```curl curl -X POST \ 'https://www.wixapis.com/ecom/v1/carts/current/estimate-totals' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "billingAddress": { "city": "Provence-Alpes-Côte d'Azur", "subdivision": "FR-PAC", "postalCode": "13127", "streetAddress": {}, "country": "FR", "addressLine": "43 Rue Bonnet", "addressLine2": "23rd floor" } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.purchaseFlow.CurrentCartService.estimateCurrentCartTotals(options) Description: Estimates the current cart's price totals (including tax), based on a selected carrier service, shipping address, and billing information. Use this method for preview purposes, such as displaying estimated totals before checkout. This provides a partial estimation, not a full cart calculation. >**Notes:** >+ Use boolean flags to control which components to include in the estimation: delivery costs, additional fees, taxes, and gift cards. Components that aren't explicitly enabled are excluded. >+ Line item discounts are already calculated and applied to the cart. >+ Not passing any properties only estimates the cart items price totals, without considering shipping and billing information. >+ Calling this method before adding an item to the cart returns a 404 error, as the cart doesn't exist yet. >+ This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions.md). Method parameters: param name: options | type: EstimateCurrentCartTotalsOptions none - name: selectedShippingOption | type: SelectedShippingOption | description: Selected shipping option Pass this field only when there is no existing shipping option in the cart. - name: carrierId | type: string | description: Carrier GUID. - name: code | type: string | description: Selected shipping option code. For example, "usps_std_overnight". - name: shippingAddress | type: Address | description: Shipping address. Used for calculating tax and shipping (when applicable). - 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: billingAddress | type: Address | description: Billing address. Used for calculating tax if all the items in the cart are not shippable. - name: selectedMemberships | type: SelectedMemberships | description: The selected membership payment options and which line items they apply to. - name: memberships | type: array | description: Selected memberships. - name: _id | type: string | description: Membership GUID. - name: appId | type: string | description: GUID of the app providing this payment option. - name: lineItemIds | type: array | description: IDs of the line items this membership applies to. - name: calculateTax | type: boolean | description: Whether to calculate tax in the calculation request. Default: `true` - name: calculateShipping | type: boolean | description: Whether to calculate shipping in the calculation request. Default: `true` - name: calculateAdditionalFees | type: boolean | description: Whether to calculate additional fees in the calculation request. Default: `true` Return type: PROMISE - name: cart | type: Cart | description: Cart. - 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 - 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` - 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: calculatedLineItems | type: array | description: Calculated line items. - name: lineItemId | type: string | description: Line item GUID. - name: pricesBreakdown | type: LineItemPricesData | description: Price breakdown for this line item. - name: totalPriceAfterTax | type: MultiCurrencyPrice | description: Total price after discounts, tax, and modifiers. - name: totalPriceBeforeTax | type: MultiCurrencyPrice | description: Total price after discounts and modifiers, and before tax. - name: taxDetails | type: ItemTaxFullDetails | description: Tax details. - name: taxableAmount | type: MultiCurrencyPrice | description: Amount for which tax is calculated. - name: taxRate | type: string | description: Tax rate %, as a decimal point between 0 and 1. - name: totalTax | type: MultiCurrencyPrice | description: Calculated tax, based on `taxable_amount` and `tax_rate`. - name: taxBreakdown | type: array | description: tax information for a line item. - name: jurisdiction | type: string | description: The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". - name: nonTaxableAmount | type: MultiCurrencyPrice | description: The amount of this line item price that was considered nontaxable. (Decimal value) - name: rate | type: string | description: The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) - name: taxAmount | type: MultiCurrencyPrice | description: The amount of tax estimated for this line item. (Decimal value) - name: taxableAmount | type: MultiCurrencyPrice | description: The taxable amount of this line item. - name: taxType | type: string | description: The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. - name: taxName | type: string | description: The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. This name should be explicit enough to allow the merchant to understand what tax was calculated. - name: jurisdictionType | type: JurisdictionType | description: The type of the jurisdiction in which this tax detail applies. - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL - name: totalDiscount | type: MultiCurrencyPrice | description: Total discount applied for the line item. - name: price | type: MultiCurrencyPrice | description: Catalog price after catalog-defined discount, automatic discounts, and modifiers. - name: priceBeforeDiscounts | type: MultiCurrencyPrice | description: Item price before automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers. Defaults to `price` when not provided. - name: lineItemPrice | type: MultiCurrencyPrice | description: Total line item price after catalog-defined discounts, automatic discounts, and modifiers. - name: fullPrice | type: MultiCurrencyPrice | description: Item price before all discounts and modifiers. Defaults to `price` when not provided. - name: depositAmount | type: MultiCurrencyPrice | description: Partial payment out of `price` to be paid upfront during the checkout. Applies to catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only. - name: paymentOption | type: PaymentOptionType | description: Type of selected payment option for current item. Supported values: + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item will happen as part of the checkout + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item will happen after the checkout + `"MEMBERSHIP"` - This item cannot be paid via monetary payment options, only via non monetary option such membership. When this option is used, price must be set to 0 + `"DEPOSIT_ONLINE"` - Partial payment of the given item will happen as part of the checkout. Amount to be paid is defined by deposit_amount field. - name: taxableAddress | type: TaxableAddress | description: tax calculation address. - name: priceSummary | type: PriceSummary | description: Price summary. - name: subtotal | type: MultiCurrencyPrice | description: Subtotal of all line items, before discounts and before tax. - name: shipping | type: MultiCurrencyPrice | description: Total shipping price, before discounts and before tax. - name: tax | type: MultiCurrencyPrice | description: Total tax. - name: discount | type: MultiCurrencyPrice | description: Total calculated discount value. - name: total | type: MultiCurrencyPrice | description: Total price after discounts, gift cards, and tax. - name: additionalFees | type: MultiCurrencyPrice | description: Total additional fees price before tax. - name: giftCard | type: GiftCard | description: Applied gift card. - name: obfuscatedCode | type: string | description: Gift card obfuscated code. - name: amount | type: MultiCurrencyPrice | description: Actual amount to be redeemed from the gift card. - name: appId | type: string | description: App GUID of the gift card provider. - name: externalId | type: string | description: External GUID in the gift card provider's system. Used for integration and tracking across different platforms. - name: requestedAmount | type: MultiCurrencyPrice | description: Requested amount to redeem from the gift card. - name: taxSummary | type: TaxSummary | description: Tax summary. - name: taxableAmount | type: MultiCurrencyPrice | description: Amount for which tax is calculated, added from line items. - name: totalTax | type: MultiCurrencyPrice | description: Calculated tax, added from line items. - name: shippingInfo | type: ShippingInformation | description: Shipping information. - name: region | type: ShippingRegion | description: Shipping region. - name: _id | type: string | description: Shipping region GUID. - name: name | type: string | description: Shipping region name. - name: selectedCarrierServiceOption | type: SelectedCarrierServiceOption | description: Selected shipping option. - name: code | type: string | description: Unique identifier of selected option. For example, "usps_std_overnight". - name: title | type: string | description: Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). For example, "Standard" or "First-Class Package International". - name: logistics | type: DeliveryLogistics | description: Delivery logistics. - name: deliveryTime | type: string | description: Expected delivery time, in free text. For example, "3-5 business days". - name: instructions | type: string | description: Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". - name: pickupDetails | type: PickupDetails | description: Pickup details. - name: address | type: Address | description: Pickup address. - name: pickupMethod | type: PickupMethod | description: Pickup method - enum: STORE_PICKUP, PICKUP_POINT - name: cost | type: SelectedCarrierServiceOptionPrices | description: Shipping costs. - name: totalPriceAfterTax | type: MultiCurrencyPrice | description: Total shipping price, after discount and after tax. - name: totalPriceBeforeTax | type: MultiCurrencyPrice | description: Total price of shipping after discounts (when relevant), and before tax. - name: taxDetails | type: ItemTaxFullDetails | description: Tax details. - name: totalDiscount | type: MultiCurrencyPrice | description: Shipping discount before tax. - name: price | type: MultiCurrencyPrice | description: Shipping price before discount and before tax. - name: requestedShippingOption | type: boolean | description: Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) - name: carrierId | type: string | description: This carrier's unique GUID - name: deliveryAllocations | type: array | description: Delivery solution allocations to different delivery carriers and delivery regions - name: deliveryCarrier | type: Carrier | description: The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers - name: appId | type: string | description: The carrier app id - name: code | type: string | description: Unique code that acts as an GUID for a shipping rate. For example, `"usps_std_overnight"`. - name: deliveryRegion | type: Region | description: The delivery region that are relevant for this delivery solution. - name: _id | type: string | description: The delivery region id. - name: name | type: string | description: The delivery region name. - name: applicableLineItems | type: ApplicableLineItems | description: Populated if the delivery solution is a partially supplied by this carrier. - name: lineItemIds | type: array | description: Line items that the delivery solution is for. - name: partial | type: boolean | description: If the delivery solution is a partial and doesn't apply to all items. - name: carrierServiceOptions | type: array | description: All shipping options. - name: carrierId | type: string | description: Carrier GUID. - name: shippingOptions | type: array | description: Shipping options offered by this carrier for this request. - name: code | type: string | description: Unique code of provided shipping option like "usps_std_overnight". For legacy calculators this would be the UUGUID of the option. - name: title | type: string | description: Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). For example, "Standard" or "First-Class Package International". - name: logistics | type: DeliveryLogistics | description: Delivery logistics. - name: cost | type: ShippingPrice | description: Sipping price information. - name: price | type: MultiCurrencyPrice | description: Shipping price. - name: otherCharges | type: array | description: Other costs such as insurance, handling & packaging for fragile items, etc. - name: type | type: ChargeType | description: Type of additional cost. - enum: HANDLING_FEE, INSURANCE - name: price | type: MultiCurrencyPrice | description: Price of added cost. - name: details | type: string | description: Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`. - name: deliveryAllocations | type: array | description: Delivery solution allocations to different delivery carriers and delivery regions - name: partial | type: boolean | description: If the delivery solution is a partial and doesn't apply to all items. - name: appliedDiscounts | type: array | description: Applied 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: amount | type: MultiCurrencyPrice | description: Coupon value. - name: name | type: string | description: Coupon name. - name: merchantDiscount | type: MerchantDiscount | description: Merchant discount. - name: amount | type: MultiCurrencyPrice | description: Discount value. - name: percentage | type: number | description: Discount Percentage. Will be calculated from items price before other discounts. - name: discountRule | type: DiscountRule | description: Discount rule - name: _id | type: string | description: Discount rule GUID - name: name | type: DiscountRuleName | description: Discount rule name - name: original | type: string | description: Original discount rule name (in site's default language). - name: translated | type: string | description: Translated discount rule name according to buyer language. Defaults to `original` when not provided. - name: amount | type: MultiCurrencyPrice | description: Discount value. - name: discountType | type: DiscountType | description: Discount type. - enum: GLOBAL, SPECIFIC_ITEMS, SHIPPING - name: lineItemIds | type: array | description: IDs of line items the discount applies to. - name: calculationErrors | type: CalculationErrors | description: Calculation errors. - ONE-OF: - name: generalShippingCalculationError | type: Details | description: General shipping calculation error. - ONE-OF: - name: applicationError | type: ApplicationError | description: - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: validationError | type: ValidationError | description: - name: fieldViolations | type: array | description: - name: field | type: string | description: - name: description | type: string | description: - name: violatedRule | type: RuleType | description: - enum: VALIDATION, OTHER, MAX, MIN, MAX_LENGTH, MIN_LENGTH, MAX_SIZE, MIN_SIZE, FORMAT, DECIMAL_LTE, DECIMAL_GTE, DECIMAL_LT, DECIMAL_GT, DECIMAL_MAX_SCALE, INVALID_ENUM_VALUE, REQUIRED_FIELD, FIELD_NOT_ALLOWED, ONE_OF_ALIGNMENT, EXACT_LENGTH, EXACT_SIZE, REQUIRED_ONE_OF_FIELD - name: ruleName | type: string | description: applicable when violated_rule=OTHER - name: data | type: object | description: - name: systemError | type: SystemError | description: - name: errorCode | type: string | description: Error code. - name: carrierErrors | type: CarrierErrors | description: Errors related to the delivery carrier. - name: errors | type: array | description: Carrier errors. - name: carrierId | type: string | description: Carrier GUID. - name: error | type: Details | description: Error details. - name: selectedShippingOptionError | type: Details | description: Error related to the selected shipping option. - name: taxCalculationError | type: Details | description: Tax calculation error. - name: couponCalculationError | type: Details | description: Coupon calculation error. - name: orderValidationErrors | type: array | description: Order validation errors. - name: membershipError | type: Details | description: Membership payment methods calculation errors For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid - name: discountsCalculationError | type: Details | description: Discount Rule calculation error. - name: weightUnit | type: WeightUnit | description: Weight measurement unit. Defaults to site's weight unit. - name: currency | type: string | description: Currency used for pricing in this store. - name: payNow | type: PriceSummary | description: Minimal amount to pay in order to place the order. - name: payLater | type: PriceSummary | description: Remaining amount for the order to be fully paid. - name: membershipOptions | type: MembershipOptions | description: Information about valid and invalid memberships, and which ones are selected for usage. - name: eligibleMemberships | type: array | description: List of payment options that can be used. - name: _id | type: string | description: Membership GUID. - name: appId | type: string | description: GUID of the application providing this payment option. - name: name | type: MembershipName | description: The name of this membership. - name: original | type: string | description: Membership name. - name: translated | type: string | description: Translated membership name. Defaults to `original` when not provided. - name: lineItemIds | type: array | description: Line item GUIDs which are "paid" for by this membership. - name: credits | type: MembershipPaymentCredits | description: Optional - For a membership that has limited credits, information about credit usage. - name: total | type: integer | description: Membership's initial value. - name: remaining | type: integer | description: Membership's remaining value. - name: expirationDate | type: Date | description: Optional - TMembership expiry date. - name: additionalData | type: object | description: Additional data about this membership. - name: invalidMemberships | type: array | description: List of payment options that are owned by the member, but cannot be used due to reason provided. - name: membership | type: Membership | description: Membership details. - name: reason | type: string | description: Reason why this membership is invalid and cannot be used. - name: selectedMemberships | type: array | description: The selected membership payment options and which line items they apply to. - name: _id | type: string | description: Membership GUID. - name: appId | type: string | description: GUID of the app providing this payment option. - name: lineItemIds | type: array | description: IDs of the line items this membership applies to. - name: additionalFees | type: array | description: Additional fees. - name: code | type: string | description: Additional fee's unique code (or GUID) for future processing. - name: name | type: string | description: Additional fee's name. - name: price | type: MultiCurrencyPrice | description: Additional fee's price. - name: taxDetails | type: ItemTaxFullDetails | description: Tax details. - name: providerAppId | type: string | description: Provider's app id. - name: priceBeforeTax | type: MultiCurrencyPrice | description: Additional fee's price before tax. - name: priceAfterTax | type: MultiCurrencyPrice | description: Additional fee's price after tax. - name: lineItemIds | type: array | description: Optional - Line items associated with this additional fee. If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. - name: source | type: AdditionalFeeSource | description: the source the additional fee was added from - enum: - UNKNOWN_ADDITIONAL_FEE_SOURCE: - SERVICE_PLUGIN: The additional fee was added by an additional fee service plugin - ITEM: The additional fee was added on the item either via the catalog or on custom line item - MANUAL: The additional fee was added manually on the request - SHIPPING: The additional fee was added by the shipping provider - PLATFORM: The additional fee was added by a Wix vertical and represents a Wix platform fee - name: translatedName | type: string | description: The translated name of the additional fee. The translation language is determined by the `languages` field 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: violations | type: array | description: List of validation violations raised by the [Validations service plugin](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction.md). - name: severity | type: Severity | description: Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. - enum: - WARNING: The user is allowed to move forward in the flow. - ERROR: The user is blocked from moving forward in the flow. For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked. - name: target | type: Target | description: Target location on a checkout or cart page where the violation will be displayed. - ONE-OF: - name: other | type: Other | description: General (other) violation. - name: name | type: NameInOther | description: Location on a checkout or a cart page where a general (other) violation will be displayed. - enum: - OTHER_DEFAULT: Default location, in case no specific location is specified. - name: lineItem | type: LineItem | description: Specific line item violation. - name: name | type: NameInLineItem | description: Location on a checkout or a cart page where the specific line item violation will be displayed. - enum: - LINE_ITEM_DEFAULT: Default location, in case no specific location is specified. - name: _id | type: string | description: GUID of the line item containing the violation. - name: description | type: string | description: Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `Click me`. ``` ### Examples ### Estimate the current cart's totals ```javascript /***************************************** * Backend code - my-backend-file.web.js/ts * ****************************************/ import { Permissions, webMethod } from '@wix/web-methods'; import { currentCart } from '@wix/ecom'; export const myEstimateCurrentCartTotalsFunction = webMethod(Permissions.Anyone, async (estimateOptions) => { try { const estimatedCartTotals = await currentCart.estimateCurrentCartTotals(estimateOptions); console.log('Success! Cart totals estimated:', estimatedCartTotals); return estimatedCartTotals; } catch (error) { console.error(error); // Handle the error } }); /************* * Page code * ************/ import { myEstimateCurrentCartTotalsFunction } from 'backend/my-backend-file.web'; // Sample options object: const estimateOptions = { "selectedShippingOption": { "code": "standard_us_shipping" }, "shippingAddress": { "addressLine1": "235 West 23rd Street", "addressLine2": "3rd floor", "city": "New York", "country": "US", "postalCode": "10011", "streetAddress": { "name": "West 23rd Street", "number": "235" }, "subdivision": "US-NY" }, "billingAddress": { "addressLine1": "235 West 23rd Street", "addressLine2": "3rd floor", "city": "New York", "country": "US", "postalCode": "10011", "streetAddress": { "name": "West 23rd Street", "number": "235" }, "subdivision": "US-NY" } }; myEstimateCurrentCartTotalsFunction(estimateOptions) .then((estimatedCartTotals) => { const formattedShippingPrice = estimatedCartTotals.priceSummary.shipping.formattedAmount; const estimatedCartTotal = estimatedCartTotals.priceSummary.total.formattedAmount; console.log('Success! Cart totals estimated:', estimatedCartTotals); return estimatedCartTotals; }) .catch((error) => { console.error(error); // Handle the error }); /* Promise resolves to: * * { * "cart": { * "_id": "96a61a4b-6b61-47d1-a039-0213a8230ccd", * "lineItems": [ * { * "_id": "00000000-0000-0000-0000-000000000001", * "quantity": 5, * "catalogReference": { * "catalogItemId": "c8539b66-7a44-fe18-affc-afec4be8562a", * "appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" * }, * "productName": { * "original": "Shirt", * "translated": "Shirt" * }, * "url": "https://example.wixsite.com", * "price": { * "amount": "10", * "convertedAmount": "10", * "formattedAmount": "€10.00", * "formattedConvertedAmount": "€10.00" * }, * "fullPrice": { * "amount": "10", * "convertedAmount": "10", * "formattedAmount": "€10.00", * "formattedConvertedAmount": "€10.00" * }, * "priceBeforeDiscounts": { * "amount": "10", * "convertedAmount": "10", * "formattedAmount": "€10.00", * "formattedConvertedAmount": "€10.00" * }, * "descriptionLines": [], * "image": "wix:image://v1/3c76e2_c5331f937348492a97df87b0a3b34ea4~mv2.jpg#originWidth=1000&originHeight=1000", * "availability": { * "status": "AVAILABLE" * }, * "physicalProperties": { * "sku": "364115376135191", * "shippable": true * }, * "itemType": { * "preset": "PHYSICAL" * }, * "paymentOption": "FULL_PAYMENT_ONLINE" * } * ], * "buyerInfo": { * "contactId": "f7dc17a6-825a-466e-a78e-c4abea0217db", * "memberId": "c43190d2-eea3-493e-b6e8-f146850c6873" * }, * "currency": "EUR", * "conversionCurrency": "EUR", * "buyerLanguage": "en", * "siteLanguage": "en", * "taxIncludedInPrices": false, * "weightUnit": "KG", * "subtotal": { * "amount": "50", * "convertedAmount": "50", * "formattedAmount": "€50.00", * "formattedConvertedAmount": "€50.00" * }, * "appliedDiscounts": [], * "_createdDate": "2022-05-16T12:04:01.244Z", * "_updatedDate": "2022-05-23T11:55:30.023Z" * }, * "calculatedLineItems": [ * { * "lineItemId": "00000000-0000-0000-0000-000000000001", * "pricesBreakdown": { * "totalPriceAfterTax": { * "amount": "50.00", * "convertedAmount": "50.00", * "formattedAmount": "€50.00", * "formattedConvertedAmount": "€50.00" * }, * "totalPriceBeforeTax": { * "amount": "50.00", * "convertedAmount": "50.00", * "formattedAmount": "€50.00", * "formattedConvertedAmount": "€50.00" * }, * "taxDetails": { * "taxableAmount": { * "amount": "50.00", * "convertedAmount": "50.00", * "formattedAmount": "€50.00", * "formattedConvertedAmount": "€50.00" * }, * "taxRate": "0.0", * "totalTax": { * "amount": "0.0", * "convertedAmount": "0.0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "rateBreakdown": [] * }, * "totalDiscount": { * "amount": "0", * "convertedAmount": "0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "price": { * "amount": "10.00", * "convertedAmount": "10.00", * "formattedAmount": "€10.00", * "formattedConvertedAmount": "€10.00" * }, * "priceBeforeDiscounts": { * "amount": "10.00", * "convertedAmount": "", * "formattedAmount": "", * "formattedConvertedAmount": "" * } * }, * "paymentOption": "FULL_PAYMENT_ONLINE" * } * ], * "priceSummary": { * "subtotal": { * "amount": "50.00", * "convertedAmount": "50.00", * "formattedAmount": "€50.00", * "formattedConvertedAmount": "€50.00" * }, * "shipping": { * "amount": "10.0", * "convertedAmount": "10.0", * "formattedAmount": "€10.00", * "formattedConvertedAmount": "€10.00" * }, * "tax": { * "amount": "0.0", * "convertedAmount": "0.0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "discount": { * "amount": "0", * "convertedAmount": "0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "total": { * "amount": "60.00", * "convertedAmount": "60.00", * "formattedAmount": "€60.00", * "formattedConvertedAmount": "€60.00" * } * }, * "shippingInfo": { * "region": { * "_id": "009fbe5d-89d3-7825-cbbf-1aab4d908b73", * "name": "USA shipping" * }, * "selectedCarrierServiceOption": { * "code": "ed5bbce2-9533-dff4-7db0-13702fd139c5", * "title": "Standard US Shipping", * "logistics": { * "deliveryTime": "" * }, * "cost": { * "totalPriceAfterTax": { * "amount": "10.0", * "convertedAmount": "10.0", * "formattedAmount": "€10.00", * "formattedConvertedAmount": "€10.00" * }, * "totalPriceBeforeTax": { * "amount": "10", * "convertedAmount": "10", * "formattedAmount": "€10.00", * "formattedConvertedAmount": "€10.00" * }, * "taxDetails": { * "taxRate": "0.0", * "totalTax": { * "amount": "0.0", * "convertedAmount": "0.0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "rateBreakdown": [] * }, * "price": { * "amount": "10", * "convertedAmount": "10", * "formattedAmount": "€10.00", * "formattedConvertedAmount": "€10.00" * } * }, * "requestedShippingOption": false, * "otherCharges": [], * "carrierId": "c8a08776-c095-4dec-8553-8f9698d86adc" * }, * "carrierServiceOptions": [ * { * "carrierId": "c8a08776-c095-4dec-8553-8f9698d86adc", * "shippingOptions": [ * { * "code": "ed5bbce2-9533-dff4-7db0-13702fd139c5", * "title": "Standard US Shipping", * "logistics": { * "deliveryTime": "" * }, * "cost": { * "price": { * "amount": "10", * "convertedAmount": "10", * "formattedAmount": "€10.00", * "formattedConvertedAmount": "€10.00" * }, * "otherCharges": [] * } * } * ] * } * ] * }, * "appliedDiscounts": [], * "calculationErrors": { * "orderValidationErrors": [] * }, * "weightUnit": "KG", * "currency": "EUR", * "payNow": { * "subtotal": { * "amount": "50.00", * "convertedAmount": "50.00", * "formattedAmount": "€50.00", * "formattedConvertedAmount": "€50.00" * }, * "shipping": { * "amount": "10.0", * "convertedAmount": "10.0", * "formattedAmount": "€10.00", * "formattedConvertedAmount": "€10.00" * }, * "tax": { * "amount": "0.0", * "convertedAmount": "0.0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "discount": { * "amount": "0", * "convertedAmount": "0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "total": { * "amount": "60.00", * "convertedAmount": "60.00", * "formattedAmount": "€60.00", * "formattedConvertedAmount": "€60.00" * } * }, * "payLater": { * "subtotal": { * "amount": "0", * "convertedAmount": "0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "shipping": { * "amount": "0", * "convertedAmount": "0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "tax": { * "amount": "0", * "convertedAmount": "0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "discount": { * "amount": "0", * "convertedAmount": "0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * }, * "total": { * "amount": "0", * "convertedAmount": "0", * "formattedAmount": "€0.00", * "formattedConvertedAmount": "€0.00" * } * }, * "membershipOptions": { * "eligibleMemberships": [], * "invalidMemberships": [], * "selectedMemberships": [] * } * } * */ ``` ### estimateCurrentCartTotals (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { currentCart } from '@wix/ecom'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { currentCart }, // Include the auth strategy and host as relevant }); async function estimateCurrentCartTotals(options) { const response = await myWixClient.currentCart.estimateCurrentCartTotals(options); }; ``` ---