Subscription
Thesubscription define a contract between a customer and a set of chargeable items. A subscription define a minimum term, defined by a start date. Any subscription without an end date is referred as an evergreen subscription.
Evergreen subscriptions never renew, and continue to bill until they are cancelled. The alternative, a termed subscription, hold an additional date, the end date. Termed subscription renew on a cycle.
Use the following snippet to create an evergreen subscription:
Properties of a subscription
| property | description | mandatory |
|---|---|---|
| handle | A unique reference to the subscription. If not provided when creating the subscription, Plude automatically assigns a new one. | yes |
| term date | Start date of the current period. | yes |
| term end | End date of the current period if the subscription is termed. | no |
| auto renewal | Only valid for termed subscriptions. If true, the renewal process is automatic. | no |
| currency | Describes the currency used for the subscription. Price must have a currency matching | yes |
| description | A short description of for the subscription. | no |
Subscription renewals
For termed subscriptions, renewals happen on theend date if auto renewal is true. The renewal process is automatic at which the start date becomes the end date and the end date is moved forward with the same period. In addition, a notification event is sent and any renewal trigger items are billed immediately. You can always retrieve the first start date from historic start.
Subscription items
Asubscription may hold none or more billable items. These are called subscriptionItem and they bind the subscription with price and a product.
In the following chapter, we will learn how to apply changes to subscriptionItem.
