> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Package: pricingPlans

# Namespace: plansV3

# Webhook link: https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/plans-v3/plan-created.md

# Webhook Permissions Scopes IDs:
Read Pricing Plans: SCOPE.DC-PAIDPLANS.READ-PLANS

## Introduction

Triggered when a plan is created.

---

## REST API

### Schema

```
Webhook: Plan Created
Description: Triggered when a plan is created.
Event body:
 - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events.
 - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event.
 - name: slug | type: string | description: Event name.
 - name: entityId | type: string | description: ID of the entity associated with the event.
 - name: eventTime | type: string (date-time) | description: Event timestamp.
 - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR.
 - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
 - name: createdEvent | type: object | description: Created event details.
    - name: entity | type: Plan | description: The created entity.
        - 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: pricingVariants | type: array<PricingVariant> | description: Pricing variants that define different billing and pricing options for this plan. Currently limited to 1 variant per plan.
           - name: id | type: string | description: Pricing variant GUID.
           - name: name | type: string | description: Name for this pricing variant, such as "Monthly" or "Yearly".
           - name: freeTrialDays | type: integer | description: Number of days customers can use the plan for free before the first charge. Set to `0` for no free trial.
           - name: fees | type: array<Fee> | description: Additional fees applied to this pricing variant.
              - ONE-OF:
                 - name: fixedAmountOptions | type: FixedAmountOption | description: Fixed monetary amount for the fee.
                    - name: amount | type: string | description: Fixed monetary amount.
              - name: id | type: string | description: 
              - name: priceType | type: PriceType | description: Pricing type used for this fee.
                   - enum:
                   -     FIXED_AMOUNT: Fee is charged as a fixed monetary amount.
              - name: name | type: string | description: Fee name displayed to customers, such as "Setup Fee" or "Processing Fee".
              - name: appliedAt | type: AppliedAt | description: When this fee is charged during the customer's plan lifecycle.
                   - enum:
                   -     FIRST_PAYMENT: Fee is added to the first payment.
           - name: billingTerms | type: BillingTerms | description: Billing configuration that defines when and how often customers are charged.
              - ONE-OF:
                 - name: cyclesCompletedDetails | type: CyclesCompletedDetails | description: How many billing cycles the plan lasts.
                    - name: billingCycleCount | type: string | description: Number of billing cycles before the plan automatically ends. For example, if `billingCycle` is 3 months and `billingCycleCount` is 4, the customer will be charged 4 times over 12 months before the plan expires. Only applicable if `endType` is `CYCLES_COMPLETED`.
              - name: billingCycle | type: Duration | description: Duration of each billing cycle, such as 1 month or 2 weeks. Can't be less than 7 days. Only applicable for recurring plans.
                 - name: period | type: Period | description: Duration of period.
                       - enum: DAY, WEEK, MONTH, YEAR
                 - name: count | type: string | description: Number of periods.
              - name: startType | type: StartType | description: When the billing starts.
                   - enum:
                   -     ON_PURCHASE: Billing starts immediately after purchase.
                   -     CUSTOM: Customer can choose when billing starts.
              - name: endType | type: EndType | description: How long the plan remains active. Plans can run until canceled or for a specific number of billing cycles. Plan duration can't exceed 10 years.
                   - enum:
                   -     UNTIL_CANCELLED: Plan continues until customer cancels.
                   -     CYCLES_COMPLETED: Plan ends after a specified number of billing cycles.
           - name: promotion | type: string | description: Promotional message displayed with this pricing variant.
           - name: pricingStrategies | type: array<PricingStrategy> | description: Pricing strategies that determine how much customers pay. Currently limited to 1 strategy per variant.
              - ONE-OF:
                 - name: flatRate | type: FlatRate | description: Single fixed cost charged regardless of usage.
                    - name: amount | type: string | description: Fixed monetary amount.
           - name: visible | type: boolean | description: Whether this pricing variant is visible to customers. Defaults to `true` when not set. At least one variant per plan must remain visible. Variant-level visibility is independent from plan-level visibility (`Plan.visibility`).
           - name: categoryIds | type: array<string> | description: IDs of the categories this variant belongs to. Categories group variants across plans (for example into a "Monthly / Yearly" selector) independently of billing cycle. Optional.
           - name: priceOverrides | type: PriceOverrides | description: Rules that override this pricing variant's price for purchases that meet their conditions. Applied during purchase. An override that matches the purchase always replaces the variant's original price, even when the resulting price is higher. If multiple overrides match the same purchase, the lowest resulting price among them wins - the original price doesn't participate in this comparison. The overridden price applies to every billing cycle of the resulting subscription, not only the first payment. Updates replace the entire list of overrides. To remove all overrides, set this field to `null` - an empty overrides list isn't accepted.
              - name: overrides | type: array<PriceOverride> | description: Price override rules.
                 - ONE-OF:
                    - name: fixedPriceOptions | type: FixedPriceOptions | description: Options for the `FIXED_PRICE` override type.
                       - name: amount | type: string | description: Price that replaces the pricing variant's original price. Can be higher than the original price.
                    - name: percentageDiscountOptions | type: PercentageDiscountOptions | description: Options for the `PERCENTAGE_DISCOUNT` override type.
                       - name: percentage | type: string | description: Percentage to deduct from the pricing variant's original price. For example, `12.5` for a 12.5% discount. The discounted price is rounded to the number of decimal places supported by the plan's currency.
                 - name: id | type: string | description: Price override GUID. Must be unique within the pricing variant.
                 - name: conditions | type: PurchaseConditions | description: Conditions a purchase must meet for this override to apply.
                    - ONE-OF:
                       - name: specificMembersOptions | type: SpecificMembersOptions | description: Options for the `SPECIFIC_MEMBERS` customer eligibility.
                          - name: memberIds | type: array<string> | description: IDs of the members the override applies to. The logged-in buyer must be one of these members.
                    - name: customerEligibility | type: CustomerEligibility | description: Which customers the override applies to.
                           - enum:
                           -     ALL: The override applies to all customers.
                           -     RETURNING: The override applies only to returning customers - members with at least 1 plan subscription on the site, counted across all plans by the member's contact. Pending, active, paused, ended, and canceled subscriptions count; draft subscriptions don't.
                           -     SPECIFIC_MEMBERS: The override applies only to the specified members.
                    - name: validFromDate | type: string | description: Date and time from which the override applies. The purchase must happen on or after this exact instant. When `valid_until_date` is also set, must be earlier than `valid_until_date` - equal values are rejected.
                    - name: validUntilDate | type: string | description: Date and time until which the override applies. The purchase must happen before this exact instant.
                 - name: overrideType | type: OverrideType | description: How the pricing variant's price is overridden.
                       - enum:
                       -     FIXED_PRICE: The pricing variant's price is replaced with a fixed price.
                       -     PERCENTAGE_DISCOUNT: The pricing variant's price is reduced by a percentage.
           - name: feeOverrides | type: FeeOverrides | description: Rules that override specific fees of this pricing variant for purchases that meet their conditions. Applied during purchase. If multiple overrides apply to the same fee, the lowest resulting fee amount wins, with a waived fee counting as `0`. Updates replace the entire list of overrides. To remove all overrides, set this field to `null` - an empty overrides list isn't accepted.
              - name: overrides | type: array<FeeOverride> | description: Fee override rules.
                 - ONE-OF:
                    - name: fixedAmountOptions | type: FixedAmountOptions | description: Options for the `FIXED_AMOUNT` override type.
                       - name: amount | type: string | description: Amount that replaces the fee's original amount. Must be greater than `0`. To remove the fee from the purchase, use the `WAIVED` override type instead.
                 - name: id | type: string | description: Fee override GUID. Must be unique within the pricing variant.
                 - name: feeId | type: string | description: GUID of the fee on the same pricing variant that this override applies to.
                 - name: conditions | type: PurchaseConditions | description: Conditions a purchase must meet for this override to apply.
                 - name: overrideType | type: OverrideType | description: How the fee is overridden.
                       - enum:
                       -     FIXED_AMOUNT: The fee's amount is replaced with a fixed amount.
                       -     WAIVED: The fee isn't applied to the purchase at all.
        - name: perks | type: array<Perk> | 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. Determines whether the plan is returned to site visitors and site members.  Default: `PUBLIC`
           - enum:
           -     PUBLIC: Plan is returned to site visitors and site members.
           -     PRIVATE: Plan is returned only to Wix users and apps with the appropriate permissions. It isn't returned to site visitors and site members.  Visibility doesn't affect whether the plan can be purchased.
        - 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. When the site currency changes, monetary amounts stored on the plan (prices, fees, and override amounts) are automatically rounded to the number of decimal places supported by the new currency.
        - name: purchaseLimits | type: array<PurchaseLimit> | description: Caps how many subscriptions buyers can have or the site can sell for this plan. When multiple types are present, all must pass (AND logic). Duplicate types are rejected by the server.
           - name: type | type: PurchaseLimitType | description: The type of purchase limit.
               - enum:
               -     PER_MEMBER_LIFETIME: Limits the total number of subscriptions (any status) a single member can have over their lifetime.
               -     PER_MEMBER_ACTIVE: Limits the number of ongoing (ACTIVE, PENDING, PAUSED) subscriptions a single member can have at any time.
               -     TOTAL_ACTIVE: Limits the total number of ongoing (ACTIVE, PENDING, PAUSED) subscriptions across all members at any time.
               -     TOTAL_SOLD: Limits the total number of subscriptions ever created (any status) across all members.
           - name: maxCount | type: integer | description: The maximum number of subscriptions allowed.
        - name: benefitDistributionSettings | type: BenefitDistributionSettings | description: The settings of the benefit distribution for subscriptions to this plan
           - ONE-OF:
              - name: customScheduleOptions | type: CustomScheduleOptions | description: Custom schedule
                 - name: cycleDuration | type: Duration | description: Cycle duration
                    - name: unit | type: DurationUnit | description: Duration unit: DAY, WEEK, MONTH, YEAR
                           - enum: UNKNOWN, DAY, WEEK, MONTH, YEAR
                    - name: count | type: integer | description: Amount of units. For example,  1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1.
           - name: distributionStrategyType | type: DistributionStrategyType | description: The distribution strategy of the benefits for this subscription, which is used to determine how the benefits are distributed in each cycle.
               - enum: UNKNOWN_DISTRIBUTION_STRATEGY_TYPE, PER_BILLING_CYCLE, CUSTOM_SCHEDULE
        - name: startDateSettings | type: StartDateSettings | description: Settings that control when subscriptions to this plan start. Applied during purchase to calculate the subscription start date and validate customer-selected start dates. The settings apply only to pricing variants with a compatible `billing_terms.start_type`: `FIXED_DATE` and `DAY_OF_MONTH` apply to variants with the `ON_PURCHASE` start type, while `DATE_RANGE` applies to variants with the `CUSTOM` start type.
           - ONE-OF:
              - name: fixedDateOptions | type: FixedDateOptions | description: Subscription starts on the earliest of the configured fixed dates that hasn't passed.
                 - name: startDates | type: array<string> | description: Dates on which a subscription can start. A purchase starts the subscription on the earliest listed date that hasn't passed in the site's time zone. A purchase made on one of the dates starts the subscription immediately. When every date has passed the plan can't be purchased and `start_date_unavailable_message` is displayed. Only the calendar date in the site's time zone is used, the time of day is ignored. Order doesn't matter. Dates must be unique.
              - name: dayOfMonthOptions | type: DayOfMonthOptions | description: Subscription starts on a specific day of each month.
                 - name: dayOfMonth | type: integer | description: Day of the month the subscription starts. For months with fewer days, the subscription starts on the last day of the month. If the purchase happens on the configured day, the subscription starts on that same day. Only determines the subscription start date - subsequent billing cycles follow the pricing variant's `billing_terms.billing_cycle` from that start date.
              - name: dateRangeOptions | type: DateRangeOptions | description: Customer selects a start date within a date range.
                 - name: startDate | type: string | description: Date and time from which the customer can select the subscription start date. The selected start date must be on or after this exact instant.
                 - name: endDate | type: string | description: Date and time until which the customer can select the subscription start date. If not set, the range is open-ended. The selected start date must be before this exact instant. Must be later than `start_date`.
           - name: type | type: StartDateType | description: How the subscription start date is determined.
               - enum:
               -     FIXED_DATE: Subscription starts on the earliest of the configured fixed dates that hasn't passed. Applies only to pricing variants with the `ON_PURCHASE` start type.
               -     DAY_OF_MONTH: Subscription starts on a specific day of each month. Applies only to pricing variants with the `ON_PURCHASE` start type.
               -     DATE_RANGE: Customer selects a start date within a date range. Applies only to pricing variants with the `CUSTOM` start type.
           - name: startDateUnavailableMessage | type: string | description: Message displayed to customers when no start date is available. For example, when every fixed start date or the end of the date range has passed. Applicable only when `type` is `FIXED_DATE`, or `DATE_RANGE` with `date_range_options.end_date` set - in other configurations a start date is always available and the message is ignored.
        - name: tags | type: Tags | description: Tags that can be assigned to this plan for classification and filtering.
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.
              - name: tagIds | type: array<string> | description: List of tag GUIDs
           - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.
        - 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


```curl
{
  "id": "01989a45-eff0-4c17-8039-869890743a64",
  "entityFqdn": "wix.pricing_plans.v3.plan",
  "slug": "created",
  "entityId": "c4025083-05c3-4ec7-b517-5af1079856e3",
  "createdEvent": {
    "entity": {
      "id": "5d1c47f5-0ec7-4c9c-9f9c-a87be388e3f9",
      "revision": "1",
      "createdDate": "2024-09-17T10:38:38.609Z",
      "updatedDate": "2024-09-17T10:38:38.609Z",
      "name": "Professional Studio",
      "slug": "professional-studio",
      "maxPurchasesPerBuyer": 0,
      "pricingVariants": [
        {
          "id": "6304bd66-128e-454e-8c95-e389b78cc7e1",
          "name": "Monthly",
          "freeTrialDays": 0,
          "fees": [],
          "billingTerms": {
            "billingCycle": {
              "period": "MONTH",
              "count": "1"
            },
            "startType": "ON_PURCHASE",
            "endType": "UNTIL_CANCELLED"
          },
          "pricingStrategies": [
            {
              "flatRate": {
                "amount": "5.99"
              }
            }
          ]
        }
      ],
      "perks": [
        {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "description": "24/7 priority customer support"
        },
        {
          "id": "b2c3d4e5-f6g7-8901-bcde-f23456789012",
          "description": "Unlimited API calls and data storage"
        },
        {
          "id": "c3d4e5f6-g7h8-9012-cdef-345678901234",
          "description": "Advanced analytics and reporting dashboard"
        }
      ],
      "visibility": "PUBLIC",
      "buyerCanCancel": true,
      "archived": false,
      "primary": false,
      "currency": "EUR"
    }
  },
  "eventTime": "2023-07-13T13:42:14.619234Z",
  "triggeredByAnonymizeRequest": false
}
```

---

## JavaScript SDK

### Schema

```
Webhook: onPlanCreated
Description: Triggered when a plan is created.
Payload: PlanCreatedEnvelope
  - name: entity | type: Plan | description: none
     - 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: pricingVariants | type: array<PricingVariant> | description: Pricing variants that define different billing and pricing options for this plan. Currently limited to 1 variant per plan.
        - name: _id | type: string | description: Pricing variant GUID.
        - name: name | type: string | description: Name for this pricing variant, such as "Monthly" or "Yearly".
        - name: freeTrialDays | type: integer | description: Number of days customers can use the plan for free before the first charge. Set to `0` for no free trial.
        - name: fees | type: array<Fee> | description: Additional fees applied to this pricing variant.
           - ONE-OF:
              - name: fixedAmountOptions | type: FixedAmountOption | description: Fixed monetary amount for the fee.
                 - name: amount | type: string | description: Fixed monetary amount.
           - name: _id | type: string | description: 
           - name: priceType | type: PriceType | description: Pricing type used for this fee.
                 - enum:
                 -     FIXED_AMOUNT: Fee is charged as a fixed monetary amount.
           - name: name | type: string | description: Fee name displayed to customers, such as "Setup Fee" or "Processing Fee".
           - name: appliedAt | type: AppliedAt | description: When this fee is charged during the customer's plan lifecycle.
                 - enum:
                 -     FIRST_PAYMENT: Fee is added to the first payment.
        - name: billingTerms | type: BillingTerms | description: Billing configuration that defines when and how often customers are charged.
           - ONE-OF:
              - name: cyclesCompletedDetails | type: CyclesCompletedDetails | description: How many billing cycles the plan lasts.
                 - name: billingCycleCount | type: string | description: Number of billing cycles before the plan automatically ends. For example, if `billingCycle` is 3 months and `billingCycleCount` is 4, the customer will be charged 4 times over 12 months before the plan expires. Only applicable if `endType` is `CYCLES_COMPLETED`.
           - name: billingCycle | type: Duration | description: Duration of each billing cycle, such as 1 month or 2 weeks. Can't be less than 7 days. Only applicable for recurring plans.
              - name: period | type: Period | description: Duration of period.
                     - enum: DAY, WEEK, MONTH, YEAR
              - name: count | type: string | description: Number of periods.
           - name: startType | type: StartType | description: When the billing starts.
                 - enum:
                 -     ON_PURCHASE: Billing starts immediately after purchase.
                 -     CUSTOM: Customer can choose when billing starts.
           - name: endType | type: EndType | description: How long the plan remains active. Plans can run until canceled or for a specific number of billing cycles. Plan duration can't exceed 10 years.
                 - enum:
                 -     UNTIL_CANCELLED: Plan continues until customer cancels.
                 -     CYCLES_COMPLETED: Plan ends after a specified number of billing cycles.
        - name: promotion | type: string | description: Promotional message displayed with this pricing variant.
        - name: pricingStrategies | type: array<PricingStrategy> | description: Pricing strategies that determine how much customers pay. Currently limited to 1 strategy per variant.
           - ONE-OF:
              - name: flatRate | type: FlatRate | description: Single fixed cost charged regardless of usage.
                 - name: amount | type: string | description: Fixed monetary amount.
        - name: visible | type: boolean | description: Whether this pricing variant is visible to customers. Defaults to `true` when not set. At least one variant per plan must remain visible. Variant-level visibility is independent from plan-level visibility (`Plan.visibility`).
        - name: categoryIds | type: array<string> | description: IDs of the categories this variant belongs to. Categories group variants across plans (for example into a "Monthly / Yearly" selector) independently of billing cycle. Optional.
        - name: priceOverrides | type: PriceOverrides | description: Rules that override this pricing variant's price for purchases that meet their conditions. Applied during purchase. An override that matches the purchase always replaces the variant's original price, even when the resulting price is higher. If multiple overrides match the same purchase, the lowest resulting price among them wins - the original price doesn't participate in this comparison. The overridden price applies to every billing cycle of the resulting subscription, not only the first payment. Updates replace the entire list of overrides. To remove all overrides, set this field to `null` - an empty overrides list isn't accepted.
           - name: overrides | type: array<PriceOverride> | description: Price override rules.
              - ONE-OF:
                 - name: fixedPriceOptions | type: FixedPriceOptions | description: Options for the `FIXED_PRICE` override type.
                    - name: amount | type: string | description: Price that replaces the pricing variant's original price. Can be higher than the original price.
                 - name: percentageDiscountOptions | type: PercentageDiscountOptions | description: Options for the `PERCENTAGE_DISCOUNT` override type.
                    - name: percentage | type: string | description: Percentage to deduct from the pricing variant's original price. For example, `12.5` for a 12.5% discount. The discounted price is rounded to the number of decimal places supported by the plan's currency.
              - name: _id | type: string | description: Price override GUID. Must be unique within the pricing variant.
              - name: conditions | type: PurchaseConditions | description: Conditions a purchase must meet for this override to apply.
                 - ONE-OF:
                    - name: specificMembersOptions | type: SpecificMembersOptions | description: Options for the `SPECIFIC_MEMBERS` customer eligibility.
                       - name: memberIds | type: array<string> | description: IDs of the members the override applies to. The logged-in buyer must be one of these members.
                 - name: customerEligibility | type: CustomerEligibility | description: Which customers the override applies to.
                         - enum:
                         -     ALL: The override applies to all customers.
                         -     RETURNING: The override applies only to returning customers - members with at least 1 plan subscription on the site, counted across all plans by the member's contact. Pending, active, paused, ended, and canceled subscriptions count; draft subscriptions don't.
                         -     SPECIFIC_MEMBERS: The override applies only to the specified members.
                 - name: validFromDate | type: Date | description: Date and time from which the override applies. The purchase must happen on or after this exact instant. When `valid_until_date` is also set, must be earlier than `valid_until_date` - equal values are rejected.
                 - name: validUntilDate | type: Date | description: Date and time until which the override applies. The purchase must happen before this exact instant.
              - name: overrideType | type: OverrideType | description: How the pricing variant's price is overridden.
                     - enum:
                     -     FIXED_PRICE: The pricing variant's price is replaced with a fixed price.
                     -     PERCENTAGE_DISCOUNT: The pricing variant's price is reduced by a percentage.
        - name: feeOverrides | type: FeeOverrides | description: Rules that override specific fees of this pricing variant for purchases that meet their conditions. Applied during purchase. If multiple overrides apply to the same fee, the lowest resulting fee amount wins, with a waived fee counting as `0`. Updates replace the entire list of overrides. To remove all overrides, set this field to `null` - an empty overrides list isn't accepted.
           - name: overrides | type: array<FeeOverride> | description: Fee override rules.
              - ONE-OF:
                 - name: fixedAmountOptions | type: FixedAmountOptions | description: Options for the `FIXED_AMOUNT` override type.
                    - name: amount | type: string | description: Amount that replaces the fee's original amount. Must be greater than `0`. To remove the fee from the purchase, use the `WAIVED` override type instead.
              - name: _id | type: string | description: Fee override GUID. Must be unique within the pricing variant.
              - name: feeId | type: string | description: GUID of the fee on the same pricing variant that this override applies to.
              - name: conditions | type: PurchaseConditions | description: Conditions a purchase must meet for this override to apply.
              - name: overrideType | type: OverrideType | description: How the fee is overridden.
                     - enum:
                     -     FIXED_AMOUNT: The fee's amount is replaced with a fixed amount.
                     -     WAIVED: The fee isn't applied to the purchase at all.
     - name: perks | type: array<Perk> | 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. Determines whether the plan is returned to site visitors and site members.  Default: `PUBLIC`
         - enum:
         -     PUBLIC: Plan is returned to site visitors and site members.
         -     PRIVATE: Plan is returned only to Wix users and apps with the appropriate permissions. It isn't returned to site visitors and site members.  Visibility doesn't affect whether the plan can be purchased.
     - 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. When the site currency changes, monetary amounts stored on the plan (prices, fees, and override amounts) are automatically rounded to the number of decimal places supported by the new currency.
     - name: purchaseLimits | type: array<PurchaseLimit> | description: Caps how many subscriptions buyers can have or the site can sell for this plan. When multiple types are present, all must pass (AND logic). Duplicate types are rejected by the server.
        - name: type | type: PurchaseLimitType | description: The type of purchase limit.
             - enum:
             -     PER_MEMBER_LIFETIME: Limits the total number of subscriptions (any status) a single member can have over their lifetime.
             -     PER_MEMBER_ACTIVE: Limits the number of ongoing (ACTIVE, PENDING, PAUSED) subscriptions a single member can have at any time.
             -     TOTAL_ACTIVE: Limits the total number of ongoing (ACTIVE, PENDING, PAUSED) subscriptions across all members at any time.
             -     TOTAL_SOLD: Limits the total number of subscriptions ever created (any status) across all members.
        - name: maxCount | type: integer | description: The maximum number of subscriptions allowed.
     - name: benefitDistributionSettings | type: BenefitDistributionSettings | description: The settings of the benefit distribution for subscriptions to this plan
        - ONE-OF:
           - name: customScheduleOptions | type: CustomScheduleOptions | description: Custom schedule
              - name: cycleDuration | type: Duration | description: Cycle duration
                 - name: unit | type: DurationUnit | description: Duration unit: DAY, WEEK, MONTH, YEAR
                         - enum: UNKNOWN, DAY, WEEK, MONTH, YEAR
                 - name: count | type: integer | description: Amount of units. For example,  1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1.
        - name: distributionStrategyType | type: DistributionStrategyType | description: The distribution strategy of the benefits for this subscription, which is used to determine how the benefits are distributed in each cycle.
             - enum: UNKNOWN_DISTRIBUTION_STRATEGY_TYPE, PER_BILLING_CYCLE, CUSTOM_SCHEDULE
     - name: startDateSettings | type: StartDateSettings | description: Settings that control when subscriptions to this plan start. Applied during purchase to calculate the subscription start date and validate customer-selected start dates. The settings apply only to pricing variants with a compatible `billing_terms.start_type`: `FIXED_DATE` and `DAY_OF_MONTH` apply to variants with the `ON_PURCHASE` start type, while `DATE_RANGE` applies to variants with the `CUSTOM` start type.
        - ONE-OF:
           - name: fixedDateOptions | type: FixedDateOptions | description: Subscription starts on the earliest of the configured fixed dates that hasn't passed.
              - name: startDates | type: array | description: Dates on which a subscription can start. A purchase starts the subscription on the earliest listed date that hasn't passed in the site's time zone. A purchase made on one of the dates starts the subscription immediately. When every date has passed the plan can't be purchased and `start_date_unavailable_message` is displayed. Only the calendar date in the site's time zone is used, the time of day is ignored. Order doesn't matter. Dates must be unique.
           - name: dayOfMonthOptions | type: DayOfMonthOptions | description: Subscription starts on a specific day of each month.
              - name: dayOfMonth | type: integer | description: Day of the month the subscription starts. For months with fewer days, the subscription starts on the last day of the month. If the purchase happens on the configured day, the subscription starts on that same day. Only determines the subscription start date - subsequent billing cycles follow the pricing variant's `billing_terms.billing_cycle` from that start date.
           - name: dateRangeOptions | type: DateRangeOptions | description: Customer selects a start date within a date range.
              - name: startDate | type: Date | description: Date and time from which the customer can select the subscription start date. The selected start date must be on or after this exact instant.
              - name: endDate | type: Date | description: Date and time until which the customer can select the subscription start date. If not set, the range is open-ended. The selected start date must be before this exact instant. Must be later than `start_date`.
        - name: type | type: StartDateType | description: How the subscription start date is determined.
             - enum:
             -     FIXED_DATE: Subscription starts on the earliest of the configured fixed dates that hasn't passed. Applies only to pricing variants with the `ON_PURCHASE` start type.
             -     DAY_OF_MONTH: Subscription starts on a specific day of each month. Applies only to pricing variants with the `ON_PURCHASE` start type.
             -     DATE_RANGE: Customer selects a start date within a date range. Applies only to pricing variants with the `CUSTOM` start type.
        - name: startDateUnavailableMessage | type: string | description: Message displayed to customers when no start date is available. For example, when every fixed start date or the end of the date range has passed. Applicable only when `type` is `FIXED_DATE`, or `DATE_RANGE` with `date_range_options.end_date` set - in other configurations a start date is always available and the message is ignored.
     - name: tags | type: Tags | description: Tags that can be assigned to this plan for classification and filtering.
        - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.
           - name: tagIds | type: array<string> | description: List of tag GUIDs
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.
     - 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).
  - name: metadata | type: EventMetadata | description: none
     - name: instanceId | type: string | description: App instance GUID.
     - name: eventType | type: string | description: Event type.
     - name: identity | type: IdentificationData | description: The identification type and identity data.
        - ONE-OF:
           - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site.
           - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site.
           - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.).
           - name: appId | type: string | description: GUID of an app.
        - name: identityType | type: WebhookIdentityType | description: 
             - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
     - name: accountInfo | type: AccountInfo | description: Details related to the account
        - name: accountId | type: string | description: GUID of the Wix account associated with the event.
        - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account.
        - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site.
     - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them.
     - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
     - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
     - name: entityId | type: string | description: GUID of the entity associated with the event.
     - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`.
     - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
     - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
     - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.

```

### Examples


```javascript
import { plansV3 } from '@wix/pricing-plans';

plansV3.onPlanCreated((event) => {
    // handle your event here
});
```


```javascript
import { createClient, AppStrategy } from '@wix/sdk';
import { plansV3 } from '@wix/pricing-plans';

const wixClient = createClient({
  auth: AppStrategy({
    appId: 'MY-APP-ID',
    publicKey: 'YOUR_APP_PUBLIC_KEY',
  }),
  modules: {
      plansV3,
    },
});

wixClient.plansV3.onPlanCreated((event) => {
    // handle your event here
});
```

---