Select endpoints allow sorting results by field. Use "order": "ASC"
to sort results in ascending order, and "order": "DESC"
to sort in descending order.
For example, to sort plans by created date in descending order:
Copy Code
"sort": { "fieldName": "createdDate", "order": "DESC" }
Refer to the following tables to check which fields support sorting.
Field | Description | Query Filter Operators | Sorting |
---|---|---|---|
id | Plan ID | $eq, $ne, $hasSome | |
primary | Whether the plan is marked as primary, and highlighted in the site with a custom ribbon | $eq, $ne | Allowed |
slug | URL-friendly version of the plan name. Unique across all plans in the same site | $eq, $ne, $startsWith, $endsWith, $contains | Allowed |
createdDate | Date plan was created | $eq, $ne, $gt, $ge, $lt, $le, $between | Allowed |
updatedDate | Date plan was updated | $eq, $ne, $gt, $ge, $lt, $le, $between | Allowed |
The Plan entity includes all the details of plans available on a site. Using the Plans API, you can create and manage plans, change the visibility and availability of a plan for purchase, and get plan statistics. Plans provides a customizable pricing page where customers can view the plan perks, prices and other features including free trials, purchase limitations and more. All plans either have a duration or can be valid until canceled by a customer.
Use the Plans API to:
- Create & update plans.
- Get statistics about the plans.
- Get specific plan information.
- Arrange display order for plans.
- Hide or archive plans.
Pricing plans can be limited to be purchased only one time by a single customer. By default, customers can make unlimited purchases.
- Plan: A membership plan or package, offering bundles of features or “perks”.
- A free plan can be purchased free of charge.
- A one-time plan can be purchased for a single payment.
- A recurring plan charges the customer on a weekly, monthly or yearly basis for selected duration of time.
- Primary plans: Plans that are labeled with a ribbon that is customizable in the Wix Pricing Plans UI.
- Archived plans: Plans that can no longer be purchased or edited, but existing plan holders can still enjoy purchased membership and will continue to be charged until canceled or expired.
- Hidden plans: Plans that are not currently visible to customers. Hidden plans may still be sold manually to customers.
- Free trial: A feature allowing the site owner to test out the perks of the plan for a selected amount of days before the first charge. Relevant for recurring plans.
- Plan Policy: The definition of terms and conditions for the customer. Plan policy can be displayed per plan on the Wix Pricing Plans checkout page.
- Empty value or a value of 0, meaning no limitation.
- Value of 1, meaning limited to one purchase per buyer.
Retrieves a list of up to 100 public pricing plans.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Retrieves a list of up to 1,000 public pricing plans, given the provided pagination, sorting, and filtering.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Retrieves a pricing plan by ID.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Creates a pricing plan.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Gets statistics about the pricing plans. Currently providing only the total number of pricing plans.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Updates a pricing plan. Updating a plan does not impact existing orders made for the plan. All orders keep the details of the original plan that was active at the time of purchase.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Sets visibility for pricing plans. Visible plans are considered public plans. By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors cannot choose them. As opposed to archiving, setting visibility can be reversed. This means that a public plan can be hidden, and a hidden plan can be made public (visible). (An archived plan always remains archived and cannot be made active again.) Changing a plan’s visibility does not impact existing orders for the plan. All orders for hidden plans are still active and keep their perks.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Marks a pricing plan as the primary pricing plan. When viewing pricing plans on the site, the primary plan is highlighted with a customizable ribbon.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Sets all pricing plans as not primary. When viewing pricing plans on the site, no plan is highlighted with a customizable ribbon.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Archives a single plan. When a plan is archived, it is no longer visible as a public plan that can be chosen by site members or visitors. Archived plans cannot be purchased. An archived plan cannot be made active again. Plan archiving does not impact existing orders made for the plan. All orders for the plan are still active and keep their perks. Site owners can see archived plans in the Dashboard under Pricing Plans -> Archived Plans.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Changes the display order of the plans on the site. To rearrange the order of the plans, provide a list of plan IDs in the desired order. Include all public and hidden plans in the list you provide. Make sure to provide all non-archived plan IDs to avoid unpredictable results
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
An event that is triggered when a pricing plan is updated.
Event Body
An event that is triggered when a pricing plan is created.
Event Body
An event that is triggered when a pricing plan is archived.