About the Plans V3 API

The Plans V3 API allows you to create and manage pricing plans that determine charges for site content and services. You can decide how long a plan lasts, how much it costs, whether the buyer pays once upfront or makes recurring payments, and what perks the plan offers.

With the Plans V3 API, you can:

  • Create and manage pricing plans.
  • Set the pricing and billing terms of plans.
  • Set a plan's duration.
  • Set free trial periods for plans.
  • Manage customers' ability to view, subscribe to, or cancel their subscription to a plan.

Types of plans

The most common types of plans are:

  • One-time: A plan that charges a single upfront payment and lasts for the time period you choose. To create a one-time payment plan that lasts a specific amount of time, specify a billingCycle that's the desired duration and set endType to CYCLES_COMPLETED and cyclesCompletedDetails.billingCycleCount to 1.
  • Recurring: A plan with recurring payment. You can set the plan to recur daily, weekly, monthly, or yearly. Recurring payments offer more flexible terms, without a large up-front commitment. Define the recurrence rule using the plan's billingCycle object.
  • Free plan: A plan that requires no payment. Typically used for trials or promotions and available only once. To create a single time free plan, set the plan's flatRate.amount to 0 and maxPurchasesPerBuyer to 1.

Note: To accept recurring payments, a Wix user needs to set up a payment provider that supports recurring payments.

Free trials

You can set up a free trial period for recurring plans. When the buyer subscribes to the plan for the first time, they gain access to the plan's benefits until the end of the free trial period. The buyer keeps their access to those benefits even if they cancel their subscription during that time. At the end of the trial period, the first billing cycle begins. A buyer can only benefit from the trial period of a specific plan once.

To add a free trial to a plan you create, specify a number of days in freeTrialDays.

Plan duration

You can determine how long plans remain active after the buyer subscribes to them. You set a plan's duration using the same time units as billing cycles: days, weeks, months, or years. You can also create plans that never expire, continuing indefinitely until the buyer cancels.

  • To limit the duration of a plan, set its endType to CYCLES_COMPLETED and specify a number of cycles in cyclesCompletedDetails.billingCycleCount.
  • To create a plan that never expires, set its endType to UNTIL_CANCELLED.

Customer permissions

You can control which actions customers can perform themselves for a specific plan. Wix users can still perform these actions on a customer's behalf regardless of these settings.

  • View the plan in the Plans & Pricing page. Determined by the plan's visibility.
  • Subscribe to the plan. Determined by the plan's buyable.
  • Cancel their subscription to the plan. Determined by the plan's buyerCanCancel.

Before you begin

It's important to note the following points before starting to code:

Use cases

Terminology

  • Plan: A pricing plan that members can subscribe to. Includes promotional data, pricing configurations, and other settings. Wix users can track and manage plans in the dashboard under Catalog > Pricing Plans.
  • Customer: A member who can view and subscribe to plans.
  • Buyer: A customer who subscribes to a plan.
  • Subscription: The act of purchasing a plan. Wix users can track and manage subscriptions in the dashboard under Sales > Subscriptions.
  • Pricing variant: Combines billing terms with pricing strategies to offer different billing options for a benefits. For example, a plan might offer monthly billing at $50 or yearly billing at $500. A plan can only have 1 variant.
  • Pricing strategy: Determines how much customers pay. Supports flat rate pricing only, where customers pay a fixed amount per billing cycle.
  • Billing terms: Configuration that defines when billing starts, how often customers are charged (billing cycle), and when the plan ends.
  • Perks: Names of benefits included with the plan. For display only. To configure benefits, see Benefit Programs.
Did this help?