> 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 # GetAbandonedCheckout # Package: checkout # Namespace: AbandonedCheckoutService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/abandoned-checkout/get-abandoned-checkout.md ## Permission Scopes: Read Orders: SCOPE.DC-STORES.READ-ORDERS ## Introduction Retrieves an abandoned checkout. --- ## REST API ### Schema ``` Method: getAbandonedCheckout Description: Retrieves an abandoned checkout. URL: https://www.wixapis.com/ecom/v1/abandoned-checkout/{abandonedCheckoutId} Method: GET # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: abandonedCheckoutId Method parameters: param name: abandonedCheckoutId | type: none | required: true Return type: GetAbandonedCheckoutResponse - name: abandonedCheckout | type: AbandonedCheckout | description: The requested abandoned checkout. - name: id | type: string | description: Abandoned checkout GUID. - name: createdDate | type: string | description: Date and time the abandoned checkout was created. - name: updatedDate | type: string | description: Date and time the abandoned checkout was updated. - name: checkoutId | type: string | description: The associated checkout GUID. - name: cartId | type: string | description: The associated cart GUID. - name: status | type: Status | description: Status of the abandoned checkout. - enum: - ABANDONED: Abandoned. - RECOVERED: Recovered. - 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: buyerInfo | type: BuyerInfo | description: Buyer information. - ONE-OF: - name: visitorId | type: string | description: Visitor GUID (if the site visitor is **not** a site member). - name: memberId | type: string | description: Member GUID (if the site visitor is a site member). - name: userId | type: string | description: User GUID (if the site visitor is a site owner or collaborator). - name: contactId | type: string | description: Contact GUID. For more information, see the Contacts API. - name: email | type: string | description: Buyer email address. - 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: currency | type: string | description: The store's currency. - name: conversionCurrency | type: string | description: Currency the buyer used in checkout. - name: totalPrice | type: MultiCurrencyPrice | description: Total price after discounts, gift cards, and tax. - 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: activities | type: array | description: List of all automation activities performed by [Wix Automations](https://dev.wix.com/docs/rest/business-management/automations/introduction.md) regarding the abandoned checkout. Wix Automations updates the `activities` field for each activity in the automation flow. Only relevant if the site owner set up [automations in the Dashboard](https://support.wix.com/en/article/wix-automations-creating-an-automation-with-the-new-builder#step-1-create-a-new-automation). Read more about `activities` in the Abandoned Checkouts introduction. - name: createdDate | type: string | description: Date and time the automation activity was created. - name: type | type: ActivityType | description: Automation activity type. - enum: - SCHEDULED: Scheduled. - EMAIL_SENT: Email sent. - EMAIL_NOT_SENT: Email not sent. - NOTIFICATION_SENT: Notification sent. - TASK_CREATED: Task created. - AUTOMATION_SKIPPED: Automation skipped. - name: checkoutRecoveredDate | type: string | description: Date and time the abandoned checkout was recovered. - name: checkoutUrl | type: string | description: Checkout URL. - name: subtotalPrice | type: MultiCurrencyPrice | description: Subtotal price of all line items, before discounts and before tax. - 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: price | type: MultiCurrencyPrice | description: Item price **after** catalog-defined discount and line item discounts. - name: priceBeforeDiscounts | type: MultiCurrencyPrice | description: Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. - 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: 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: 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. ``` ### Examples ### Get Abandoned Checkout ```curl curl -X GET https://www.wixapis.com/ecom/v1/abandoned-checkout/b4ebb0b8-4482-4693-ae09-7b47e977484c \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.checkout.AbandonedCheckoutService.getAbandonedCheckout(abandonedCheckoutId) Description: Retrieves an abandoned checkout. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: abandonedCheckoutId Method parameters: param name: abandonedCheckoutId | type: string | description: Abandoned checkout GUID. | required: true Return type: PROMISE - name: _id | type: string | description: Abandoned checkout GUID. - name: _createdDate | type: Date | description: Date and time the abandoned checkout was created. - name: _updatedDate | type: Date | description: Date and time the abandoned checkout was updated. - name: checkoutId | type: string | description: The associated checkout GUID. - name: cartId | type: string | description: The associated cart GUID. - name: status | type: Status | description: Status of the abandoned checkout. - enum: - ABANDONED: Abandoned. - RECOVERED: Recovered. - 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: buyerInfo | type: BuyerInfo | description: Buyer information. - ONE-OF: - name: visitorId | type: string | description: Visitor GUID (if the site visitor is **not** a site member). - name: memberId | type: string | description: Member GUID (if the site visitor is a site member). - name: userId | type: string | description: User GUID (if the site visitor is a site owner or collaborator). - name: contactId | type: string | description: Contact GUID. For more information, see the Contacts API. - name: email | type: string | description: Buyer email address. - 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: currency | type: string | description: The store's currency. - name: conversionCurrency | type: string | description: Currency the buyer used in checkout. - name: totalPrice | type: MultiCurrencyPrice | description: Total price after discounts, gift cards, and tax. - 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: activities | type: array | description: List of all automation activities performed by [Wix Automations](https://dev.wix.com/docs/rest/business-management/automations/introduction.md) regarding the abandoned checkout. Wix Automations updates the `activities` field for each activity in the automation flow. Only relevant if the site owner set up [automations in the Dashboard](https://support.wix.com/en/article/wix-automations-creating-an-automation-with-the-new-builder#step-1-create-a-new-automation). Read more about `activities` in the Abandoned Checkouts introduction. - name: _createdDate | type: Date | description: Date and time the automation activity was created. - name: type | type: ActivityType | description: Automation activity type. - enum: - SCHEDULED: Scheduled. - EMAIL_SENT: Email sent. - EMAIL_NOT_SENT: Email not sent. - NOTIFICATION_SENT: Notification sent. - TASK_CREATED: Task created. - AUTOMATION_SKIPPED: Automation skipped. - name: checkoutRecoveredDate | type: Date | description: Date and time the abandoned checkout was recovered. - name: checkoutUrl | type: string | description: Checkout URL. - name: subtotalPrice | type: MultiCurrencyPrice | description: Subtotal price of all line items, before discounts and before tax. - 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: price | type: MultiCurrencyPrice | description: Item price **after** catalog-defined discount and line item discounts. - name: priceBeforeDiscounts | type: MultiCurrencyPrice | description: Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. - 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: 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: 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. ``` ### Examples ### getAbandonedCheckout ```javascript import { abandonedCheckouts } from '@wix/ecom'; async function getAbandonedCheckout(abandonedCheckoutId) { const response = await abandonedCheckouts.getAbandonedCheckout(abandonedCheckoutId); }; ``` ### getAbandonedCheckout (with elevated permissions) ```javascript import { abandonedCheckouts } from '@wix/ecom'; import { auth } from '@wix/essentials'; async function myGetAbandonedCheckoutMethod(abandonedCheckoutId) { const elevatedGetAbandonedCheckout = auth.elevate(abandonedCheckouts.getAbandonedCheckout); const response = await elevatedGetAbandonedCheckout(abandonedCheckoutId); } ``` ### getAbandonedCheckout (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 { abandonedCheckouts } from '@wix/ecom'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { abandonedCheckouts }, // Include the auth strategy and host as relevant }); async function getAbandonedCheckout(abandonedCheckoutId) { const response = await myWixClient.abandonedCheckouts.getAbandonedCheckout(abandonedCheckoutId); }; ``` ---