> 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 # GetPlan # Package: pricingPlans # Namespace: PlanService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/plans-v3/get-plan.md ## Permission Scopes: Read Orders: SCOPE.DC-PAIDPLANS.READ-ORDERS Read Pricing Plans: SCOPE.DC-PAIDPLANS.READ-PLANS ## Introduction Retrieves a plan by ID. --- ## REST API ### Schema ``` Method: getPlan Description: Retrieves a plan by GUID. URL: https://www.wixapis.com/pricing-plans/v3/plans/{planId} Method: GET # 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: GetPlanResponse - name: plan | type: Plan | description: Requested plan. - name: id | type: string | description: Plan GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the plan is updated. - name: createdDate | type: string | description: Date and time the plan was created. - name: updatedDate | type: string | description: Date and time the plan was last updated. - name: name | type: string | description: Plan name displayed to customers. - name: description | type: string | description: Plan description that explains what customers get with this plan. - name: image | type: Image | description: Plan image displayed during checkout and on the site's **Plans & Pricing** page. - name: id | type: string | description: WixMedia image GUID. - 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: slug | type: string | description: Unique identifier for this plan within the Wix site. If not provided, generated automatically from the plan name. - name: termsAndConditions | type: string | description: Terms and conditions text that customers must agree to when purchasing this plan. - name: maxPurchasesPerBuyer | type: integer | description: Maximum number of times the same customer can purchase this plan. Use `0` for unlimited purchases or `1` to limit to one purchase per customer. - name: perks | type: array | description: List of text snippets describing what the plan offers. For display purposes only. - name: id | type: string | description: Perk GUID. - name: description | type: string | description: Perk description. - name: visibility | type: Visibility | description: Plan visibility. - enum: - PUBLIC: Plan is visible and available for purchase by all customers. - PRIVATE: Plan isn't visible to new customers unless they get a specific link to the plan. Existing buyers can continue using it. - name: buyable | type: boolean | description: Whether customers can currently purchase this plan. If set to `false`, customer won't be able to buy a plan themselves. In this case a Wix user has to assign the plan through the [dashboard](https://support.wix.com/en/article/pricing-plans-selling-plans-offline). - name: formId | type: string | description: GUID of the form associated with the plan at checkout. - name: buyerCanCancel | type: boolean | description: Whether buyers can cancel their subscription to this plan. - name: currency | type: string | description: Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. - name: extendedFields | type: ExtendedFields | description: Data extensions. Learn more about [extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md). - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). ``` ### Examples ### Get Plan ```curl curl -X GET \ 'https://www.wixapis.com/pricing-plans/v3/plans/5779edd3-2994-4bf4-acfe-d739ad2d95ac' \ -H 'Authorization: ' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.pricingPlans.PlanService.getPlan(planId) Description: Retrieves a plan by GUID. # 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 retrieve. | required: true Return type: PROMISE - name: _id | type: string | description: Plan GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the plan is updated. - name: _createdDate | type: Date | description: Date and time the plan was created. - name: _updatedDate | type: Date | description: Date and time the plan was last updated. - name: name | type: string | description: Plan name displayed to customers. - name: description | type: string | description: Plan description that explains what customers get with this plan. - name: image | type: string | description: Plan image displayed during checkout and on the site's **Plans & Pricing** page. - name: slug | type: string | description: Unique identifier for this plan within the Wix site. If not provided, generated automatically from the plan name. - name: termsAndConditions | type: string | description: Terms and conditions text that customers must agree to when purchasing this plan. - name: maxPurchasesPerBuyer | type: integer | description: Maximum number of times the same customer can purchase this plan. Use `0` for unlimited purchases or `1` to limit to one purchase per customer. - name: perks | type: array | description: List of text snippets describing what the plan offers. For display purposes only. - name: _id | type: string | description: Perk GUID. - name: description | type: string | description: Perk description. - name: visibility | type: Visibility | description: Plan visibility. - enum: - PUBLIC: Plan is visible and available for purchase by all customers. - PRIVATE: Plan isn't visible to new customers unless they get a specific link to the plan. Existing buyers can continue using it. - name: buyable | type: boolean | description: Whether customers can currently purchase this plan. If set to `false`, customer won't be able to buy a plan themselves. In this case a Wix user has to assign the plan through the [dashboard](https://support.wix.com/en/article/pricing-plans-selling-plans-offline). - name: formId | type: string | description: GUID of the form associated with the plan at checkout. - name: buyerCanCancel | type: boolean | description: Whether buyers can cancel their subscription to this plan. - name: currency | type: string | description: Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. - name: extendedFields | type: ExtendedFields | description: Data extensions. Learn more about [extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md). - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). ``` ### Examples ### getPlan ```javascript import { plansV3 } from '@wix/pricing-plans'; async function getPlan(planId) { const response = await plansV3.getPlan(planId); }; ``` ### getPlan (with elevated permissions) ```javascript import { plansV3 } from '@wix/pricing-plans'; import { auth } from '@wix/essentials'; async function myGetPlanMethod(planId) { const elevatedGetPlan = auth.elevate(plansV3.getPlan); const response = await elevatedGetPlan(planId); } ``` ### getPlan (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 getPlan(planId) { const response = await myWixClient.plansV3.getPlan(planId); }; ``` ---