> 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 # Method name: makePlanPrimary(id: string) # Method package: wixPricingPlansBackend # Method menu location: wixPricingPlansBackend --> makePlanPrimary # Method Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-backend/make-plan-primary.md # Method Description: Marks a pricing plan as the primary pricing plan. The `makePlanPrimary()` function returns a Promise that resolves to the pricing plan that is now the primary one. Only a single plan can be marked as a primary plan at any given time. If there is an existing plan marked as primary, calling `makePlanPrimary()` causes the existing primary plan to lose its status. When viewing pricing plans on the site, the primary plan is highlighted with a customizable ribbon. Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can mark a plan as a primary plan. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Make a plan a primary plan ```javascript import { Permissions, webMethod } from 'wix-web-module'; import wixPricingPlansBackend from 'wix-pricing-plans-backend'; export const myMakePlanPrimaryFunction = webMethod(Permissions.Anyone, () => { const planId = '3743d382-a4d4-7e15-ada5-340ad4b5d760'; return wixPricingPlansBackend.makePlanPrimary(planId) .then((plan) => { console.log(plan); }) .catch((error) => { console.error(error); }); }); /* Full plan object - primary is true: * * { * "plan": { * "_id": "3743d382-a4d4-7e15-ada5-340ad4b5d760", * "name": "Ultimate", * "description": "The ultimate gaming experience", * "perks": [ * "There are no words to describe this extreme game", * "Easy yet challenging" * ], * "pricing": { * "subscription": { * "cycleDuration": { * "count": 1, * "unit": "YEAR" * }, * "cycleCount": 0 * }, * "price": { * "value": "50", * "currency": "USD" * } * }, * "public": true, * "archived": false, * "primary": true, * "hasOrders": false, * "_createdDate": "2020-12-21T15:13:03.444Z", * "_updatedDate": "2020-12-31T11:51:16.859Z", * "slug": "ultimate", * "allowFutureStartDate": false, * "buyerCanCancel": true * } * } */ ``` ---