Subscription feature helps in managing a user's selected
Plan, making it easy to control the access to
Plan is based on a
Role, you can assign the Plan's Role to a user and use the enforce API for permission checking.
Subscription can be created in three ways:
- Manually by an admin
- Via the Pricing flow (after signing up as a
paid-userand purchasing the selected
- Via API
The relationship between
Payment is as follows:
Every Subscription has these properties:
Duration: The duration of the Subscription.
StartTime: The starting time for the Subscription to take effect.
EndTime: The end time for the Subscription to take effect.
Pricing: The related Pricing.
Plan: The related Plan.
Payment: The related Payment.
User: The user who holds this Subscription.
State: Currently, the Subscription has the following states: