Subscription (Memberships) Official
v1.4.1
Plans, subscriptions and gated access. One-time trials, works with any payment gateway.
Subscription — Memberships
Plans, subscriptions and gated access for apidcms. One-time trials, works with any payment gateway.
Features
- Subscription plans with configurable price, duration, features list
- Trial periods for new users
- Automatic status tracking (active, expired, cancelled)
- Content gating by subscription level
- Works with any payment plugin via
payments.*hooks - Twig functions:
has_subscription(),current_subscription()
Dependencies
- account — required for user binding
- yookassa — optional, for payment processing
Installation
- Copy the
subscription/folder into your project'splugins/ - Admin panel: Plugins → Subscription → Activate
- Configure plans in Settings → Subscription
- Gated content: set
subscription_levelin page config
Settings
| Key | Type | Default | Description |
|---|---|---|---|
trial_days |
number | 7 | Free trial period for new users |
default_plan |
select | — | Plan assigned on registration |
Twig
{% if has_subscription() %}
<p>Your plan: {{ current_subscription().name }}</p>
{% else %}
<a href="/subscribe">Choose a plan</a>
{% endif %}
License
MIT