Stores Cart to eCommerce Checkout Conversion Table

Some fields in the the Stores Cart API cart object are now held in the eCommerce Checkout API checkout object. To learn more, refer to the table below for changes in name and/or location.

The address object used in the eCommerce APIs is slightly different to the one used in the Stores APIs. For more details, refer to the address object conversion table.

Fields that remain with the same name, in the same location, and with no changes in behavior are marked with an asterisk (*).

Stores Cart ObjecteCommerce Checkout Object
id-
status-
weightUnit *weightUnit
buyerNote *buyerNote
currency.codecurrency
currency.symbolNo longer returned. Instead, for every price returned, we also provide the formatted price in checkout.priceSummary and/or order.priceSummary.
billingAddress.addressbillingInfo.address - See address object conversion table for more details.
billingAddress.contactDetails.firstNamebillingInfo.contactDetails.firstName
billingAddress.contactDetails.lastNamebillingInfo.contactDetails.lastName
billingAddress.contactDetails.phonebillingInfo.contactDetails.phone
billingAddress.contactDetails.companybillingInfo.contactDetails.company
billingAddress.contactDetails.vatIdbillingInfo.contactDetails.vatId
billingAddress.contactDetails.emailbillingInfo.buyerInfo.email
appliedCoupon.couponIdappliedDiscounts[i].coupon._id - The coupon is now an item in the appliedDiscounts array. To get it, search the appliedDiscounts array for the coupon field.
appliedCoupon.codeappliedDiscounts[i].coupon.code - The coupon is now an item in the appliedDiscounts array. To get it, search the appliedDiscounts array for the coupon field.
appliedCoupon.nameappliedDiscounts[i].coupon.name - The coupon is now an item in the appliedDiscounts array. To get it, search the appliedDiscounts array for the coupon field.
appliedCoupon.discountValueappliedDiscounts[i].coupon.amount.amount - The coupon is now an item in the appliedDiscounts array. To get it, search the appliedDiscounts array for the coupon field.
appliedCoupon.couponTypeNo longer returned.
totals.subtotalpriceSummary.subtotal.amount
totals.shippingpriceSummary.shipping.amount
totals.taxpriceSummary.tax.amount
totals.discountpriceSummary.discount.amount
totals.totalpriceSummary.total.amount
totals.weightlineItems[i].physicalProperties.weight X lineItems[i].quantity
totals.quantitylineItems[0].quantity + lineItems[1].quantity + lineItems[2].quantity
convertedTotals.subtotalpriceSummary.subtotal.convertedAmount
convertedTotals.shippingpriceSummary.shipping.convertedAmount
convertedTotals.taxpriceSummary.tax.convertedAmount
convertedTotals.discountpriceSummary.discount.convertedAmount
convertedTotals.totalpriceSummary.total.convertedAmount
convertedTotals.weightNo weight conversion in checkout. Same value as Stores cart.totals.weight.
convertedTotals.quantitySame value as Stores cart.totals.quantity.
shippingInfo.shippingRuleDetails.ruleIdֿֿֿֿֿֿֿֿshippingInfo.region._id
shippingInfo.shippingRuleDetails.optionIdֿֿֿֿֿֿֿֿshippingInfo.selectedCarrierServiceOption.title
shippingInfo.shippingRuleDetails.deliveryOptionֿֿֿֿֿֿֿֿshippingInfo.selectedCarrierServiceOption.title
shippingInfo.shippingRuleDetails.estimatedDeliveryTimeֿֿֿֿֿֿֿֿshippingInfo.logistics.deliveryTime
shippingInfo.pickupDetails.pickupAddressshippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address - See address object conversion table for more details.
shippingInfo.pickupDetails.buyerDetails.firstNameshippingInfo.shippingDestination.contactDetails.firstName
shippingInfo.pickupDetails.buyerDetails.lastNameshippingInfo.shippingDestination.contactDetails.lastName
shippingInfo.pickupDetails.buyerDetails.emailbuyerInfo.email
shippingInfo.pickupDetails.buyerDetails.phoneshippingInfo.shippingDestination.contactDetails.phone
shippingInfo.pickupDetails.pickupInstructionsshippingInfo.logistics.instructions
shippingInfo.shippingAddress.addressshippingInfo.shippingDestination.address - See address object conversion table for more details.
shippingInfo.shippingAddress.contactDetailsshippingInfo.shippingDestination.contactDetails
buyerInfo.id and buyerInfo.identityType: CONTACTbuyerInfo.contactId only.
buyerInfo.id and buyerInfo.identityType: VISITORbuyerInfo.visitorId only.
buyerInfo.id and buyerInfo.identityType: MEMBERbuyerInfo.memberId only.
buyerInfo.email *buyerInfo.email
buyerInfo.phonebillingInfo.contactDetails.phone
buyerInfo.firstNamebillingInfo.contactDetails.firstName
buyerInfo.lastNamebillingInfo.contactDetails.lastName
lineItems[i].idlineItems[i]._id - Note: this _id is of type GUID. In the Stores Cart API, the id is of type Int32.
lineItems[i].productIdlineItems[i].catalogReference.catalogItemId
lineItems[i].namelineItems[i].productName.original
lineItems[i].quantity*lineItems[i].quantity
lineItems[i].weightlineItems[i].physicalProperties.weight
lineItems[i].skulineItems[i].physicalProperties.sku
lineItems[i].lineItemType: "PHYSICAL"lineItems[i].itemType.preset: "PHYSICAL"
lineItems[i].lineItemType: "DIGITAL"lineItems[i].itemType.preset: "DIGITAL"
lineItems[i].lineItemType: "CUSTOM_AMOUNT_ITEMlineItems[i].itemType.custom and lineItems[i].catalogReference is empty.
lineItems[i].noteslineItems[i].descriptionLines[i].plainText.original
lineItems[i].customTextFieldslineItems[i].descriptionLines
lineItems[i].mediaItem.mediaTypeAll line item media in the eCommerce Cart, Checkout, and Order APIs are images.
lineItems[i].mediaItem.urllineItems[i].media.url
lineItems[i].mediaItem.widthlineItems[i].media.width
lineItems[i].mediaItem.heightlineItems[i].media.height
lineItems[i].optionslineItems[i].catalogReference.options
lineItems[i].priceData.pricelineItems[i].price.amount
lineItems[i].priceData.totalPricelineItems[i].price.amount X lineItems[i].quantity
lineItems[i].convertedPriceData.pricelineItems[i].price.convertedAmount
lineItems[i].convertedPriceData.totalPricelineItems[i].price.convertedAmount X lineItems[i].quantity
Did this help?

