LemonStand Version 1 Has Been Discontinued
This documentation is for LemonStand Version 1. LemonStand is now offered as a cloud-based eCommerce platform.
You can try the new LemonStand and learn about upgrading here.
Subscriptions_Plan class
The Subscriptions_Plan class represents a subscription plan. You can access this class instances through the subscription_plan field of the Shop_Product class (see the Shop_Product extensions on this page). You can find description of a subscription plan in the What is a subscription and a subscription plan article.
Class fields
- name - the subscription plan name visible in the user interface..
- plan_type - renewal schedule code. Possible values are: x_days (renew every X days)', monthly (renew monthly), infinite (infinite subscription).
- x_days_day_num - number of days the subscription should run before next renewal. Applicable for the Every X Days renewal schedule.
- xth_day_of_month_day - renewal day of month for the monthly subscription.
- allow_non_integral_periods - indicates whether non-integral periods are allowed, Boolean field.
- renewal_cycles - number of renewals before the subscription ends. Leave the field empty for unlimited renewals.
- invoice_advance_days - number of days invoice is sent before renewal cycle date. LemonStand can generate subscription invoices automatically. Each time when it generates invoices, it checks how many days left before a specific subscription ends. If it finds that the number of days is equal or less to the Invoice advance field value, it generates a new invoice ands sends a notification to the customer.
- grace_period - number of days subscription will stay active after it has expired. Leave the field empty to cancel the grace period.
- trial_period - number of days a new unpaid subscription is active. There could be only a single trial period per customer per subscription product.
- code - the subcription plan API code.
Previous: Subscriptions class
Return to API extensions