Skip to content

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:

FieldDescription
NameDisplayed plan name
PriceAmount in the configured currency
PeriodMonthly / Annual
Feature setWhich 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:

CodeDescription
post_summariesAutomated AI post summaries
badgePersonal badges/icons
fancy_nicknameSpecial username styling
reactionsExtended reaction set
private_messagesSending private messages
chatgpt_commentsAI comment bot
video_avatarVideo avatar
ad_freeAd-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.

ProviderPayment confirmation
YooKassaWebhook: /payments/yookassa/result
T-BankClient confirm flow: POST /subscriptions/payments/confirm after widget success

The payment gateway uses the Driver Pattern — switching providers requires no code changes.

Payment Flow

  1. User selects a subscription plan in the subscription modal
  2. Clicks "Subscribe" → a payment is created
  3. An embedded payment widget opens in the modal (YooKassa or T-Bank SDK)
  4. After successful payment:
    • YooKassa — webhook /payments/yookassa/result activates the subscription
    • T-Bank — client calls POST /subscriptions/payments/confirm
  5. 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:

bash
php artisan subscriptions:auto-renew

This command runs on schedule (Scheduler).

Checking Pending Payments

bash
php artisan subscriptions:payments:check-pending

The 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.

Released under the MIT License.