addToCheckout( )


Adds catalog line items and/or custom line items to a checkout.

The addToCheckout() function returns a Promise that resolves to the updated checkout when the specified items have been added.

Note: When adding catalog items, options.lineItems.catalogReference is required.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Manage eCommerce - Admin Permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

Checkout ID.


optionsAddToCheckoutOptions

Items to be added to checkout.

Returns
Return Type:Promise<AddToCheckoutResponse>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

createCheckout( )


Creates a checkout.

The createCheckout() function returns a Promise that resolves to the new checkout when it's created.

Notes:

  • Checkout must include at least 1 item in the options.lineItems array.
  • options.channelType is required.
  • If _id for options.lineItems is added, make sure that each _id is unique.
  • If options.checkoutInfo.customFields are added, then options.checkoutInfo.customFields.value is required.
Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Manage eCommerce - Admin Permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsCreateCheckoutOptions

Checkout creation options.

Returns
Return Type:Promise<Checkout>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

createOrder( )


Creates an order from a specified checkout.

The createOrder() function returns a Promise that resolves to the new order's ID and paymentGatewayOrderID when the order is created. Pass the paymentGatewayOrderId as the paymentId param to the startPayment() function to allow a customer to pay for their order.

Note: The following requirements must be met for an order to be created from a checkout.

  • A checkout cannot have calculation errors. Pass the checkout._id to Get Checkout and take a look at the calculationErrors field.
  • A checkout must have at least 1 line item.
  • All of the line Items have an availability.status of "AVAILABLE" or "PARTIALLY_AVAILABLE".
  • If there is a payment to be made, meaning that priceSummary.total is greater than 0, the billingInfo.address field must be provided.
  • When a checkout has line items to be shipped, the shippingInfo.shippingDestination.address and shippingInfo.selectedCarrierServiceOption fields must be provided.
  • When a checkout has line items for pickup, the shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails field must be provided.
Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

