> 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 # DeleteAbandonedCheckout # Package: checkout # Namespace: AbandonedCheckoutService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/abandoned-checkout/delete-abandoned-checkout.md ## Permission Scopes: Manage Orders: SCOPE.DC-STORES.MANAGE-ORDERS ## Introduction Deletes an abandoned checkout. --- ## REST API ### Schema ``` Method: deleteAbandonedCheckout Description: Deletes an abandoned checkout. URL: https://www.wixapis.com/ecom/v1/abandoned-checkout/{abandonedCheckoutId} Method: DELETE # 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: DeleteAbandonedCheckoutResponse EMPTY-OBJECT {} ``` ### Examples ### Delete Abandoned Checkout ```curl curl -X DELETE \ 'https://www.wixapis.com/ecom/v1/abandoned-checkout/330c3e52-73d4-4cc7-8eb2-61f6c5a07478' \ -H 'Authorization: ' \ -H "Content-Type:application/json" ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.checkout.AbandonedCheckoutService.deleteAbandonedCheckout(abandonedCheckoutId) Description: Deletes 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: Id of the abandoned checkout to delete | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteAbandonedCheckout ```javascript import { abandonedCheckouts } from '@wix/ecom'; async function deleteAbandonedCheckout(abandonedCheckoutId) { const response = await abandonedCheckouts.deleteAbandonedCheckout(abandonedCheckoutId); }; ``` ### deleteAbandonedCheckout (with elevated permissions) ```javascript import { abandonedCheckouts } from '@wix/ecom'; import { auth } from '@wix/essentials'; async function myDeleteAbandonedCheckoutMethod(abandonedCheckoutId) { const elevatedDeleteAbandonedCheckout = auth.elevate(abandonedCheckouts.deleteAbandonedCheckout); const response = await elevatedDeleteAbandonedCheckout(abandonedCheckoutId); } ``` ### deleteAbandonedCheckout (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 deleteAbandonedCheckout(abandonedCheckoutId) { const response = await myWixClient.abandonedCheckouts.deleteAbandonedCheckout(abandonedCheckoutId); }; ``` ---