createPlan( )

Creates a pricing plan.

The createPlan() function returns a Promise that resolves to a newly-created pricing plan after it has successfully been created.

The passed PlanInfo object must contain a pricing model. A pricing model is one of the following:

  • A subscription: A subscription with recurring payments and how often the plan recurs. Subscriptions can have free trial days.
  • A plan that does not renew: A single payment for a specific duration that does not renew.
  • An unlimited plan: A single payment for an unlimited amount of time (until cancelled).

Pricing plans created by this function are available to the site owner in the Pricing Plans section in the Dashboard.

Only users with "Manage Pricing Plans" permissions can create plans.

Method Declaration
Method Parameters

The information for the plan being created.

Return Type:Promise<Plan>
Was this helpful?