Subscriptions & Monetization
JournalPHP includes a full-featured monetization system — subscription plans, payment providers, and subscription-gated features.
Subscription Plans
Admin Panel → Subscription Plans (/admin-panel/subscription-prices):
Each plan includes:
| Field | Description |
|---|---|
| Name | Displayed plan name |
| Price | Amount in the configured currency |
| Period | Monthly / Annual |
| Feature set | Which feature flags are included |
Users see available plans and choose one. Payment is processed through an embedded widget in the subscription modal — no redirect to an external page.
Subscription Features
Admin Panel → Subscription Features (/admin-panel/subscription-features):
Each feature is enabled for users on a specific plan:
| Code | Description |
|---|---|
post_summaries | Automated AI post summaries |
badge | Personal badges/icons |
fancy_nickname | Special username styling |
reactions | Extended reaction set |
private_messages | Sending private messages |
chatgpt_comments | AI comment bot |
video_avatar | Video avatar |
ad_free | Ad-free experience |
The feature list is configurable — custom features can be added.
Feature access is checked by the has.subscription.feature middleware.
Payment Providers
Admin Panel → Payment Provider (/admin-panel/subscription-payment-provider):
Select the active provider and enter API credentials. Only YooKassa and T-Bank are supported.
| Provider | Payment confirmation |
|---|---|
| YooKassa | Webhook: /payments/yookassa/result |
| T-Bank | Client confirm flow: POST /subscriptions/payments/confirm after widget success |
The payment gateway uses the Driver Pattern — switching providers requires no code changes.
Payment Flow
- User selects a subscription plan in the subscription modal
- Clicks "Subscribe" → a payment is created
- An embedded payment widget opens in the modal (YooKassa or T-Bank SDK)
- After successful payment:
- YooKassa — webhook
/payments/yookassa/resultactivates the subscription - T-Bank — client calls
POST /subscriptions/payments/confirm
- YooKassa — webhook
- Subscription activates, features become available
Cancel a pending payment: POST /subscriptions/payments/cancel.
Payment status — Admin Panel → Payments (/admin-panel/subscription-payments).
Auto-Renewal
If the payment provider supports recurring payments, subscriptions renew automatically:
php artisan subscriptions:auto-renewThis command runs on schedule (Scheduler).
Checking Pending Payments
php artisan subscriptions:payments:check-pendingThe command queries payment status from the provider and updates subscription states.
Upsell Modal
Admin Panel → Subscription Modal (/admin-panel/subscription-modal):
Configure the subscription upsell modal's appearance — text, benefit list, call-to-action button.
Managing User Subscriptions
Admin Panel → User Subscriptions (/admin-panel/user-subscriptions):
- View active subscriptions
- Manually activate / deactivate a subscription
- Subscriber statistics
Cancelling a Subscription
Users can cancel their subscription through account settings. After cancellation, access to features is retained until the end of the paid period.
Route: POST /subscriptions/cancel
Advertising
In addition to subscriptions, the platform supports advertising blocks:
Admin Panel → Advertisements (/admin-panel/advertisements):
- Banner ads — image + link in fixed positions
- Inline ads — ad inserts between posts in the feed
Positions and display periods are configured in the Admin Panel.