SubscriptionPlanFeature
Junction entity representing which features are included in a subscription plan by default, defining the feature entitlements for each plan tier. This entity enables flexible plan composition where plan managers can configure which features are available in each subscription tier (free, starter, professional, enterprise) without hardcoding feature lists. It supports plan differentiation, feature-based pricing, plan upgrades/downgrades, and A/B testing of plan compositions. The entity allows features to be added or removed from plans over time, supports grandfathering (legacy plan feature configurations), and enables feature-specific configuration per plan (e.g., API rate limits varying by plan tier). It serves as the plan entitlement definition layer, working with TenantFeature to determine final feature access: features included in the plan + manually enabled features for specific tenants.
Properties
| Property | Type | Mode | Description | Required |
|---|---|---|---|---|
| plan | SubscriptionPlan | stored | Reference to the SubscriptionPlan that includes this feature | Required |
| feature | Feature | stored | Reference to the Feature included in this plan | Required |
| included | boolean | stored | Whether this feature is included in the plan by default Example: | Required |
| configuration | json | stored | Plan-specific configuration for this feature (e.g., different limits per plan tier) Example: | Optional |
| metadata | json | stored | Additional metadata about this feature-plan association | Optional |
Examples
Example 1
{
"@type": "SubscriptionPlanFeature",
"plan": {
"@type": "SubscriptionPlan",
"name": "free",
"label": "Free Plan"
},
"feature": {
"@type": "Feature",
"key": "basic-reporting",
"label": "Basic Reporting"
},
"included": true,
"configuration": {
"maxReports": 5,
"exportFormats": [
"pdf"
]
}
}Example 2
{
"@type": "SubscriptionPlanFeature",
"plan": {
"@type": "SubscriptionPlan",
"name": "professional",
"label": "Professional Plan"
},
"feature": {
"@type": "Feature",
"key": "advanced-reporting",
"label": "Advanced Reporting"
},
"included": true,
"configuration": {
"maxReports": 100,
"exportFormats": [
"pdf",
"xlsx",
"csv"
]
}
}Example 3
{
"@type": "SubscriptionPlanFeature",
"plan": {
"@type": "SubscriptionPlan",
"name": "professional",
"label": "Professional Plan"
},
"feature": {
"@type": "Feature",
"key": "api-access",
"label": "API Access"
},
"included": true,
"configuration": {
"maxApiCallsPerDay": 10000,
"rateLimit": "500/hour"
}
}Example 4
{
"@type": "SubscriptionPlanFeature",
"plan": {
"@type": "SubscriptionPlan",
"name": "enterprise",
"label": "Enterprise Plan"
},
"feature": {
"@type": "Feature",
"key": "white-labeling",
"label": "White Labeling"
},
"included": true
}Example 5
{
"@type": "SubscriptionPlanFeature",
"plan": {
"@type": "SubscriptionPlan",
"name": "enterprise",
"label": "Enterprise Plan"
},
"feature": {
"@type": "Feature",
"key": "sso-support",
"label": "SSO Support"
},
"included": true
}