Checkout ID.


optionsCreateOrderOptions

Further order creation options.

Returns
Return Type:Promise<CreateOrderResponse>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

getCheckout( )


Retrieves a checkout.

The getCheckout() function returns a Promise that resolves when the specified checkout is retrieved.

Permissions
Manage eCommerce - all permissions
Read eCommerce - all read permissions
Manage Stores - all permissions
Read Stores - all read permissions
Manage Orders
Read Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

Checkout ID.


optionsGetCheckoutOptions
Returns
Return Type:Promise<Checkout>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

getCheckoutUrl( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves the checkout page URL of a specified checkout.

By default, a checkoutUrl generates for a checkout and directs to a standard Wix checkout page. However, if overrideCheckoutUrl has a value, it will replace and set the value of checkoutUrl.

Permissions
Manage eCommerce - all permissions
Read eCommerce - all read permissions
Manage Stores - all permissions
Read Stores - all read permissions
Manage Orders
Read Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

Checkout ID.


optionsGetCheckoutUrlOptions
Returns
Return Type:Promise<GetCheckoutURLResponse>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

markCheckoutAsCompleted( )


Marks a checkout as completed - checkout.complete boolean is set to true.

The markCheckoutAsCompleted() function returns a Promise that resolves when the specified checkout is marked as completed.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

Checkout ID.

Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

removeCoupon( )


Removes the coupon from a specified checkout.

The removeCoupon() function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.

Note: A checkout can only hold 1 coupon.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

ID of the checkout to remove the coupon from.

Returns
Return Type:Promise<RemoveCouponResponse>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

removeGiftCard( )


Removes the gift card from a specified checkout.

The removeGiftCard() function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.

Note: A checkout can only hold 1 gift card.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

ID of the checkout to remove the gift card from.

Returns
Return Type:Promise<RemoveGiftCardResponse>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

removeLineItems( )


Removes line items from the specified checkout.

The removeLineItems() function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

ID of the checkout to remove line items from.


lineItemIdsArray<string>Required

IDs of the line items to be removed. To find the IDs of the checkout line items you'd like to remove, pass the checkout._id to getCheckout() and look for the IDs under lineItems and/or customLineItems.

Returns
Return Type:Promise<RemoveLineItemsResponse>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

removeOverrideCheckoutUrl( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Removes the overrideCheckoutUrl from a specified checkout.

When overrideCheckoutUrl is removed, the checkoutUrl will be set to the default, standard Wix checkout page URL.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

ID of the checkout to remove the override checkout url from.

Returns
Return Type:Promise<RemoveOverrideCheckoutUrlResponse>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

updateCheckout( )


Updates a checkout.

The updateCheckout() function returns a Promise that resolves to the updated checkout when the specified properties are updated.

Notes:

  • If nothing is passed in the request, the call will fail.
  • The checkout.buyerInfo.email may not be removed once it is set.
Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Manage eCommerce - Admin Permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

Checkout ID.


checkoutUpdateCheckoutRequired

optionsUpdateCheckoutOptions

Checkout update options.

Returns
Return Type:Promise<Checkout>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

updateLineItemsQuantity( )


Updates the quantity of one or more line items in a checkout.

This endpoint is only for updating the quantity of line items. To entirely remove a line item from the checkout, use removeLineItems(). To add a new line item to the checkout, use addToCheckout().

This endpoint checks the amount of stock remaining for this line item. If the specified quantity is greater than the remaining stock, then the quantity returned in the response is the total amount of remaining stock.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

Checkout ID.


lineItemsArray<LineItemQuantityUpdate>Required

Line item info to update.

Returns
Return Type:Promise<UpdateLineItemsQuantityResponse>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?