> 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 # DeletePlan # Package: pricingPlans # Namespace: PlanService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/plans-v3/delete-plan.md ## Permission Scopes: Manage Pricing Plans: SCOPE.DC-PAIDPLANS.MANAGE-PLANS ## Introduction Deletes a plan. --- ## REST API ### Schema ``` Method: deletePlan Description: Deletes a plan. URL: https://www.wixapis.com/pricing-plans/v3/plans/{planId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: planId Method parameters: param name: planId | type: none | required: true Return type: DeletePlanResponse EMPTY-OBJECT {} ``` ### Examples ### Delete Plan ```curl curl -X DELETE \ 'https://www.wixapis.com/pricing-plans/v3/plans/5779edd3-2994-4bf4-acfe-d739ad2d95ac' \ -H 'Authorization: ' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.pricingPlans.PlanService.deletePlan(planId) Description: Deletes a plan. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: planId Method parameters: param name: planId | type: string | description: GUID of the plan to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deletePlan ```javascript import { plansV3 } from '@wix/pricing-plans'; async function deletePlan(planId) { const response = await plansV3.deletePlan(planId); }; ``` ### deletePlan (with elevated permissions) ```javascript import { plansV3 } from '@wix/pricing-plans'; import { auth } from '@wix/essentials'; async function myDeletePlanMethod(planId) { const elevatedDeletePlan = auth.elevate(plansV3.deletePlan); const response = await elevatedDeletePlan(planId); } ``` ### deletePlan (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 { plansV3 } from '@wix/pricing-plans'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { plansV3 }, // Include the auth strategy and host as relevant }); async function deletePlan(planId) { const response = await myWixClient.plansV3.deletePlan(planId); }; ``` ---