> 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 # DeleteCheckoutTemplate # Package: checkout # Namespace: CheckoutTemplateService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/delete-checkout-template.md ## Permission Scopes: Manage eCommerce - all permissions: SCOPE.DC-ECOM-MEGA.MANAGE-ECOM ## Introduction Deletes a checkout template. If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then the customer will be redirected to the domain site. --- ## REST API ### Schema ``` Method: deleteCheckoutTemplate Description: Deletes a checkout template. If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then the customer will be redirected to the domain site. URL: https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: checkoutTemplateId Method parameters: param name: checkoutTemplateId | type: none | required: true Return type: DeleteCheckoutTemplateResponse EMPTY-OBJECT {} ``` ### Examples ### Delete Checkout Template ```curl curl -X DELETE \ 'https://www.wixapis.com/ecom/v1/checkout-templates/825315ef-1b62-40f7-ab62-97b751ebf285' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.checkout.CheckoutTemplateService.deleteCheckoutTemplate(checkoutTemplateId) Description: Deletes a checkout template. If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then the customer will be redirected to the domain site. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: checkoutTemplateId Method parameters: param name: checkoutTemplateId | type: string | description: GUID of the checkout template to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteCheckoutTemplate ```javascript import { checkoutTemplates } from '@wix/ecom'; async function deleteCheckoutTemplate(checkoutTemplateId) { const response = await checkoutTemplates.deleteCheckoutTemplate(checkoutTemplateId); }; ``` ### deleteCheckoutTemplate (with elevated permissions) ```javascript import { checkoutTemplates } from '@wix/ecom'; import { auth } from '@wix/essentials'; async function myDeleteCheckoutTemplateMethod(checkoutTemplateId) { const elevatedDeleteCheckoutTemplate = auth.elevate(checkoutTemplates.deleteCheckoutTemplate); const response = await elevatedDeleteCheckoutTemplate(checkoutTemplateId); } ``` ### deleteCheckoutTemplate (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 { checkoutTemplates } from '@wix/ecom'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { checkoutTemplates }, // Include the auth strategy and host as relevant }); async function deleteCheckoutTemplate(checkoutTemplateId) { const response = await myWixClient.checkoutTemplates.deleteCheckoutTemplate(checkoutTemplateId); }; ``` ---