About the Plans API

Using the Plans API, you can create and manage pricing plans.

This includes building a customized membership plan experience, including implementing a customizable pricing page where customers can view the plans, including their perks, prices, and other features including free trials, purchase limitations, and more.

With the Plans API, you can:

  • Create and update plans. This includes:

    • Setting up pricing models for plans, such as free, one-time payment, and recurring payments (subscriptions).

    • Determining if pricing plans should have a duration or be valid until canceled by a customer.

    • Limiting plans so they can be purchased only 1 time by a single customer. By default, customers can make unlimited purchases of the same plan.

    Note that updating the properties of an existing pricing plan doesn't affect any current orders or purchases of the plan. Existing orders retain their existing terms and pricing.

  • Get, list, and query plans.

  • Change the visibility, availability, and accessibility of a plan.

  • Get statistics about plans.

  • Archive plans.

  • Set or clear the primary plan. This determines if a plan is highlighted with a custom ribbon when viewing the plans on a site.

More about plans

It's important to explore the types of plans available and other specifications, such as payment options and purchasing constraints.

Pricing plan types

Pricing plans can be:

  • Free plans. There is no charge to the site visitor or member.

  • One-time payment plans. The site visitor or member is charged once. These plans can be set to expire or continue indefinitely until they cancel.

  • Recurring plans. The site visitor or member is charged at predefined intervals (such as weekly, monthly, yearly). These plans can be set to expire or continue indefinitely until they cancel the subscription. Recurring plans can have free trial days.

Free trial plans

Recurring plans can be set to have free trial days using the plan's freeTrialDays property.

During free trial days, site visitor and members can cancel the plan and they won’t be charged.

Free trial days are applied only once per site visitor or member for a plan. This means that if a plan with a free trial was purchased once, the second time they purchase it, the free trial days aren't applied. In this case, the site visitor or member is charged for the plan right away.

Purchase limitations

Some plans can be purchased only a limited number of times by a single site visitor or member based on the value of the plan's purchaseLimitations property.

If the plan is updated, the limit is checked by the current plan details. For example, let's assume a plan's purchase limit was initially set to 1 and a site visitor or member purchased the plan. If later the limit is updated to 2, they can still purchase the same plan a second time.

Plan expiration

A plan can be active for specified periods of time from the date of purchase. The active period is established in the same intervals as the payment periods (weeks, months, years). Plans can also be defined so they never expire (meaning, the plan continues indefinitely until the member cancels). This is true for both one-time and recurring plans.

The slug property

Slugs are used to support dynamic pages.

A slug is generated on a plan's creation and is updated when a plan's name is updated. For example, if the plan's name is "Test Plan," the generated slug is "test-plan." If a plan already exists with a slug "test-plan" for the site, a number is appended to it. The slug becomes "test-plan-1".

Before you begin

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

Terminology

  • 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 with a single payment.
    • A recurring plan charges the customer on a weekly, monthly, or yearly basis for a selected duration of time.
  • Primary plans: Plans that are labeled with a ribbon that is customizable on a site.

  • Archived plans: Plans that can no longer be purchased or edited, but existing plan holders can still enjoy purchased membership and 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 for the trying out of 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. A plan's policy can be displayed on a site's checkout page.

Did this help?